]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/window.h
Set/GetTitle out of wxWindowBase, forked and put to gtk/window.h and mgl/window.h...
[wxWidgets.git] / include / wx / window.h
index 7c90cd042d91324712668c12e3ee1f2a4d423ddc..bdc25cdb64282bc1879cf07b1b50aab5fb9f8331 100644 (file)
@@ -172,8 +172,8 @@ public:
 
         // the title (or label, see below) of the window: the text which the
         // window shows
-    virtual void SetTitle( const wxString & WXUNUSED(title) ) { }
-    virtual wxString GetTitle() const { return ""; }
+    virtual void SetTitle( const wxString& title ) = 0;
+    virtual wxString GetTitle() const = 0;
 
         // label is just the same as the title (but for, e.g., buttons it
         // makes more sense to speak about labels)
@@ -663,6 +663,18 @@ public:
     virtual void ScrollWindow( int dx, int dy,
                                const wxRect* rect = (wxRect *) NULL ) = 0;
 
+        // scrolls window by line/page: note that not all controls support this
+        //
+        // return TRUE if the position changed, FALSE otherwise
+    virtual bool ScrollLines(int WXUNUSED(lines)) { return FALSE; }
+    virtual bool ScrollPages(int WXUNUSED(pages)) { return FALSE; }
+
+        // convenient wrappers for ScrollLines/Pages
+    bool LineUp() { return ScrollLines(-1); }
+    bool LineDown() { return ScrollLines(1); }
+    bool PageUp() { return ScrollPages(-1); }
+    bool PageDown() { return ScrollPages(1); }
+
     // context-sensitive help
     // ----------------------
 
@@ -774,7 +786,7 @@ protected:
     // the window id - a number which uniquely identifies a window among
     // its siblings unless it is -1
     wxWindowID           m_windowId;
-
+    
     // the parent window of this window (or NULL) and the list of the children
     // of this window
     wxWindow            *m_parent;
@@ -984,7 +996,7 @@ private:
         #define sm_classwxWindowGTK sm_classwxWindow
     #endif // wxUniv
     #include "wx/gtk/window.h"
-#elif defined(__WXGL__)
+#elif defined(__WXMGL__)
     #ifdef __WXUNIVERSAL__
         #define wxWindowNative wxWindowMGL
     #else // !wxUniv