X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0368d28bf125cdc851e65e1ea215651f19453d2..e5805c0fde8bfabee79b155fbea761398efa4fc0:/include/wx/generic/spinctlg.h diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 41fc00cb1b..4360c9395c 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -92,6 +92,10 @@ public: void OnTextEnter(wxCommandEvent& event); void OnTextChar(wxKeyEvent& event); + // this window itself is used only as a container for its sub windows so it + // shouldn't accept the focus at all + virtual bool AcceptsFocus() const { return false; } + friend class wxSpinCtrlTextGeneric; protected: @@ -105,8 +109,13 @@ protected: void DoSetRange(double min_val, double max_val); void DoSetIncrement(double inc); - // Ensure that the textctrl shows correct value - void SyncSpinToText(); + // update our value to reflect the text control contents (if it has been + // modified by user, do nothing otherwise) + // + // can also change the text control if its value is invalid + // + // return true if our value has changed + bool SyncSpinToText(); // Send the correct event type virtual void DoSendEvent() = 0;