shoes3
shoes3 copied to clipboard
ListBox is not an actual ListBox
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:
Additional references:
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.
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.
Shoes list_box will be whatever works in the past. No deprecation needed. It's a Shoes name.
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.
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.
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.
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?
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?