| 172 | |
| 173 | |
| 174 | void AButton::Init(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, bool toggle) |
| 175 | { |
| 176 | SetBackgroundStyle(wxBG_STYLE_PAINT); |
| 177 | SetBackgroundColour(theTheme.Colour(clrMedium)); |
| 178 | |
| 179 | // Bug in wxWidgets 2.8.12: by default pressing Enter on an AButton is interpreted as |
| 180 | // a navigation event - move to next control. As a workaround, the style wxWANTS_CHARS |
| 181 | // results in all characters being available in the OnKeyDown function below. Note |
| 182 | // that OnKeyDown now has to handle navigation. |
| 183 | Create(parent, id, pos, size, wxWANTS_CHARS); |
| 184 | |
| 185 | mToggle = toggle; |
| 186 | |
| 187 | mFocusRect = GetClientRect().Deflate( 3, 3 ); |
| 188 | |
| 189 | #if wxUSE_ACCESSIBILITY |
| 190 | SetName( wxT("") ); |
| 191 | SetAccessible(safenew AButtonAx(this)); |
| 192 | #endif |
| 193 | } |
| 194 | |
| 195 | void AButton::UseDisabledAsDownHiliteImage(bool flag) |
| 196 | { |
no test coverage detected