diff options
author | Sebastian Geerken <devnull@localhost> | 2014-05-06 20:23:53 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-05-06 20:23:53 +0200 |
commit | 5e8dec509c8402a8f761e3156bd22278c332c5fc (patch) | |
tree | 41a62bd0d660b93a5758a9b36cbfb6e6046f741d /dw/layout.hh | |
parent | e0d27594996a9aca98ae1c25b64f14ff2dfeb1de (diff) |
New signal "resizeQueued" for Layout. It is used by ComplexButtonResource, instead of "canvasSizeChange"; this seems to fix a CPU hogging problem.
Diffstat (limited to 'dw/layout.hh')
-rw-r--r-- | dw/layout.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/dw/layout.hh b/dw/layout.hh index 6b6ceadb..2120d877 100644 --- a/dw/layout.hh +++ b/dw/layout.hh @@ -42,11 +42,12 @@ public: /** * \brief Receiver interface different signals. * - * May be extended + * May be extended. */ class Receiver: public lout::signal::Receiver { public: + virtual void resizeQueued (bool extremesChanged); virtual void canvasSizeChanged (int width, int ascent, int descent); }; @@ -126,7 +127,7 @@ private: class Emitter: public lout::signal::Emitter { private: - enum { CANVAS_SIZE_CHANGED }; + enum { RESIZE_QUEUED, CANVAS_SIZE_CHANGED }; protected: bool emitToReceiver (lout::signal::Receiver *receiver, int signalNo, @@ -135,6 +136,7 @@ private: public: inline void connectLayout (Receiver *receiver) { connect (receiver); } + void emitResizeQueued (bool extremesChanged); void emitCanvasSizeChanged (int width, int ascent, int descent); }; @@ -252,7 +254,7 @@ private: void queueDraw (int x, int y, int width, int height); void queueDrawExcept (int x, int y, int width, int height, int ex, int ey, int ewidth, int eheight); - void queueResize (); + void queueResize (bool extremesChanged); void removeWidget (); /* For tests regarding the respective Layout and (mostly) Widget |