Maarten ter Huurne
fe0db484ec
Removed "delegate.h"
...
The abstraction it provided was so thin that I think it is simpler to
just have the code use std::bind directly.
2014-08-16 07:07:41 +02:00
Maarten ter Huurne
7e308879c1
Pass action to IconButton constructor
...
This removes the need for a separate setAction method.
The default action is the empty action, which does nothing. However,
a touch event on a button with the empty action is no longer considered
handled.
Menu::btnContextMenu was changed from a unique_ptr to a plain data
member.
2014-08-16 06:44:13 +02:00
Maarten ter Huurne
e5a432cb6b
In C++11, it is no longer necessary to avoid ">>" in nested templates
2014-08-16 05:42:39 +02:00
Maarten ter Huurne
d66ca947c4
Store Menu's Monitors in unique_ptrs
...
This results in a small code reduction and some ease of mind.
2014-08-15 13:56:20 +02:00
Maarten ter Huurne
b15175b05b
Require valid section index passed to Menu::addActionLink
...
All calls to this method are in GMenu2X::initMenu() and they will only
pass valid indices, so the range check was redundant. Also the return
value was never used.
Added an assert to spot any invalid indices from future code.
2014-08-12 06:42:58 +02:00
Paul Cercueil
8bb58f6270
Sort links once they have all been added to the menu
2014-01-19 23:07:54 +01:00
Paul Cercueil
5eb8fb7fd7
Revert "When started, load all OPKs in a thread to boost startup time"
...
Loading dynamically at startup is a very bad idea, as it
confuses the "load state before exiting" feature of GMenu2X:
the file selector will pass the file to a different program,
the cursor will move to select a different app, etc.
This reverts commit 5c631d610e
.
2013-08-28 13:49:08 -04:00
Paul Cercueil
5c631d610e
When started, load all OPKs in a thread to boost startup time
2013-08-28 13:25:10 -04:00
Maarten ter Huurne
90afa096e7
Query animation status instead of storing it
...
This makes it a lot easier to support more than one possible animation
in the same layer.
2013-08-12 19:41:56 +02:00
Maarten ter Huurne
8de59b5c04
Animate section header changes
2013-08-11 05:17:12 +02:00
Maarten ter Huurne
71f4391cda
Moved all code for opening the context menu into the Menu class
...
All of the entries in the context menu affect sections and links, so
the context menu should be considered part of the main menu, not of
the global / background context.
2013-08-09 19:09:57 +02:00
Maarten ter Huurne
6d868a895a
Implemented layer system for painting and events
...
The long term goal is to be able to use a single event loop regardless
of which submenu or alternative mode is active.
2013-08-06 01:55:32 +02:00
Maarten ter Huurne
074668336e
Handle menu-related buttons inside Menu class
2013-08-05 16:43:22 +02:00
Maarten ter Huurne
e6300ab07a
Changed section headers to be displayed in a circular fashion
...
Instead of having a list and wrapping between beginning and end, always
put the current section in the middle and show the previous and next
sections using wrap-around.
2013-08-05 14:54:42 +02:00
Maarten ter Huurne
bdf3cfdf86
Moved linkColumns and linkRows fields into Menu class
2013-08-05 00:51:36 +02:00
Maarten ter Huurne
41b0551595
Moved menu touch handling code into Menu class
2013-08-04 23:19:15 +02:00
Maarten ter Huurne
1eeba171dd
Moved menu painting code into Menu class
2013-08-04 21:14:29 +02:00
Paul Cercueil
88f54e1ccc
Drop incredibly dirty and huge file FastDelegate.h
...
It's way too over-engineered for what we need to do, and we can
do much simpler using C++11.
2013-07-29 12:58:25 -04:00
Paul Cercueil
84a987e9d5
When loading multiple OPKs, don't order links each time one is added
2013-07-19 12:50:20 -04:00
Paul Cercueil
69b9657af4
Add function openPackagesFromDir() to simplify constructor of Menu
2013-07-19 12:01:25 -04:00
Paul Cercueil
bcb3e98ddc
Order the links in alphabetical order
2013-07-18 17:38:09 -04:00
Paul Cercueil
13b3d8e0ca
Monitor OPK folders using inotify and automatically add/delete links
2013-07-16 13:36:18 -04:00
Paul Cercueil
78ad051756
Split huge function readPackages into two functions
2013-07-10 18:57:56 -04:00
Paul Cercueil
cd4809343b
During init, load all packages in CARD_ROOT/*/apps
2012-10-07 21:51:25 +02:00
Maarten ter Huurne
57ad81e3df
Merged LinkAction class into its base class.
...
LinkApp now calls its launch method via the delegate mechanism instead of
via an overridden virtual method. This should make it easier to move the
launch method out of LinkApp and into the GMenu2X main class.
2012-03-24 11:57:21 +01:00
Maarten ter Huurne
1ad6b2f25a
Made GMenu2X::ts private.
...
Pass Touchscreen reference to constructors instead of pulling it from
the GMenu2X class.
2011-12-23 14:03:05 +01:00
Maarten ter Huurne
a01d892eb6
More header cleanups.
...
This time the focus was on removing namespace imports from headers.
2011-10-23 16:43:56 +02:00
Ayla
f7817b19ab
The links will now be loaded from both the system and the user-specific directories.
2011-07-11 02:49:44 +02:00
Maarten ter Huurne
8a9aac028b
Converted public fields of Menu to private.
2010-07-27 21:12:15 +02:00
Lars-Peter Clausen
8b862b8398
Unify filedialog and browsedialog code
2010-05-03 19:58:28 +02:00
Lars-Peter Clausen
40a26e1a9c
pass strings by reference where possible
2010-05-02 14:38:16 +02:00
Mirko Lindner
cddcd72e33
initial commit - needs clean-up
...
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-04 12:33:47 +01:00