Add RAII listener blocking utility
* Added for ToolPanel listener and Adjuster * Follows style of ConnectionBlocker for sigc::connection
This commit is contained in:
@@ -45,7 +45,9 @@ struct CropParams;
|
||||
|
||||
}
|
||||
|
||||
class Adjuster;
|
||||
class RTImage;
|
||||
class ToolPanel;
|
||||
|
||||
Glib::ustring escapeHtmlChars(const Glib::ustring &src);
|
||||
bool removeIfThere (Gtk::Container* cont, Gtk::Widget* w, bool increference = true);
|
||||
@@ -161,6 +163,26 @@ private:
|
||||
bool wasBlocked;
|
||||
};
|
||||
|
||||
class BlockAdjusterEvents
|
||||
{
|
||||
public:
|
||||
explicit BlockAdjusterEvents(Adjuster* adjuster);
|
||||
~BlockAdjusterEvents();
|
||||
|
||||
private:
|
||||
Adjuster* adj;
|
||||
};
|
||||
|
||||
class DisableListener
|
||||
{
|
||||
public:
|
||||
explicit DisableListener(ToolPanel* panelToDisable);
|
||||
~DisableListener();
|
||||
|
||||
private:
|
||||
ToolPanel* panel;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Glue box to control visibility of the MyExpender's content ; also handle the frame around it
|
||||
*/
|
||||
|
Reference in New Issue
Block a user