]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/window.h
ifdef out some wxGTK specific code
[wxWidgets.git] / include / wx / gtk / window.h
index 6f0da39f997d43333b87f2b2477a6b5f7db67473..36ff555db3cf2aa757c83209ba3a8347199c06c6 100644 (file)
@@ -76,10 +76,10 @@ public:
            long style = 0,
            const wxString& name = wxPanelNameStr);
   virtual ~wxWindow();
            long style = 0,
            const wxString& name = wxPanelNameStr);
   virtual ~wxWindow();
-  
+
   virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL);
   virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL);
   virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL);
   virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL);
-  
+
   bool Close( bool force = FALSE );
   virtual bool Destroy();
   virtual bool DestroyChildren();
   bool Close( bool force = FALSE );
   virtual bool Destroy();
   virtual bool DestroyChildren();
@@ -95,7 +95,11 @@ public:
   virtual void GetClientSize( int *width, int *height ) const;
   virtual void GetPosition( int *x, int *y ) const;
   virtual void Centre( int direction = wxHORIZONTAL );
   virtual void GetClientSize( int *width, int *height ) const;
   virtual void GetPosition( int *x, int *y ) const;
   virtual void Centre( int direction = wxHORIZONTAL );
+  inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
   virtual void Fit();
   virtual void Fit();
+    // set minimal/maxmimal size for the frame
+  virtual void SetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), int WXUNUSED(maxW),
+    int WXUNUSED(maxH), int WXUNUSED(incW),  int WXUNUSED(incH) ) { }
 
   void OnSize( wxSizeEvent &event );
   void OnIdle( wxIdleEvent& event );
 
   void OnSize( wxSizeEvent &event );
   void OnIdle( wxIdleEvent& event );
@@ -103,7 +107,8 @@ public:
   virtual bool Show( bool show );
   virtual void Enable( bool enable );
   virtual void MakeModal( bool modal );
   virtual bool Show( bool show );
   virtual void Enable( bool enable );
   virtual void MakeModal( bool modal );
-  virtual bool IsEnabled() const { return m_isEnabled; };
+  virtual bool IsEnabled() const { return m_isEnabled; }
+  inline bool Enabled(void) const { return IsEnabled(); }
   virtual void SetFocus();
   virtual bool OnClose();
 
   virtual void SetFocus();
   virtual bool OnClose();
 
@@ -112,7 +117,12 @@ public:
   virtual void RemoveChild( wxWindow *child );
   void SetReturnCode( int retCode );
   int GetReturnCode();
   virtual void RemoveChild( wxWindow *child );
   void SetReturnCode( int retCode );
   int GetReturnCode();
-  wxWindow *GetParent();
+  wxWindow *GetParent() const
+    { return m_parent; }
+  wxWindow *GetGrandParent(void) const
+    { return (m_parent ? m_parent->m_parent : (wxWindow*)NULL); }
+  void SetParent( wxWindow *p )
+    { m_parent = p; }
 
   wxEvtHandler *GetEventHandler();
   void SetEventHandler( wxEvtHandler *handler );
 
   wxEvtHandler *GetEventHandler();
   void SetEventHandler( wxEvtHandler *handler );
@@ -139,14 +149,21 @@ public:
   virtual wxColour GetForegroundColour() const;
   virtual void SetForegroundColour( const wxColour &colour );
 
   virtual wxColour GetForegroundColour() const;
   virtual void SetForegroundColour( const wxColour &colour );
 
+  virtual int GetCharHeight(void) const;
+  virtual int GetCharWidth(void) const;
+  virtual void GetTextExtent( const wxString& string, int *x, int *y,
+                             int *descent = NULL,
+                             int *externalLeading = NULL,
+                             const wxFont *theFont = NULL, bool use16 = FALSE) const;
+
   virtual void SetDefaultBackgroundColour( const wxColour& col )
   virtual void SetDefaultBackgroundColour( const wxColour& col )
-    { m_defaultBackgroundColour = col; };
+    { m_defaultBackgroundColour = col; }
   virtual wxColour GetDefaultBackgroundColour() const
   virtual wxColour GetDefaultBackgroundColour() const
-    { return m_defaultBackgroundColour; };
+    { return m_defaultBackgroundColour; }
   virtual void SetDefaultForegroundColour( const wxColour& col )
   virtual void SetDefaultForegroundColour( const wxColour& col )
-    { m_defaultForegroundColour = col; };
+    { m_defaultForegroundColour = col; }
   virtual wxColour GetDefaultForegroundColour() const
   virtual wxColour GetDefaultForegroundColour() const
-    { return m_defaultForegroundColour; };
+    { return m_defaultForegroundColour; }
 
   virtual void SetFont( const wxFont &font );
   virtual wxFont *GetFont();
 
   virtual void SetFont( const wxFont &font );
   virtual wxFont *GetFont();
@@ -185,15 +202,16 @@ public:
   virtual bool TransferDataFromWindow();
   void OnInitDialog( wxInitDialogEvent &event );
   virtual void InitDialog();
   virtual bool TransferDataFromWindow();
   void OnInitDialog( wxInitDialogEvent &event );
   virtual void InitDialog();
-  
+
   virtual bool PopupMenu( wxMenu *menu, int x, int y );
 
   virtual void SetDropTarget( wxDropTarget *dropTarget );
   virtual wxDropTarget *GetDropTarget() const;
   virtual bool PopupMenu( wxMenu *menu, int x, int y );
 
   virtual void SetDropTarget( wxDropTarget *dropTarget );
   virtual wxDropTarget *GetDropTarget() const;
-  
-private:
+
+//private:
   virtual GtkWidget* GetConnectWidget(void);
   virtual GtkWidget* GetConnectWidget(void);
-  
+  virtual bool IsOwnGtkWindow( GdkWindow *window );
+
 public:
   virtual void SetScrollbar( int orient, int pos, int thumbVisible,
     int range, bool refresh = TRUE );
 public:
   virtual void SetScrollbar( int orient, int pos, int thumbVisible,
     int range, bool refresh = TRUE );
@@ -209,7 +227,7 @@ public:
   // update the UI state (called from OnIdle)
   void UpdateWindowUI();
 
   // update the UI state (called from OnIdle)
   void UpdateWindowUI();
 
-  
+
 public:         // cannot get private going yet
 
   void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
 public:         // cannot get private going yet
 
   void PreCreation( wxWindow *parent, wxWindowID id, const wxPoint &pos,
@@ -218,7 +236,6 @@ public:         // cannot get private going yet
   bool HasVMT();
   virtual void ImplementSetSize();
   virtual void ImplementSetPosition();
   bool HasVMT();
   virtual void ImplementSetSize();
   virtual void ImplementSetPosition();
-  void GetDrawingOffset( long *x, long *y );
 
   wxWindow       *m_parent;
   wxList          m_children;
 
   wxWindow       *m_parent;
   wxList          m_children;
@@ -240,7 +257,6 @@ public:         // cannot get private going yet
   bool            m_isShown;
   bool            m_isEnabled;
   wxString        m_windowName;
   bool            m_isShown;
   bool            m_isEnabled;
   wxString        m_windowName;
-  long            m_drawingOffsetX,m_drawingOffsetY;
 
   GtkWidget      *m_widget;
   GtkWidget      *m_wxwindow;
 
   GtkWidget      *m_widget;
   GtkWidget      *m_wxwindow;