dockart.h

Go to the documentation of this file.
00001 
00002 // Name:        wx/aui/dockart.h
00003 // Purpose:     wxaui: wx advanced user interface - docking window manager
00004 // Author:      Benjamin I. Williams
00005 // Modified by:
00006 // Created:     2005-05-17
00007 // RCS-ID:      $Id: dockart.h,v 1.3 2006/06/06 15:37:50 ABX Exp $
00008 // Copyright:   (C) Copyright 2005, Kirix Corporation, All Rights Reserved.
00009 // Licence:     wxWindows Library Licence, Version 3.1
00011 
00012 #ifndef _WXXTRA_DOCKART_H_
00013 #define _WXXTRA_DOCKART_H_
00014 
00015 // ----------------------------------------------------------------------------
00016 // headers
00017 // ----------------------------------------------------------------------------
00018 
00019 #include <wx/wx.h>
00020 
00021 #include "dockart.h"
00022 
00023 #if wxUSE_AUI
00024 #undef wxXTRA_AUI
00025 #include <wx/aui/dockart.h>
00026 #else
00027 #define wxXTRA_AUI 1
00028 
00029 // dock art provider code - a dock provider provides all drawing
00030 // functionality to the wxAui dock manager.  This allows the dock
00031 // manager to have plugable look-and-feels
00032 
00033 class WXDLLIMPEXP_AUI wxAuiDockArt
00034 {
00035 public:
00036 
00037     wxAuiDockArt() { }
00038     virtual ~wxAuiDockArt() { }
00039 
00040     virtual int GetMetric(int id) = 0;
00041     virtual void SetMetric(int id, int new_val) = 0;
00042     virtual void SetFont(int id, const wxFont& font) = 0;
00043     virtual wxFont GetFont(int id) = 0;
00044     virtual wxColour GetColour(int id) = 0;
00045     virtual void SetColour(int id, const wxColor& colour) = 0;
00046     wxColour GetColor(int id) { return GetColour(id); }
00047     void SetColor(int id, const wxColour& color) { SetColour(id, color); }
00048 
00049     virtual void DrawSash(wxDC& dc,
00050                           int orientation,
00051                           const wxRect& rect) = 0;
00052 
00053     virtual void DrawBackground(wxDC& dc,
00054                           int orientation,
00055                           const wxRect& rect) = 0;
00056 
00057     virtual void DrawCaption(wxDC& dc,
00058                           const wxString& text,
00059                           const wxRect& rect,
00060                           wxAuiPaneInfo& pane) = 0;
00061 
00062     virtual void DrawGripper(wxDC& dc,
00063                           const wxRect& rect,
00064                           wxAuiPaneInfo& pane) = 0;
00065 
00066     virtual void DrawBorder(wxDC& dc,
00067                           const wxRect& rect,
00068                           wxAuiPaneInfo& pane) = 0;
00069 
00070     virtual void DrawPaneButton(wxDC& dc,
00071                           int button,
00072                           int button_state,
00073                           const wxRect& rect,
00074                           wxAuiPaneInfo& pane) = 0;
00075 };
00076 
00077 
00078 // this is the default art provider for wxFrameManager.  Dock art
00079 // can be customized by creating a class derived from this one,
00080 // or replacing this class entirely
00081 
00082 class WXDLLIMPEXP_AUI wxAuiDefaultDockArt : public wxAuiDockArt
00083 {
00084 public:
00085 
00086     wxAuiDefaultDockArt();
00087 
00088     int GetMetric(int metric_id);
00089     void SetMetric(int metric_id, int new_val);
00090     wxColour GetColour(int id);
00091     void SetColour(int id, const wxColor& colour);
00092     void SetFont(int id, const wxFont& font);
00093     wxFont GetFont(int id);
00094 
00095     void DrawSash(wxDC& dc,
00096                   int orientation,
00097                   const wxRect& rect);
00098 
00099     void DrawBackground(wxDC& dc,
00100                   int orientation,
00101                   const wxRect& rect);
00102 
00103     void DrawCaption(wxDC& dc,
00104                   const wxString& text,
00105                   const wxRect& rect,
00106                   wxAuiPaneInfo& pane);
00107 
00108     void DrawGripper(wxDC& dc,
00109                   const wxRect& rect,
00110                   wxAuiPaneInfo& pane);
00111 
00112     void DrawBorder(wxDC& dc,
00113                   const wxRect& rect,
00114                   wxAuiPaneInfo& pane);
00115 
00116     void DrawPaneButton(wxDC& dc,
00117                   int button,
00118                   int button_state,
00119                   const wxRect& rect,
00120                   wxAuiPaneInfo& pane);
00121 
00122 protected:
00123 
00124     void DrawCaptionBackground(wxDC& dc, const wxRect& rect, bool active);
00125 
00126 protected:
00127 
00128     wxPen m_border_pen;
00129     wxBrush m_sash_brush;
00130     wxBrush m_background_brush;
00131     wxBrush m_gripper_brush;
00132     wxFont m_caption_font;
00133     wxBitmap m_inactive_close_bitmap;
00134     wxBitmap m_inactive_pin_bitmap;
00135     wxBitmap m_active_close_bitmap;
00136     wxBitmap m_active_pin_bitmap;
00137     wxPen m_gripper_pen1;
00138     wxPen m_gripper_pen2;
00139     wxPen m_gripper_pen3;
00140     wxColour m_active_caption_colour;
00141     wxColour m_active_caption_gradient_colour;
00142     wxColour m_active_caption_text_colour;
00143     wxColour m_inactive_caption_colour;
00144     wxColour m_inactive_caption_gradient_colour;
00145     wxColour m_inactive_caption_text_colour;
00146     int m_border_size;
00147     int m_caption_size;
00148     int m_sash_size;
00149     int m_button_size;
00150     int m_gripper_size;
00151     int m_gradient_type;
00152 };
00153 
00154 
00155 
00156 #endif // wxUSE_AUI
00157 #endif //_WX_DOCKART_H_

Generated on Sat Nov 10 03:49:00 2007 for Camelot by  doxygen 1.4.4