]> git.tdb.fi Git - libs/gltk.git/log
libs/gltk.git
5 years agoRemember the last input focus of a Container and restore it when focused
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

5 years agoSome more interfaces to support integrating Entry with other components
Mikko Rasa [Thu, 12 Sep 2019 13:46:07 +0000 (16:46 +0300)]
Some more interfaces to support integrating Entry with other components

5 years agoAvoid duplicating the logic in Entry::get_selection
Mikko Rasa [Thu, 12 Sep 2019 12:03:10 +0000 (15:03 +0300)]
Avoid duplicating the logic in Entry::get_selection

5 years agoCollapse the two implementations of Entry::set_edit_position
Mikko Rasa [Thu, 12 Sep 2019 11:15:08 +0000 (14:15 +0300)]
Collapse the two implementations of Entry::set_edit_position

5 years agoUse the public functions also in internal edit operations of Entry
Mikko Rasa [Thu, 12 Sep 2019 11:05:33 +0000 (14:05 +0300)]
Use the public functions also in internal edit operations of Entry

5 years agoRefactor visible height calculation in Entry and Text
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.

5 years agoImprove vertical positioning of text
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.

5 years agoAdd some editing functions to Entry
Mikko Rasa [Wed, 11 Sep 2019 15:53:54 +0000 (18:53 +0300)]
Add some editing functions to Entry

5 years agoInterpret shift+tab as NAV_PREVIOUS
Mikko Rasa [Wed, 11 Sep 2019 15:43:11 +0000 (18:43 +0300)]
Interpret shift+tab as NAV_PREVIOUS

5 years agoAdd modifier state enum
Mikko Rasa [Wed, 11 Sep 2019 15:42:44 +0000 (18:42 +0300)]
Add modifier state enum

This was supposed to be in 6e5db3e

5 years agoImplement a selection feature in Entry widget
Mikko Rasa [Wed, 11 Sep 2019 07:49:15 +0000 (10:49 +0300)]
Implement a selection feature in Entry widget

5 years agoHandle home and end keys in Entry widget
Mikko Rasa [Wed, 11 Sep 2019 06:26:38 +0000 (09:26 +0300)]
Handle home and end keys in Entry widget

5 years agoPass modifier state to key_press and key_release functions
Mikko Rasa [Tue, 10 Sep 2019 08:40:37 +0000 (11:40 +0300)]
Pass modifier state to key_press and key_release functions

5 years agoAdd an event handler to allow containers to reach to focus changes
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

5 years agoOnly focus widgets if the container is focused
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.

5 years agoMake the entry widget cursor blink
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.

5 years agoAdd a system for animating widgets
Mikko Rasa [Sun, 8 Sep 2019 14:17:02 +0000 (17:17 +0300)]
Add a system for animating widgets

5 years agoAdd a flag to make widgets in a LinearArrangement the same size
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

5 years agoUpdate deprecated things
Mikko Rasa [Thu, 5 Sep 2019 16:56:06 +0000 (19:56 +0300)]
Update deprecated things

7 years agoChange Root::render to use the passed in Renderer
Mikko Rasa [Thu, 29 Dec 2016 17:21:24 +0000 (19:21 +0200)]
Change Root::render to use the passed in Renderer

7 years agoAdd nameless child keywords for Panel
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.

8 years agoAllow overriding the spacing between two widgets in LinearArrangement
Mikko Rasa [Sat, 26 Nov 2016 11:39:26 +0000 (13:39 +0200)]
Allow overriding the spacing between two widgets in LinearArrangement

8 years agoChange the Resources reference in Root to non-const
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.

8 years agoAdd a datafile statement to set an icon for an Image
Mikko Rasa [Sat, 26 Nov 2016 11:38:02 +0000 (13:38 +0200)]
Add a datafile statement to set an icon for an Image

8 years agoUpdate Renderer matrix manipulation calls
Mikko Rasa [Sat, 19 Nov 2016 12:43:31 +0000 (14:43 +0200)]
Update Renderer matrix manipulation calls

8 years agoExplicitly require sigc++-2.0
Mikko Rasa [Fri, 16 Sep 2016 22:39:29 +0000 (01:39 +0300)]
Explicitly require sigc++-2.0

8 years agoInherit Root from GL::Renderable
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.

8 years agoFocus entry widget on touch press
Mikko Rasa [Thu, 15 Sep 2016 14:54:15 +0000 (17:54 +0300)]
Focus entry widget on touch press

8 years agoAdd lexical conversion for the centering constraints
Mikko Rasa [Thu, 15 Sep 2016 14:53:27 +0000 (17:53 +0300)]
Add lexical conversion for the centering constraints

8 years agoRewrite Panel navigation logic so it makes more sense
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.

8 years agoAdd centering constraints to Layout
Mikko Rasa [Sun, 11 Sep 2016 13:28:49 +0000 (16:28 +0300)]
Add centering constraints to Layout

8 years agoAdd support for displaying named icons in an Image widget
Mikko Rasa [Sun, 11 Sep 2016 13:27:46 +0000 (16:27 +0300)]
Add support for displaying named icons in an Image widget

8 years agoOnly pass key and navigation events to enabled widgets
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.

8 years agoPass List::focus_in to base class
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.

8 years agoImplement touch interactions for List
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.

8 years agoFix an incorrectly positioned graphic
Mikko Rasa [Thu, 1 Sep 2016 16:46:11 +0000 (19:46 +0300)]
Fix an incorrectly positioned graphic

8 years agoImprove list focus management
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.

8 years agoMove navigation logic from Container to Panel
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.

8 years agoDon't pass events to an invisible root widget
Mikko Rasa [Wed, 31 Aug 2016 09:56:06 +0000 (12:56 +0300)]
Don't pass events to an invisible root widget

8 years agoImplement keyboard navigation for most widgets
Mikko Rasa [Wed, 31 Aug 2016 08:52:45 +0000 (11:52 +0300)]
Implement keyboard navigation for most widgets

8 years agoAdd a border around the focused widget in the basic skin
Mikko Rasa [Wed, 31 Aug 2016 08:34:40 +0000 (11:34 +0300)]
Add a border around the focused widget in the basic skin

8 years agoAllow an empty graphic to be specified in part definitions
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.

8 years agoRefactor the traversal logic out of List::check_view_range
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.

8 years agoAdd an input method subsystem
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.

8 years agoMake keyboard event handlers indicate whether the event was handled
Mikko Rasa [Tue, 30 Aug 2016 13:12:22 +0000 (16:12 +0300)]
Make keyboard event handlers indicate whether the event was handled

8 years agoReorder event handling functions
Mikko Rasa [Tue, 30 Aug 2016 12:51:16 +0000 (15:51 +0300)]
Reorder event handling functions

8 years agoUse a larger font for the basic skin
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.

8 years agoAdd another example application to demonstrate various widgets
Mikko Rasa [Fri, 26 Aug 2016 11:17:27 +0000 (14:17 +0300)]
Add another example application to demonstrate various widgets

8 years agoMake sure gravity can't overpower expand
Mikko Rasa [Thu, 25 Aug 2016 21:23:05 +0000 (00:23 +0300)]
Make sure gravity can't overpower expand

8 years agoMove the helloworld example into a subdirectory
Mikko Rasa [Thu, 25 Aug 2016 20:29:54 +0000 (23:29 +0300)]
Move the helloworld example into a subdirectory

9 years agoRudimentary touchscreen support
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.

9 years agoMake some functions const that by all rights should be
Mikko Rasa [Thu, 19 Nov 2015 09:58:08 +0000 (11:58 +0200)]
Make some functions const that by all rights should be

9 years agoFix exception description
Mikko Rasa [Thu, 19 Nov 2015 09:36:10 +0000 (11:36 +0200)]
Fix exception description

9 years agoMake func a normal argument of Text::process_lines
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.

9 years agoClear dropdown text if the associated list selection is cleared
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.

9 years agoAdd a selection_cleared signal to List
Mikko Rasa [Fri, 6 Mar 2015 00:03:34 +0000 (02:03 +0200)]
Add a selection_cleared signal to List

9 years agoImplement mouse wheel scrolling in List
Mikko Rasa [Fri, 6 Mar 2015 00:02:06 +0000 (02:02 +0200)]
Implement mouse wheel scrolling in List

10 years agoIf the active list item is refreshed, mark it as such
Mikko Rasa [Thu, 13 Nov 2014 21:46:59 +0000 (23:46 +0200)]
If the active list item is refreshed, mark it as such

10 years agoUse a shader for rendering if available
Mikko Rasa [Thu, 13 Nov 2014 21:45:57 +0000 (23:45 +0200)]
Use a shader for rendering if available

10 years agoUse a Camera rather than direct matrix manipulation
Mikko Rasa [Thu, 13 Nov 2014 21:09:33 +0000 (23:09 +0200)]
Use a Camera rather than direct matrix manipulation

10 years agoUse triangle strips instead of quads
Mikko Rasa [Thu, 13 Nov 2014 20:52:18 +0000 (22:52 +0200)]
Use triangle strips instead of quads

10 years agoStyle and comment fixes
Mikko Rasa [Tue, 8 Apr 2014 15:49:09 +0000 (18:49 +0300)]
Style and comment fixes

10 years agoAlways set column widths on the item itself
Mikko Rasa [Wed, 12 Mar 2014 19:20:11 +0000 (21:20 +0200)]
Always set column widths on the item itself

A newly created item gets parented to the List before it appears in its
item array.  As such, the loop inside the if block won't reach it.

10 years agoFix line processing in Text to match autosizing
Mikko Rasa [Wed, 22 Jan 2014 19:51:14 +0000 (21:51 +0200)]
Fix line processing in Text to match autosizing

10 years agoImprove Dropdown list management
Mikko Rasa [Tue, 21 Jan 2014 23:03:31 +0000 (01:03 +0200)]
Improve Dropdown list management

Having the list marked as visible when it shouldn't be could cause trouble
in some corner cases.

There's no need to resize the list if it isn't visible.

10 years agoFix list positioning logic in Dropdown
Mikko Rasa [Tue, 21 Jan 2014 21:16:51 +0000 (23:16 +0200)]
Fix list positioning logic in Dropdown

10 years agoProperly account for margins in sliders
Mikko Rasa [Tue, 21 Jan 2014 21:00:16 +0000 (23:00 +0200)]
Properly account for margins in sliders

10 years agoMove some more common slider code to the base class
Mikko Rasa [Tue, 21 Jan 2014 20:53:24 +0000 (22:53 +0200)]
Move some more common slider code to the base class

10 years agoFix a case where rebuild was called recursively
Mikko Rasa [Sat, 11 Jan 2014 18:06:44 +0000 (20:06 +0200)]
Fix a case where rebuild was called recursively

10 years agoAdd consistency checks to PartCache
Mikko Rasa [Sat, 11 Jan 2014 18:05:51 +0000 (20:05 +0200)]
Add consistency checks to PartCache

10 years agoReuse meshes in PartCache to avoid buffer create/delete spam
Mikko Rasa [Sat, 11 Jan 2014 18:05:15 +0000 (20:05 +0200)]
Reuse meshes in PartCache to avoid buffer create/delete spam

11 years agoFix a segfault when refreshing an item in a list with MultiColumnItems
Mikko Rasa [Mon, 25 Nov 2013 07:56:09 +0000 (09:56 +0200)]
Fix a segfault when refreshing an item in a list with MultiColumnItems

11 years agoDon't rebuild on state change if there are no visual changes
Mikko Rasa [Wed, 20 Nov 2013 17:06:51 +0000 (19:06 +0200)]
Don't rebuild on state change if there are no visual changes

11 years agoRefactor list item positioning code
Mikko Rasa [Wed, 20 Nov 2013 17:04:55 +0000 (19:04 +0200)]
Refactor list item positioning code

This fixes a bug where scrolling didn't quite work properly until each
item had been visible at least once.

11 years agoRefactor child positioning logic
Mikko Rasa [Wed, 20 Nov 2013 15:47:35 +0000 (17:47 +0200)]
Refactor child positioning logic

11 years agoAvoid segfault with a single multi-column item
Mikko Rasa [Wed, 20 Nov 2013 11:24:57 +0000 (13:24 +0200)]
Avoid segfault with a single multi-column item

11 years agoAdd a list item class to manage multiple columns
Mikko Rasa [Fri, 15 Nov 2013 21:23:28 +0000 (23:23 +0200)]
Add a list item class to manage multiple columns

11 years agoSupport floating widgets in layouts
Mikko Rasa [Thu, 7 Nov 2013 12:57:14 +0000 (14:57 +0200)]
Support floating widgets in layouts

An arrangement class that automatically makes widgets floating is also
added.

11 years agoFix some more inefficient autosizes
Mikko Rasa [Thu, 7 Nov 2013 12:33:01 +0000 (14:33 +0200)]
Fix some more inefficient autosizes

11 years agoBetter method of implementing zero gravity
Mikko Rasa [Thu, 7 Nov 2013 08:25:58 +0000 (10:25 +0200)]
Better method of implementing zero gravity

11 years agoAdd getters for layout margin and spacings
Mikko Rasa [Wed, 6 Nov 2013 12:24:27 +0000 (14:24 +0200)]
Add getters for layout margin and spacings

11 years agoFix list autosizing logic
Mikko Rasa [Wed, 6 Nov 2013 11:42:35 +0000 (13:42 +0200)]
Fix list autosizing logic

11 years agoMake autosize_special const and add a const autosize overload
Mikko Rasa [Wed, 6 Nov 2013 11:12:24 +0000 (13:12 +0200)]
Make autosize_special const and add a const autosize overload

This should reduce useless back-and-forth resizing of widgets in several
common patterns.

11 years agoMinor style fixes
Mikko Rasa [Wed, 16 Oct 2013 12:18:16 +0000 (15:18 +0300)]
Minor style fixes

11 years agoMake widgets non-copyable
Mikko Rasa [Wed, 16 Oct 2013 12:17:56 +0000 (15:17 +0300)]
Make widgets non-copyable

11 years agoRemove obsolete inside checks
Mikko Rasa [Wed, 16 Oct 2013 12:12:39 +0000 (15:12 +0300)]
Remove obsolete inside checks

11 years agoMake the DISABLED state actually do something
Mikko Rasa [Wed, 16 Oct 2013 12:09:25 +0000 (15:09 +0300)]
Make the DISABLED state actually do something

11 years agoMake List::set_selected_index a no-op if that item was already selected
Mikko Rasa [Wed, 16 Oct 2013 12:04:49 +0000 (15:04 +0300)]
Make List::set_selected_index a no-op if that item was already selected

11 years agoSupport different font colors in different states
Mikko Rasa [Sun, 22 Sep 2013 15:06:00 +0000 (18:06 +0300)]
Support different font colors in different states

11 years agoAdd a shortcut for defining normal graphic
Mikko Rasa [Sun, 22 Sep 2013 15:05:03 +0000 (18:05 +0300)]
Add a shortcut for defining normal graphic

11 years agoAdd some utility functions for dealing with widget hierarchy
Mikko Rasa [Thu, 8 Aug 2013 16:02:10 +0000 (19:02 +0300)]
Add some utility functions for dealing with widget hierarchy

11 years agoAdd datafile statement for image widgets
Mikko Rasa [Tue, 30 Jul 2013 15:56:09 +0000 (18:56 +0300)]
Add datafile statement for image widgets

11 years agoEnsure that list items are autosized properly in all cases
Mikko Rasa [Sun, 14 Jul 2013 12:01:28 +0000 (15:01 +0300)]
Ensure that list items are autosized properly in all cases

11 years agoRetain position when autosizing widget
Mikko Rasa [Sun, 14 Jul 2013 11:20:17 +0000 (14:20 +0300)]
Retain position when autosizing widget

11 years agoFix an uninitialized variable
Mikko Rasa [Fri, 5 Jul 2013 15:27:34 +0000 (18:27 +0300)]
Fix an uninitialized variable

11 years agoUse a different approach for custom item widgets
Mikko Rasa [Sun, 30 Jun 2013 21:03:38 +0000 (00:03 +0300)]
Use a different approach for custom item widgets

Subclassed widgets can't be loaded from datafiles without providing custom
statements.  Dropdown doesn't allow changing the type of the List either.

11 years agoFix a comparison that let an off-by-one error in
Mikko Rasa [Sun, 30 Jun 2013 21:01:57 +0000 (00:01 +0300)]
Fix a comparison that let an off-by-one error in

11 years agoRefresh list items one at a time
Mikko Rasa [Sun, 30 Jun 2013 20:59:03 +0000 (23:59 +0300)]
Refresh list items one at a time

A blanket update doesn't work so well with items as widgets.

11 years agoRecreate list items when setting data
Mikko Rasa [Sun, 30 Jun 2013 20:41:19 +0000 (23:41 +0300)]
Recreate list items when setting data

11 years agoSome new datafile keywords
Mikko Rasa [Fri, 28 Jun 2013 20:20:49 +0000 (23:20 +0300)]
Some new datafile keywords