shoes3 icon indicating copy to clipboard operation
shoes3 copied to clipboard

ListBox is not an actual ListBox

Open IanTrudel opened this issue 7 years ago • 8 comments

ListBox is implemented as a Combo Box as can be seen in shoes_native_list_box. It is using gtk_combo_box_text_alt_new instead of gtk_list_new.

This is gonna be a maintenance nightmare. Not backward compatible. :)

This is an actual GTK ListBox:

This is a GTK ComboBox:

Microsoft Documentation also agrees:

Using the List Box Control

Using the Combo Box Control

Additional references:

IanTrudel avatar Mar 09 '17 20:03 IanTrudel

This is gonna be a maintenance nightmare. Not backward compatible. :)

I must be missing something. Shoes widgets are named in Shoes, not microsoft, not gtk, not cocoa. not wiki. They sometimes have the same name and sometimes not in all those 'sources' of wisdom.

If you want to re-implement ListBox to your vision of what it should look like and act like, that would be backwards compatibility problem.

ccoupe avatar Mar 17 '17 01:03 ccoupe

The problem is well beyond other GUIs. This is just not a ListBox! It's pretty much like a vet who would keep insisting your dog is a cat.

The good news is that we can introduce deprecation and slowly phase out classes, methods and such that needs to be removed or changed. Concretely, it will be possible to alias ListBox in ComboBox, emit a warning for deprecation, and later on remove ListBox and add an actual ListBox as ListBox.

IanTrudel avatar Mar 17 '17 02:03 IanTrudel

Shoes list_box will be whatever works in the past. No deprecation needed. It's a Shoes name.

ccoupe avatar May 14 '17 08:05 ccoupe

Shoes list_box will be whatever works in the past. No deprecation needed. It's a Shoes name.

I always respect your dedication to backward compatibility. Shoes has been well thought of and the design is relatively straightforward. There is still a very important question to answer: What happens when we implement an actual list box?

This question warrants to keep this issue open.

IanTrudel avatar Sep 30 '17 14:09 IanTrudel

There's no NSListBox or NSComboBox in cocoa. There are ways to emulate them but those names do not exist in that world. Shoes listbox (aks combox-box) matches to NSPopUpButton (go figure). I have no plans/desires/need to implement an even more complicated cocoa widget that matches what hasn't be spec'ed. We can deal with alias/deprecations when we have another cocoa programmer.

ccoupe avatar Oct 01 '17 02:10 ccoupe

This issue can stay open for a long long time. I just think that there will come a day where it will need to be addressed.

IanTrudel avatar Oct 01 '17 03:10 IanTrudel

For osx, this bit of definition helps. What Shoes calls 'list_box' is a combo-list in Linux/Windows and a 'Pop Up Button' in osx terms. It reports the value selected.

The other kind of widget, the one we don't have, triggers an action - in osx - a Pull Down Buttoncalls a Shoes block associated with the selection. Kind of like if Shoes had a menubar and menus and menu_items - each menu_item has a Shoes proc/block associated (and and/or icons) some Shoes code is called.

Am I parsing things correctly?

ccoupe avatar Oct 16 '17 07:10 ccoupe

A true list_box could also be emulated in current Shoes by anybody - just build a hash of Shoes selection names to user methods/blocks/proc - another subclass of Shoes Widget?

ccoupe avatar Oct 16 '17 07:10 ccoupe