diff options
author | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:31:24 +0100 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2016-03-16 21:31:24 +0100 |
commit | 89621addb4a7c87d2e3f3e7462e3c690cf71de71 (patch) | |
tree | 008b5dea7624ee1eeb57ff82c45fdf1afcab3b08 /wx+/toggle_button.h | |
parent | 7.5 (diff) | |
download | FreeFileSync-89621addb4a7c87d2e3f3e7462e3c690cf71de71.tar.gz FreeFileSync-89621addb4a7c87d2e3f3e7462e3c690cf71de71.tar.bz2 FreeFileSync-89621addb4a7c87d2e3f3e7462e3c690cf71de71.zip |
7.6
Diffstat (limited to 'wx+/toggle_button.h')
-rw-r--r-- | wx+/toggle_button.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/wx+/toggle_button.h b/wx+/toggle_button.h index faa72f66..a440a76d 100644 --- a/wx+/toggle_button.h +++ b/wx+/toggle_button.h @@ -4,8 +4,8 @@ // * Copyright (C) Zenju (zenju AT gmx DOT de) - All Rights Reserved * // ************************************************************************** -#ifndef TOGGLEBUTTON_H_INCLUDED -#define TOGGLEBUTTON_H_INCLUDED +#ifndef TOGGLE_BUTTON_H_8173024810574556 +#define TOGGLE_BUTTON_H_8173024810574556 #include <wx/bmpbuttn.h> #include <wx+/bitmap_button.h> @@ -20,9 +20,7 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxButtonNameStr) : - wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name), - active(false) + const wxString& name = wxButtonNameStr) : wxBitmapButton(parent, id, bitmap, pos, size, style, validator, name) { SetLayoutDirection(wxLayout_LeftToRight); //avoid mirroring RTL languages like Hebrew or Arabic } @@ -35,7 +33,7 @@ public: void toggle() { setActive(!active); } private: - bool active; + bool active = false; wxBitmap activeBmp_; wxBitmap inactiveBmp_; @@ -47,12 +45,6 @@ private: - - - - - - //######################## implementation ######################## inline void ToggleButton::init(const wxBitmap& activeBmp, @@ -72,4 +64,4 @@ void ToggleButton::setActive(bool value) zen::setImage(*this, active ? activeBmp_ : inactiveBmp_); } -#endif // TOGGLEBUTTON_H_INCLUDED +#endif //TOGGLE_BUTTON_H_8173024810574556 |