]>
git.tdb.fi Git - libs/gltk.git/log
Mikko Rasa [Fri, 18 Aug 2023 21:23:37 +0000 (00:23 +0300)]
Fix an uninitialized variable
Mikko Rasa [Fri, 18 Aug 2023 21:22:14 +0000 (00:22 +0300)]
Add API declarations
Mikko Rasa [Fri, 18 Aug 2023 20:54:47 +0000 (23:54 +0300)]
Remove deprecated and unmaintained interfaces
Mikko Rasa [Thu, 17 Aug 2023 12:04:35 +0000 (15:04 +0300)]
Bump version
The parameterless render() function got removed from Root, breaking
source compatibility. More changes to come.
Mikko Rasa [Thu, 17 Aug 2023 08:40:03 +0000 (11:40 +0300)]
Adjust things to conform to changes in other libraries
Mikko Rasa [Wed, 16 Oct 2019 11:15:34 +0000 (14:15 +0300)]
Emit rebuild_needed from a container when a child is added
Otherwise the flag won't properly propagate if the container itself is
already parented.
Mikko Rasa [Fri, 27 Sep 2019 11:29:46 +0000 (14:29 +0300)]
Add a signal for selection changes in Entry
Mikko Rasa [Fri, 27 Sep 2019 11:29:09 +0000 (14:29 +0300)]
Fix a bug in selection handling when deleting text
Mikko Rasa [Fri, 27 Sep 2019 11:27:49 +0000 (14:27 +0300)]
Add a progress bar widget
Mikko Rasa [Wed, 25 Sep 2019 19:10:27 +0000 (22:10 +0300)]
Refactor edit position adjustments from Entry::insert and delete
Mikko Rasa [Wed, 25 Sep 2019 18:44:04 +0000 (21:44 +0300)]
Improve Dialog staleness checks
Buttons may be activated by a navigation event. There's now a protected
function that derived classes can call if they implement custom mechanisms
for producing a response.
Mikko Rasa [Mon, 23 Sep 2019 22:26:30 +0000 (01:26 +0300)]
Add a page size feature to Slider
Mikko Rasa [Mon, 23 Sep 2019 22:10:45 +0000 (01:10 +0300)]
Refactor all slider logic into the Slider class
Having to write the same logic twice is annoying and more prone to
errors.
Mikko Rasa [Mon, 23 Sep 2019 21:00:06 +0000 (00:00 +0300)]
Mark Entry for rebuild when cursor starts or stops blinking
Mikko Rasa [Mon, 23 Sep 2019 20:59:24 +0000 (23:59 +0300)]
Defer widget rebuild to just before they are rendered
This improves performance especially with complex widgets like Entry.
Mikko Rasa [Mon, 23 Sep 2019 18:53:35 +0000 (21:53 +0300)]
Mark List::Item as receiving navigation input
To make it consistent with the fact that it can receive focus.
Mikko Rasa [Mon, 23 Sep 2019 18:37:10 +0000 (21:37 +0300)]
Rebuild Entry when the slider is moved
Mikko Rasa [Mon, 23 Sep 2019 18:36:18 +0000 (21:36 +0300)]
Adjust protections of list item base classes
Mikko Rasa [Mon, 23 Sep 2019 18:26:00 +0000 (21:26 +0300)]
Adjust a pointer check in Container
This is semantically equivalent but more intuitive and more tolerant to
mistakes.
Mikko Rasa [Mon, 23 Sep 2019 18:23:08 +0000 (21:23 +0300)]
Improve pointer grab handling
This fixes a bug where hiding a widget with active pointer grab would
leave the grab flag set, preventing pointer events from being sent
anywere.
Mikko Rasa [Thu, 19 Sep 2019 21:47:43 +0000 (00:47 +0300)]
Implement a grid view mode for List
Mikko Rasa [Thu, 19 Sep 2019 21:01:53 +0000 (00:01 +0300)]
Add a level of indirection to decouple list rows from items
This is required to support different kinds of views like grid and
possibly tree.
Mikko Rasa [Thu, 19 Sep 2019 19:04:41 +0000 (22:04 +0300)]
Cache the items part in List
Mikko Rasa [Thu, 19 Sep 2019 16:33:30 +0000 (19:33 +0300)]
Rename Widget::on_geometry_change to on_size_change
The new name better represents its actual function.
Mikko Rasa [Thu, 19 Sep 2019 08:25:00 +0000 (11:25 +0300)]
Add a helper class for single-child list items
Mikko Rasa [Thu, 19 Sep 2019 06:21:56 +0000 (09:21 +0300)]
Use the maximum item height for autosizing List
Mikko Rasa [Tue, 17 Sep 2019 21:03:02 +0000 (00:03 +0300)]
Use a LoadableTypeRegistry to manage child types for Panel
Mikko Rasa [Tue, 17 Sep 2019 19:48:56 +0000 (22:48 +0300)]
Ensure Text always has at least one line
Otherwise coords_to_geometry may access bogus data.
Mikko Rasa [Tue, 17 Sep 2019 19:46:16 +0000 (22:46 +0300)]
Add page up/down navigation to Entry
Mikko Rasa [Tue, 17 Sep 2019 19:38:04 +0000 (22:38 +0300)]
Implement next/previous navigation in Panel
The order is the one widgets were added in, which I think should produce
a sensible result in common scenarios.
Mikko Rasa [Tue, 17 Sep 2019 16:06:34 +0000 (19:06 +0300)]
Properly handle multibyte UTF-8 in Entry and Text
Mikko Rasa [Tue, 17 Sep 2019 15:49:04 +0000 (18:49 +0300)]
Emit signal_text_changed from Entry::set_text
Mikko Rasa [Tue, 17 Sep 2019 12:42:19 +0000 (15:42 +0300)]
Use RAII to ensure consistent PartCache state
end_rebuild needs to be called even if an exception is thrown during
rebuilding.
Mikko Rasa [Tue, 17 Sep 2019 12:36:33 +0000 (15:36 +0300)]
Fix an unsigned overflow error in Text
Mikko Rasa [Tue, 17 Sep 2019 11:55:09 +0000 (14:55 +0300)]
Select list items upon navigation by default
With control pressed, only the focus is moved.
Mikko Rasa [Mon, 16 Sep 2019 17:25:30 +0000 (20:25 +0300)]
Make sure Entry::first_row stays consistent
Shrinking and then enlarging an Entry caused first_row to first be set to
the edit position, but would never be reset to zero due to the check in
slider_value_changed. Yet the visual result was correct thanks to Text
clamping first_row independently.
Mikko Rasa [Mon, 16 Sep 2019 16:40:24 +0000 (19:40 +0300)]
Add a signal for Entry widget text changes
Mikko Rasa [Mon, 16 Sep 2019 16:33:29 +0000 (19:33 +0300)]
Add a set_modal function for Dialog
Mikko Rasa [Mon, 16 Sep 2019 16:32:26 +0000 (19:32 +0300)]
Do not navigate out of a widget holding the pointer grab
Mikko Rasa [Mon, 16 Sep 2019 16:31:18 +0000 (19:31 +0300)]
Use separate widget class for Dialog
Mikko Rasa [Mon, 16 Sep 2019 16:30:45 +0000 (19:30 +0300)]
Remember the last input focus of a Container and restore it when focused
Mikko Rasa [Thu, 12 Sep 2019 13:46:07 +0000 (16:46 +0300)]
Some more interfaces to support integrating Entry with other components
Mikko Rasa [Thu, 12 Sep 2019 12:03:10 +0000 (15:03 +0300)]
Avoid duplicating the logic in Entry::get_selection
Mikko Rasa [Thu, 12 Sep 2019 11:15:08 +0000 (14:15 +0300)]
Collapse the two implementations of Entry::set_edit_position
Mikko Rasa [Thu, 12 Sep 2019 11:05:33 +0000 (14:05 +0300)]
Use the public functions also in internal edit operations of Entry
Mikko Rasa [Thu, 12 Sep 2019 10:55:11 +0000 (13:55 +0300)]
Refactor visible height calculation in Entry and Text
It's now contained in a common function to ensure it's calculated the
same way in both.
Mikko Rasa [Thu, 12 Sep 2019 09:11:39 +0000 (12:11 +0300)]
Improve vertical positioning of text
Applying alignment to only the number of lines that fit in the widget
results in a more consistent position.
Mikko Rasa [Wed, 11 Sep 2019 15:53:54 +0000 (18:53 +0300)]
Add some editing functions to Entry
Mikko Rasa [Wed, 11 Sep 2019 15:43:11 +0000 (18:43 +0300)]
Interpret shift+tab as NAV_PREVIOUS
Mikko Rasa [Wed, 11 Sep 2019 15:42:44 +0000 (18:42 +0300)]
Add modifier state enum
This was supposed to be in
6e5db3e
Mikko Rasa [Wed, 11 Sep 2019 07:49:15 +0000 (10:49 +0300)]
Implement a selection feature in Entry widget
Mikko Rasa [Wed, 11 Sep 2019 06:26:38 +0000 (09:26 +0300)]
Handle home and end keys in Entry widget
Mikko Rasa [Tue, 10 Sep 2019 08:40:37 +0000 (11:40 +0300)]
Pass modifier state to key_press and key_release functions
Mikko Rasa [Sun, 8 Sep 2019 15:32:19 +0000 (18:32 +0300)]
Add an event handler to allow containers to reach to focus changes
Mikko Rasa [Sun, 8 Sep 2019 15:28:21 +0000 (18:28 +0300)]
Only focus widgets if the container is focused
This prevents issues where a widget could be focused before it's added
to a rooted hierarchy, presenting inconsistent focus state.
Mikko Rasa [Sun, 8 Sep 2019 14:25:56 +0000 (17:25 +0300)]
Make the entry widget cursor blink
If the cursor part has different graphics for normal and active states,
it will toggle between those every half a second while the widget is
focused.
Mikko Rasa [Sun, 8 Sep 2019 14:17:02 +0000 (17:17 +0300)]
Add a system for animating widgets
Mikko Rasa [Thu, 5 Sep 2019 21:08:08 +0000 (00:08 +0300)]
Add a flag to make widgets in a LinearArrangement the same size
Mikko Rasa [Thu, 5 Sep 2019 16:56:06 +0000 (19:56 +0300)]
Update deprecated things
Mikko Rasa [Thu, 29 Dec 2016 17:21:24 +0000 (19:21 +0200)]
Change Root::render to use the passed in Renderer
Mikko Rasa [Mon, 28 Nov 2016 00:35:12 +0000 (02:35 +0200)]
Add nameless child keywords for Panel
Additionally, use a template specialization rather than separate function
for a child which is itself a Panel.
Mikko Rasa [Sat, 26 Nov 2016 11:39:26 +0000 (13:39 +0200)]
Allow overriding the spacing between two widgets in LinearArrangement
Mikko Rasa [Sat, 26 Nov 2016 11:38:42 +0000 (13:38 +0200)]
Change the Resources reference in Root to non-const
It might be necessary to load textures on the fly.
Mikko Rasa [Sat, 26 Nov 2016 11:38:02 +0000 (13:38 +0200)]
Add a datafile statement to set an icon for an Image
Mikko Rasa [Sat, 19 Nov 2016 12:43:31 +0000 (14:43 +0200)]
Update Renderer matrix manipulation calls
Mikko Rasa [Fri, 16 Sep 2016 22:39:29 +0000 (01:39 +0300)]
Explicitly require sigc++-2.0
Mikko Rasa [Thu, 15 Sep 2016 21:46:32 +0000 (00:46 +0300)]
Inherit Root from GL::Renderable
This allows better integration with GL::Pipeline and the new GL::View
class.
Mikko Rasa [Thu, 15 Sep 2016 14:54:15 +0000 (17:54 +0300)]
Focus entry widget on touch press
Mikko Rasa [Thu, 15 Sep 2016 14:53:27 +0000 (17:53 +0300)]
Add lexical conversion for the centering constraints
Mikko Rasa [Mon, 12 Sep 2016 15:34:12 +0000 (18:34 +0300)]
Rewrite Panel navigation logic so it makes more sense
Rather than calculating distances between widget centers it now considers
the closeness of their edges. It's not perfect but better than before.
Mikko Rasa [Sun, 11 Sep 2016 13:28:49 +0000 (16:28 +0300)]
Add centering constraints to Layout
Mikko Rasa [Sun, 11 Sep 2016 13:27:46 +0000 (16:27 +0300)]
Add support for displaying named icons in an Image widget
Mikko Rasa [Fri, 2 Sep 2016 22:08:37 +0000 (01:08 +0300)]
Only pass key and navigation events to enabled widgets
It would be even better to not allow them to be focused in the first
place, but that raises issues such as where to put the focus if the
focused widget gets disabled. So this will have to do.
Mikko Rasa [Fri, 2 Sep 2016 22:07:33 +0000 (01:07 +0300)]
Pass List::focus_in to base class
It sets the FOCUS flag in state, which is then checked to determine
whether to focus items.
Mikko Rasa [Thu, 1 Sep 2016 16:46:44 +0000 (19:46 +0300)]
Implement touch interactions for List
It wasn't working on touchscreens at all because the touch events were
passed to the list items by Container and not converted into mouse events
for the list itself to process.
Mikko Rasa [Thu, 1 Sep 2016 16:46:11 +0000 (19:46 +0300)]
Fix an incorrectly positioned graphic
Mikko Rasa [Thu, 1 Sep 2016 16:42:41 +0000 (19:42 +0300)]
Improve list focus management
Now that containers no longer get an implicit navigation event when
focused, list must take care of focusing the correct item itself.
Mikko Rasa [Thu, 1 Sep 2016 07:46:57 +0000 (10:46 +0300)]
Move navigation logic from Container to Panel
A number of widgets inherit from Container because they have internal
sub-widgets, but have their own navigation logic. Panel is the user-
visible generic container.
Mikko Rasa [Wed, 31 Aug 2016 09:56:06 +0000 (12:56 +0300)]
Don't pass events to an invisible root widget
Mikko Rasa [Wed, 31 Aug 2016 08:52:45 +0000 (11:52 +0300)]
Implement keyboard navigation for most widgets
Mikko Rasa [Wed, 31 Aug 2016 08:34:40 +0000 (11:34 +0300)]
Add a border around the focused widget in the basic skin
Mikko Rasa [Wed, 31 Aug 2016 08:30:26 +0000 (11:30 +0300)]
Allow an empty graphic to be specified in part definitions
It can be used to cancel out a graphic for specific states.
Mikko Rasa [Wed, 31 Aug 2016 08:17:33 +0000 (11:17 +0300)]
Refactor the traversal logic out of List::check_view_range
It'll be useful for other things as well.
Mikko Rasa [Tue, 30 Aug 2016 13:26:57 +0000 (16:26 +0300)]
Add an input method subsystem
It's necessary for implementing keyboard navigation and virtual keyboards.
Mikko Rasa [Tue, 30 Aug 2016 13:12:22 +0000 (16:12 +0300)]
Make keyboard event handlers indicate whether the event was handled
Mikko Rasa [Tue, 30 Aug 2016 12:51:16 +0000 (15:51 +0300)]
Reorder event handling functions
Mikko Rasa [Fri, 26 Aug 2016 11:32:02 +0000 (14:32 +0300)]
Use a larger font for the basic skin
A 10-pixel font is rather tiny. The old font file was also lacking some
metrics.
Mikko Rasa [Fri, 26 Aug 2016 11:17:27 +0000 (14:17 +0300)]
Add another example application to demonstrate various widgets
Mikko Rasa [Thu, 25 Aug 2016 21:23:05 +0000 (00:23 +0300)]
Make sure gravity can't overpower expand
Mikko Rasa [Thu, 25 Aug 2016 20:29:54 +0000 (23:29 +0300)]
Move the helloworld example into a subdirectory
Mikko Rasa [Thu, 19 Nov 2015 11:22:40 +0000 (13:22 +0200)]
Rudimentary touchscreen support
There are no touch-specific interactions yet, but this allows input to
work with a touchscreen.
Mikko Rasa [Thu, 19 Nov 2015 09:58:08 +0000 (11:58 +0200)]
Make some functions const that by all rights should be
Mikko Rasa [Thu, 19 Nov 2015 09:36:10 +0000 (11:36 +0200)]
Fix exception description
Mikko Rasa [Thu, 19 Nov 2015 09:35:07 +0000 (11:35 +0200)]
Make func a normal argument of Text::process_lines
There isn't any real reason for it to be a template argument.
Mikko Rasa [Fri, 6 Mar 2015 00:03:51 +0000 (02:03 +0200)]
Clear dropdown text if the associated list selection is cleared
This is currently impossible to do by interacting with the widget, but
may happen if the selected item is removed.
Mikko Rasa [Fri, 6 Mar 2015 00:03:34 +0000 (02:03 +0200)]
Add a selection_cleared signal to List
Mikko Rasa [Fri, 6 Mar 2015 00:02:06 +0000 (02:02 +0200)]
Implement mouse wheel scrolling in List
Mikko Rasa [Thu, 13 Nov 2014 21:46:59 +0000 (23:46 +0200)]
If the active list item is refreshed, mark it as such
Mikko Rasa [Thu, 13 Nov 2014 21:45:57 +0000 (23:45 +0200)]
Use a shader for rendering if available
Mikko Rasa [Thu, 13 Nov 2014 21:09:33 +0000 (23:09 +0200)]
Use a Camera rather than direct matrix manipulation