X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e1f50128a73bd61db8ee0077b631ada9486158a..13199c3dcbb708f859aeae6b480459b7b9bb9a9d:/include/wx/gtk/window.h diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 44b7940a8e..3d09ab6a20 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -156,6 +156,7 @@ public: virtual bool IsOwnGtkWindow( GdkWindow *window ); void ConnectWidget( GtkWidget *widget ); +protected: // Override GTKWidgetNeedsMnemonic and return true if your // needs to set its mnemonic widget, such as for a // GtkLabel for wxStaticText, then do the actual @@ -163,6 +164,7 @@ public: virtual bool GTKWidgetNeedsMnemonic() const; virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); +public: // Returns the default context which usually is anti-aliased PangoContext *GtkGetPangoDefaultContext(); @@ -170,10 +172,6 @@ public: virtual void ApplyToolTip( GtkTooltips *tips, const wxChar *tip ); #endif // wxUSE_TOOLTIPS - // Call after modifing the value of m_hAdjust or m_vAdjust to bring the - // scrolbar in sync (this does not generate any wx events) - void GtkUpdateScrollbar(int orient); - // Called from GTK signal handlers. it indicates that // the layouting functions have to be called later on // (i.e. in idle time, implemented in OnInternalIdle() ). @@ -190,6 +188,12 @@ public: // is this a radiobutton (used by radiobutton code itself only)? virtual bool IsRadioButton() const { return false; } + // Common scroll event handling code for wxWindow and wxScrollBar + wxEventType GetScrollEventType(GtkRange* range); + + void BlockScrollEvent(); + void UnblockScrollEvent(); + // position and size of the window int m_x, m_y; int m_width, m_height; @@ -204,10 +208,10 @@ public: wxGtkIMData *m_imData; - // scrolling stuff - GtkAdjustment *m_hAdjust,*m_vAdjust; - float m_oldHorizontalPos; - float m_oldVerticalPos; + // horizontal/vertical scroll bar + GtkRange* m_scrollBar[2]; + // horizontal/vertical scroll position + double m_scrollPos[2]; // extra (wxGTK-specific) flags bool m_needParent:1; // ! wxFrame, wxDialog, wxNotebookPage ? @@ -225,6 +229,8 @@ public: // chain needs update bool m_needsStyleChange:1; // May not be able to change // background style until OnIdle + bool m_mouseButtonDown:1; + bool m_blockScrollEvent:1; // C++ has no virtual methods in the constrcutor of any class but we need // different methods of inserting a child window into a wxFrame, @@ -277,9 +283,8 @@ protected: // ApplyWidgetStyle -- override this, not ApplyWidgetStyle virtual void DoApplyWidgetStyle(GtkRcStyle *style); -protected: - // GtkAdjustment to be used by Scroll{Lines,Pages} - void SetVScrollAdjustment(GtkAdjustment* adj); + // sets the border of a given GtkScrolledWindow from a wx style + static void GtkScrolledWindowSetBorder(GtkWidget* w, int style); private: DECLARE_DYNAMIC_CLASS(wxWindowGTK)