]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/tbargtk.h
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     GTK toolbar 
   4 // Author:      Robert Roebling 
   6 // Copyright:   (c) Robert Roebling 
   7 // Licence:     wxWindows licence 
   8 ///////////////////////////////////////////////////////////////////////////// 
  10 #ifndef _WX_GTK_TBARGTK_H_ 
  11 #define _WX_GTK_TBARGTK_H_ 
  14     #pragma interface "tbargtk.h" 
  19 // ---------------------------------------------------------------------------- 
  21 // ---------------------------------------------------------------------------- 
  23 class wxToolBar 
: public wxToolBarBase
 
  26     // construction/destruction 
  27     wxToolBar() { Init(); } 
  28     wxToolBar( wxWindow 
*parent
, 
  30                const wxPoint
& pos 
= wxDefaultPosition
, 
  31                const wxSize
& size 
= wxDefaultSize
, 
  33                const wxString
& name 
= wxToolBarNameStr 
) 
  37         Create(parent
, id
, pos
, size
, style
, name
); 
  40     bool Create( wxWindow 
*parent
, 
  42                  const wxPoint
& pos 
= wxDefaultPosition
, 
  43                  const wxSize
& size 
= wxDefaultSize
, 
  45                  const wxString
& name 
= wxToolBarNameStr 
); 
  49     // override base class virtuals 
  50     virtual void SetMargins(int x
, int y
); 
  51     virtual void SetToolSeparation(int separation
); 
  53     virtual wxToolBarToolBase 
*FindToolForPosition(wxCoord x
, wxCoord y
) const; 
  55     // implementation from now on 
  56     // -------------------------- 
  58     GtkToolbar   
*m_toolbar
; 
  63     bool          m_blockNextEvent
; 
  65     void OnInternalIdle(); 
  68     // common part of all ctors 
  71     // implement base class pure virtuals 
  72     virtual bool DoInsertTool(size_t pos
, wxToolBarToolBase 
*tool
); 
  73     virtual bool DoDeleteTool(size_t pos
, wxToolBarToolBase 
*tool
); 
  75     virtual void DoEnableTool(wxToolBarToolBase 
*tool
, bool enable
); 
  76     virtual void DoToggleTool(wxToolBarToolBase 
*tool
, bool toggle
); 
  77     virtual void DoSetToggle(wxToolBarToolBase 
*tool
, bool toggle
); 
  79     virtual wxToolBarToolBase 
*CreateTool(int id
, 
  80                                           const wxBitmap
& bitmap1
, 
  81                                           const wxBitmap
& bitmap2
, 
  84                                           const wxString
& shortHelpString
, 
  85                                           const wxString
& longHelpString
); 
  86     virtual wxToolBarToolBase 
*CreateTool(wxControl 
*control
); 
  89     DECLARE_DYNAMIC_CLASS(wxToolBar
) 
  92 #endif // wxUSE_TOOLBAR