simplified and cleaned up wxGTK's focus handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,8 +94,6 @@ public:
|
||||
// From wxComboBoxBase:
|
||||
virtual int GetCurrentSelection() const;
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
void OnChar( wxKeyEvent &event );
|
||||
|
||||
// Standard event handling
|
||||
|
@@ -128,17 +128,12 @@ public:
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
void SetFocus();
|
||||
void GtkDisableEvents();
|
||||
void GtkEnableEvents();
|
||||
#if wxUSE_TOOLTIPS
|
||||
void ApplyToolTip( GtkTooltips *tips, const gchar *tip );
|
||||
#endif // wxUSE_TOOLTIPS
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
|
||||
bool m_hasFocus,
|
||||
m_lostFocus;
|
||||
wxRadioBoxButtonsInfoList m_buttonsInfo;
|
||||
|
||||
protected:
|
||||
@@ -151,12 +146,11 @@ protected:
|
||||
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||
|
||||
virtual bool GTKNeedsToFilterSameWindowFocus() const { return true; }
|
||||
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
};
|
||||
|
@@ -186,7 +186,17 @@ public:
|
||||
|
||||
GdkWindow* GTKGetDrawingWindow() const;
|
||||
|
||||
bool GTKHandleFocusIn();
|
||||
bool GTKHandleFocusOut();
|
||||
void GTKHandleFocusOutNoDeferring();
|
||||
static void GTKHandleDeferredFocusOut();
|
||||
|
||||
protected:
|
||||
// for controls composed of multiple GTK widgets, return true to eliminate
|
||||
// spurious focus events if the focus changes between GTK+ children within
|
||||
// the same wxWindow
|
||||
virtual bool GTKNeedsToFilterSameWindowFocus() const { return false; }
|
||||
|
||||
// Override GTKWidgetNeedsMnemonic and return true if your
|
||||
// needs to set its mnemonic widget, such as for a
|
||||
// GtkLabel for wxStaticText, then do the actual
|
||||
@@ -206,12 +216,6 @@ protected:
|
||||
// Check if the given window makes part of this widget
|
||||
bool GTKIsOwnWindow(GdkWindow *window) const;
|
||||
|
||||
// Set the focus to this window if its setting was delayed because the
|
||||
// widget hadn't been realized when SetFocus() was called
|
||||
//
|
||||
// Return true if focus was set to us, false if nothing was done
|
||||
bool GTKSetDelayedFocusIfNeeded();
|
||||
|
||||
public:
|
||||
// Returns the default context which usually is anti-aliased
|
||||
PangoContext *GtkGetPangoDefaultContext();
|
||||
@@ -287,7 +291,6 @@ public:
|
||||
bool m_noExpose:1; // wxGLCanvas has its own redrawing
|
||||
bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size"
|
||||
bool m_hasVMT:1;
|
||||
bool m_hasFocus:1; // true if == FindFocus()
|
||||
bool m_isScrolling:1; // dragging scrollbar thumb?
|
||||
bool m_clipPaintRegion:1; // true after ScrollWindow()
|
||||
wxRegion m_nativeUpdateRegion; // not transformed for RTL
|
||||
|
Reference in New Issue
Block a user