Checkbox class added to simplify event handling. (issue #3739)
This commit is contained in:
@@ -290,24 +290,6 @@ public:
|
||||
MyScrolledWindow();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief subclass of Gtk::CheckButton in order to handle the last active state
|
||||
*/
|
||||
class MyCheckButton : public Gtk::CheckButton
|
||||
{
|
||||
|
||||
bool lastActive = false;
|
||||
sigc::connection myConnection;
|
||||
public:
|
||||
using CheckButton::CheckButton;
|
||||
void setLastActive() {lastActive = get_active();};
|
||||
void setLastActive(bool active) {lastActive = active;};
|
||||
bool getLastActive() {return lastActive;};
|
||||
void connect(const sigc::connection &connection) {myConnection = connection;};
|
||||
void block(bool blocked) {myConnection.block(blocked);};
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief subclass of Gtk::ComboBox in order to handle the scrollwheel
|
||||
*/
|
||||
@@ -341,8 +323,8 @@ public:
|
||||
MyComboBoxText (bool has_entry = false);
|
||||
|
||||
void setPreferredWidth (int minimum_width, int natural_width);
|
||||
void connect(const sigc::connection &connection) {myConnection = connection;};
|
||||
void block(bool blocked) {myConnection.block(blocked);};
|
||||
void connect(const sigc::connection &connection) { myConnection = connection; }
|
||||
void block(bool blocked) { myConnection.block(blocked); }
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user