]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/univ/stdrend.h
implemented SetFocus
[wxWidgets.git] / include / wx / univ / stdrend.h
index 91c57a3961752a88f843e18eda240199ef7464d3..9aad13670f31557cc4faa4852f06782e378218d0 100644 (file)
@@ -83,6 +83,11 @@ public:
                           const wxString& label,
                           const wxRect& rect,
                           int flags = 0);
+    virtual void DrawCheckItem(wxDC& dc,
+                               const wxString& label,
+                               const wxBitmap& bitmap,
+                               const wxRect& rect,
+                               int flags = 0);
 
     virtual void DrawCheckButton(wxDC& dc,
                                  const wxString& label,
@@ -99,6 +104,13 @@ public:
                                  wxAlignment align = wxALIGN_LEFT,
                                  int indexAccel = -1);
 
+    virtual void DrawScrollbarArrow(wxDC& dc,
+                                    wxDirection dir,
+                                    const wxRect& rect,
+                                    int flags = 0);
+    virtual void DrawScrollCorner(wxDC& dc,
+                                  const wxRect& rect);
+
 #if wxUSE_TEXTCTRL
     virtual void DrawTextLine(wxDC& dc,
                               const wxString& text,
@@ -108,12 +120,22 @@ public:
                               int flags = 0);
 
     virtual void DrawLineWrapMark(wxDC& dc, const wxRect& rect);
+
+    virtual wxRect GetTextTotalArea(const wxTextCtrl *text,
+                                    const wxRect& rect) const;
+    virtual wxRect GetTextClientArea(const wxTextCtrl *text,
+                                     const wxRect& rect,
+                                     wxCoord *extraSpaceBeyond) const;
 #endif // wxUSE_TEXTCTRL
 
     virtual wxRect GetBorderDimensions(wxBorder border) const;
 
     virtual bool AreScrollbarsInsideBorder() const;
 
+    virtual void AdjustSize(wxSize *size, const wxWindow *window);
+
+    virtual wxCoord GetListboxItemHeight(wxCoord fontHeight);
+
 #if wxUSE_SCROLLBAR
     virtual wxRect GetScrollbarRect(const wxScrollBar *scrollbar,
                                     wxScrollBar::Element elem,
@@ -129,13 +151,92 @@ public:
     virtual int PixelToScrollbar(const wxScrollBar *scrollbar, wxCoord coord);
 #endif // wxUSE_SCROLLBAR
 
+#if wxUSE_STATUSBAR
+    virtual void DrawStatusField(wxDC& dc,
+                                 const wxRect& rect,
+                                 const wxString& label,
+                                 int flags = 0, int style = 0);
+
+    virtual wxSize GetStatusBarBorders(wxCoord *borderBetweenFields) const;
+#endif // wxUSE_STATUSBAR
+
+    virtual wxCoord GetCheckItemMargin() const { return 0; }
+
+
+    virtual void DrawFrameTitleBar(wxDC& dc,
+                                   const wxRect& rect,
+                                   const wxString& title,
+                                   const wxIcon& icon,
+                                   int flags,
+                                   int specialButton = 0,
+                                   int specialButtonFlag = 0);
+    virtual void DrawFrameBorder(wxDC& dc,
+                                 const wxRect& rect,
+                                 int flags);
+    virtual void DrawFrameBackground(wxDC& dc,
+                                     const wxRect& rect,
+                                     int flags);
+    virtual void DrawFrameTitle(wxDC& dc,
+                                const wxRect& rect,
+                                const wxString& title,
+                                int flags);
+    virtual void DrawFrameIcon(wxDC& dc,
+                               const wxRect& rect,
+                               const wxIcon& icon,
+                               int flags);
+    virtual void DrawFrameButton(wxDC& dc,
+                                 wxCoord x, wxCoord y,
+                                 int button,
+                                 int flags = 0);
+
+    virtual wxRect GetFrameClientArea(const wxRect& rect, int flags) const;
+
+    virtual wxSize GetFrameTotalSize(const wxSize& clientSize, int flags) const;
+
+    virtual wxSize GetFrameMinSize(int flags) const;
+
+    virtual wxSize GetFrameIconSize() const;
+
+    virtual int HitTestFrame(const wxRect& rect,
+                             const wxPoint& pt,
+                             int flags = 0) const;
 protected:
     // various constants
+    enum ArrowDirection
+    {
+        Arrow_Left,
+        Arrow_Right,
+        Arrow_Up,
+        Arrow_Down,
+        Arrow_Max
+    };
+
+    enum ArrowStyle
+    {
+        Arrow_Normal,
+        Arrow_Disabled,
+        Arrow_Pressed,
+        Arrow_Inverted,
+        Arrow_InvertedDisabled,
+        Arrow_StateMax
+    };
+
+    enum FrameButtonType
+    {
+        FrameButton_Close,
+        FrameButton_Minimize,
+        FrameButton_Maximize,
+        FrameButton_Restore,
+        FrameButton_Help,
+        FrameButton_Max
+    };
+
     enum IndicatorType
     {
         IndicatorType_Check,
         IndicatorType_Radio,
-        IndicatorType_Menu,
+        IndicatorType_MaxCtrl,
+        IndicatorType_Menu = IndicatorType_MaxCtrl,
         IndicatorType_Max
     };
 
@@ -165,6 +266,10 @@ protected:
                                        IndicatorState& state,
                                        IndicatorStatus& status);
 
+    // translate wxDirection to ArrowDirection
+    static ArrowDirection GetArrowDirection(wxDirection dir);
+
+
     // fill the rectangle with a brush of given colour (must be valid)
     void DrawSolidRect(wxDC& dc, const wxColour& col, const wxRect& rect);
 
@@ -184,6 +289,9 @@ protected:
     virtual void DrawRaisedBorder(wxDC& dc, wxRect *rect);
     virtual void DrawSunkenBorder(wxDC& dc, wxRect *rect);
     virtual void DrawAntiSunkenBorder(wxDC& dc, wxRect *rect);
+    virtual void DrawBoxBorder(wxDC& dc, wxRect *rect);
+    virtual void DrawStaticBorder(wxDC& dc, wxRect *rect);
+    virtual void DrawExtraBorder(wxDC& dc, wxRect *rect);
 
 
     // draw the frame with non-empty label inside the given rectText
@@ -201,6 +309,13 @@ protected:
                                const wxRect& rectLabel);
 
 
+    // draw the bitmap for a check item (which is by default the same as check
+    // box one but may be different)
+    virtual void DrawCheckItemBitmap(wxDC& dc,
+                                     const wxBitmap& bitmap,
+                                     const wxRect& rect,
+                                     int flags);
+
     // common routine for drawing check and radio buttons
     void DrawCheckOrRadioButton(wxDC& dc,
                                 const wxString& label,
@@ -214,6 +329,13 @@ protected:
     virtual wxBitmap GetRadioBitmap(int flags) = 0;
     virtual wxBitmap GetCheckBitmap(int flags) = 0;
 
+    // return the frame icon bitmap
+    virtual wxBitmap GetFrameButtonBitmap(FrameButtonType type) = 0;
+
+#if wxUSE_TEXTCTRL
+    // return the width of the border around the text area in the text control
+    virtual int GetTextBorderWidth(const wxTextCtrl *text) const;
+#endif // wxUSE_TEXTCTRL
 
     // return the starting and ending positions, in pixels, of the thumb of a
     // scrollbar with the given logical position, thumb size and range and the
@@ -231,6 +353,8 @@ protected:
           m_penLightGrey,
           m_penHighlight;
 
+    wxFont m_titlebarFont;
+
     // the colours we use, they never change currently so we don't have to ever
     // update m_penXXX objects above
     const wxColourScheme * const m_scheme;