SFGUI icon indicating copy to clipboard operation
SFGUI copied to clipboard

ListBox widget

Open victorlevasseur opened this issue 9 years ago • 12 comments

This PR adds a ListBox widget. It's based on Zax37 but has almost been entirely rewritten to improve the widget.

Features :

  • Vertical scrollbar (never, auto or always)
  • Two size "modes": requisition adapted to the max width of items' texts or items' texts shrinked to fit in a not large enough ListBox
  • Multiple selection modes: no selection, single selection, multiple selection
  • Rendering code in BREW class
  • An example is provided, demonstrating 3 types of listboxes

Remarks ?

TODO: When you agreed on this implementation, write the doc (and squash the commits ?)

victorlevasseur avatar Feb 23 '16 19:02 victorlevasseur

Bump.

victorlevasseur avatar Feb 29 '16 13:02 victorlevasseur

22 commits? Can't you squash them (at least yours) or something? :confused:

binary1248 avatar Feb 29 '16 16:02 binary1248

When you agreed on this implementation, write the doc (and squash the commits ?)

victorlevasseur avatar Feb 29 '16 17:02 victorlevasseur

It's easier to review changes when they are batched into fewer changesets.

binary1248 avatar Feb 29 '16 17:02 binary1248

@binary1248 Can't you just look at the "Files changed" tab?

refi64 avatar Feb 29 '16 17:02 refi64

I like to checkout the code locally and review it using my own tools.

binary1248 avatar Feb 29 '16 17:02 binary1248

Ok, will do it. :)

victorlevasseur avatar Feb 29 '16 17:02 victorlevasseur

The commits are squashed (I did not squash Zax37 commit so that he still appears).

victorlevasseur avatar Feb 29 '16 17:02 victorlevasseur

Thanks for mentioning ;)

Zax37 avatar Mar 02 '16 23:03 Zax37

Bump.

I fixed a bug causing the scrollbar not to update when adding or removing items.

victorlevasseur avatar Mar 26 '16 20:03 victorlevasseur

Hi,

Is there any desire to follow up on that PR? I have updated to recent master on my local fork. I'll be happy to help getting it merge, it is a really useful widget! One question though, is there any any reason this is not a list of Widgets and not only sf::String? That would allow for more customization (like prepending icons...).

Great job though, I tried it out in a toy project, and it works really well.

DrBarbare avatar Jan 20 '19 21:01 DrBarbare

I'm also waiting for this one :)

vfjpl avatar Dec 13 '19 22:12 vfjpl