]> git.saurik.com Git - wxWidgets.git/commitdiff
Include wx/toolbar.h according to precompiled headers of wx/wx.h (with other minor...
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 7 Jun 2006 17:46:13 +0000 (17:46 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 7 Jun 2006 17:46:13 +0000 (17:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

26 files changed:
src/aui/framemanager.cpp
src/cocoa/toolbar.mm
src/common/framecmn.cpp
src/gtk/frame.cpp
src/gtk/tbargtk.cpp
src/gtk/window.cpp
src/gtk1/frame.cpp
src/gtk1/tbargtk.cpp
src/html/helpfrm.cpp
src/html/helpwnd.cpp
src/mac/carbon/frame.cpp
src/mac/carbon/toolbar.cpp
src/mac/carbon/window.cpp
src/mac/classic/frame.cpp
src/mac/classic/toolbar.cpp
src/motif/frame.cpp
src/msw/dialog.cpp
src/msw/frame.cpp
src/msw/mdi.cpp
src/msw/tbar95.cpp
src/msw/wince/tbarwce.cpp
src/os2/frame.cpp
src/os2/toolbar.cpp
src/palmos/frame.cpp
src/palmos/mdi.cpp
src/xrc/xh_toolb.cpp

index 55303c23d3fb70f87b64f2e70ced7355a683eeb0..20268d2c76b322367a154a5046afabe4e5547625 100644 (file)
     #include "wx/app.h"
     #include "wx/dcclient.h"
     #include "wx/dcscreen.h"
+    #include "wx/toolbar.h"
 #endif
 
 //#include "wx/dcbuffer.h"
 
 #include "wx/image.h"
-#include "wx/toolbar.h"
 
 #if wxUSE_MDI
      #include "wx/mdi.h"
index bf0d2a4d5a3d370d1e44989b5b5a75c0bf094399..b831696cfe323cd41a3ce6ac6c560d800ef1cccc 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2003/08/17
 // RCS-ID:      $Id$
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWidgets licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
 #include "wx/wxprec.h"
 
 #if wxUSE_TOOLBAR_NATIVE
+
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/toolbar.h"
     #include "wx/frame.h"
     #include "wx/log.h"
 #endif // WX_PRECOMP
index 31a955fede166c47840e15f8a3506ef6fff0d4a8..8532a749299e02b4ff9688152e193305d3161f91 100644 (file)
     #include "wx/menu.h"
     #include "wx/menuitem.h"
     #include "wx/dcclient.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif
 #if wxUSE_STATUSBAR
     #include "wx/statusbr.h"
 #endif
index 34e6b9de37542817c4f06d1d8e459f77e1c374e3..f13c3957bceafcc66675080f38b1d07cb1d58961 100644 (file)
     #include "wx/menu.h"
     #include "wx/dialog.h"
     #include "wx/control.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif
 #if wxUSE_STATUSBAR
     #include "wx/statusbr.h"
 #endif
index c36d3ef85f0cefb44d04f45f5b0c70d95b79439d..62aa329954726343a37faf55406a090c9f49b82a 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/toolbar.h"
-
 #if wxUSE_TOOLBAR_NATIVE
 
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/frame.h"
 #endif
index bd771d2deed8cd43915838d5f8a78a8b625cf49a..bc774aeddcfc15da0a84a8505cdf8f46cef52d3b 100644 (file)
     #include "wx/settings.h"
     #include "wx/msgdlg.h"
     #include "wx/textctrl.h"
+    #include "wx/toolbar.h"
 #endif
 
 #include "wx/layout.h"
 #include "wx/module.h"
 #include "wx/combobox.h"
 
-#if wxUSE_TOOLBAR_NATIVE
-    #include "wx/toolbar.h"
-#endif
-
 #if wxUSE_DRAG_AND_DROP
     #include "wx/dnd.h"
 #endif
index 84ff30270114a3d66fdbe2708d43aee6b176b1ef..b9818eba524410cef108d4e8a32a2650519cbd08 100644 (file)
     #include "wx/menu.h"
     #include "wx/dialog.h"
     #include "wx/control.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif
 #if wxUSE_STATUSBAR
     #include "wx/statusbr.h"
 #endif
index 71392ae7e526c4abec0cc6afde93b87a4870a391..06885d53411b659e3b232c3e870ec661505cd326 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/toolbar.h"
-
 #if wxUSE_TOOLBAR_NATIVE
 
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/frame.h"
 #endif
index 3e8da6b12cf79dc903dfdac9c44a56676aa75e80..35c4a4626000a17f1ca760b6616f07332f9c565b 100644 (file)
@@ -37,6 +37,7 @@
     #include "wx/settings.h"
     #include "wx/msgdlg.h"
     #include "wx/textctrl.h"
+    #include "wx/toolbar.h"
 #endif // WXPRECOMP
 
 #include "wx/html/helpfrm.h"
@@ -49,7 +50,6 @@
 #include "wx/html/htmlwin.h"
 #include "wx/busyinfo.h"
 #include "wx/progdlg.h"
-#include "wx/toolbar.h"
 #include "wx/fontenum.h"
 #include "wx/filedlg.h"
 #include "wx/artprov.h"
index 75ebdcb6f9e0d1d2d9abfc75d93dc71128c40434..7c39fd3d63e9a7f7bccbf7b729905edfed0862b1 100644 (file)
@@ -37,6 +37,7 @@
     #include "wx/settings.h"
     #include "wx/msgdlg.h"
     #include "wx/textctrl.h"
+    #include "wx/toolbar.h"
 #endif // WXPRECOMP
 
 #include "wx/html/helpfrm.h"
@@ -50,7 +51,6 @@
 #include "wx/html/htmlwin.h"
 #include "wx/busyinfo.h"
 #include "wx/progdlg.h"
-#include "wx/toolbar.h"
 #include "wx/fontenum.h"
 #include "wx/filedlg.h"
 #include "wx/artprov.h"
index 00e588c9459cf3a0a26cac2f593026c4287f771f..7469315094ad31c6d682427ed9397cb276ca38d5 100644 (file)
     #include "wx/menu.h"
     #include "wx/dialog.h"
     #include "wx/settings.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
 #include "wx/statusbr.h"
-#include "wx/toolbar.h"
 #include "wx/menuitem.h"
 
 #include "wx/mac/uma.h"
index 5c7934010ee52dd342d3ec51ee96e460684aad19..9b1ef2d3c96c09f3fcbf603de35525a815277546 100644 (file)
 
 #if wxUSE_TOOLBAR
 
-#include "wx/wx.h"
-#include "wx/bitmap.h"
 #include "wx/toolbar.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+#endif
+
+#include "wx/bitmap.h"
+
 #include "wx/mac/uma.h"
 #include "wx/geometry.h"
 
index bd242fe8f0dc06c1c7bfb6304af31497d45a30dc..253dbf49a85acc0591e13ef4d3672bc9a8f000ba 100644 (file)
@@ -29,6 +29,7 @@
     #include "wx/scrolbar.h"
     #include "wx/statbox.h"
     #include "wx/textctrl.h"
+    #include "wx/toolbar.h"
 #endif
 
 #include "wx/layout.h"
@@ -38,8 +39,6 @@
 #include "wx/spinctrl.h"
 #include "wx/geometry.h"
 
-#include "wx/toolbar.h"
-
 #if wxUSE_CARET
     #include "wx/caret.h"
 #endif
index d97a3909e51192d2eb9483ad5bbe046079c20e15..0cc1fec03e3474bafe52474a42f25053c7854f86 100644 (file)
     #include "wx/menu.h"
     #include "wx/dialog.h"
     #include "wx/settings.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
 #include "wx/statusbr.h"
-#include "wx/toolbar.h"
 #include "wx/menuitem.h"
 
 #include "wx/mac/uma.h"
index 16f857539294e95b3979c3df360fc9939bcc3024..e45400efe08189442312989d9a857873aac4e113 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        toolbar.cpp
+// Name:        src/mac/classic/toolbar.cpp
 // Purpose:     wxToolBar
 // Author:      Stefan Csomor
 // Modified by:
@@ -9,11 +9,16 @@
 // Licence:     The wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#include "wx/wx.h"
+#include "wx/wxprec.h"
 
 #if wxUSE_TOOLBAR
 
 #include "wx/toolbar.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+#endif
+
 #include "wx/notebook.h"
 #include "wx/tabctrl.h"
 #include "wx/bitmap.h"
@@ -21,8 +26,8 @@
 IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl)
 
 BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase)
-    EVT_MOUSE_EVENTS( wxToolBar::OnMouse ) 
-    EVT_PAINT( wxToolBar::OnPaint ) 
+    EVT_MOUSE_EVENTS( wxToolBar::OnMouse )
+    EVT_PAINT( wxToolBar::OnPaint )
 END_EVENT_TABLE()
 
 #include "wx/mac/uma.h"
@@ -43,19 +48,19 @@ public:
                   wxObject *clientData,
                   const wxString& shortHelp,
                   const wxString& longHelp) ;
-                  
+
     wxToolBarTool(wxToolBar *tbar, wxControl *control)
         : wxToolBarToolBase(tbar, control)
     {
         Init() ;
     }
-    
+
     ~wxToolBarTool()
     {
         if ( m_controlHandle )
             DisposeControl( m_controlHandle ) ;
     }
-    
+
     ControlHandle   GetControlHandle() { return m_controlHandle ; }
     void SetControlHandle( ControlHandle handle ) { m_controlHandle = handle ; }
 
@@ -82,9 +87,9 @@ public:
     wxPoint GetPosition() const
     {
         return wxPoint(m_x, m_y);
-    }    
+    }
 private :
-    void Init() 
+    void Init()
     {
         m_controlHandle = NULL ;
     }
@@ -119,18 +124,18 @@ void wxToolBarTool::SetPosition(const wxPoint& position)
     {
         int x , y ;
         x = y = 0 ;
-        WindowRef rootwindow = (WindowRef) GetToolBar()->MacGetRootWindow() ;    
+        WindowRef rootwindow = (WindowRef) GetToolBar()->MacGetRootWindow() ;
         GetToolBar()->MacWindowToRootWindow( &x , &y ) ;
         int mac_x = x + position.x ;
         int mac_y = y + position.y ;
-        
 
-        Rect contrlRect ;       
-        GetControlBounds( m_controlHandle , &contrlRect ) ; 
+
+        Rect contrlRect ;
+        GetControlBounds( m_controlHandle , &contrlRect ) ;
         int former_mac_x = contrlRect.left ;
         int former_mac_y = contrlRect.top ;
         wxSize sz = GetToolBar()->GetToolSize() ;
-        
+
         if ( mac_x != former_mac_x || mac_y != former_mac_y )
         {
             {
@@ -156,42 +161,42 @@ const short kwxMacToolBarTopMargin = 2 ;
 const short kwxMacToolBarLeftMargin = 2 ;
 
 wxToolBarTool::wxToolBarTool(wxToolBar *tbar,
-  int id,
-  const wxString& label,
-  const wxBitmap& bmpNormal,
-  const wxBitmap& bmpDisabled,
-  wxItemKind kind,
-  wxObject *clientData,
-  const wxString& shortHelp,
-  const wxString& longHelp)
+                             int id,
+                             const wxString& label,
+                             const wxBitmap& bmpNormal,
+                             const wxBitmap& bmpDisabled,
+                             wxItemKind kind,
+                             wxObject *clientData,
+                             const wxString& shortHelp,
+                             const wxString& longHelp)
         : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
                             clientData, shortHelp, longHelp)
 {
     Init();
-    
+
     if (id == wxID_SEPARATOR) return;
-    
-    WindowRef window = (WindowRef) tbar->MacGetRootWindow() ;    
-    wxSize toolSize = tbar->GetToolSize() ;    
+
+    WindowRef window = (WindowRef) tbar->MacGetRootWindow() ;
+    wxSize toolSize = tbar->GetToolSize() ;
     Rect toolrect = { 0, 0 , toolSize.y , toolSize.x } ;
-    
+
     ControlButtonContentInfo info ;
     wxMacCreateBitmapButton( &info , GetNormalBitmap() ) ;
-    
+
     SInt16 behaviour = kControlBehaviorOffsetContents ;
     if ( CanBeToggled() )
         behaviour += kControlBehaviorToggles ;
-    
-    if ( info.contentType != kControlNoContent ) 
+
+    if ( info.contentType != kControlNoContent )
     {
-        m_controlHandle = ::NewControl( window , &toolrect , "\p" , false , 0 , 
+        m_controlHandle = ::NewControl( window , &toolrect , "\p" , false , 0 ,
                                         behaviour + info.contentType , 0 , kControlBevelButtonNormalBevelProc , (long) this ) ;
-        
+
         ::SetControlData( m_controlHandle , kControlButtonPart , kControlBevelButtonContentTag , sizeof(info) , (char*) &info ) ;
     }
     else
     {
-        m_controlHandle = ::NewControl( window , &toolrect , "\p" , false , 0 , 
+        m_controlHandle = ::NewControl( window , &toolrect , "\p" , false , 0 ,
                                         behaviour  , 0 , kControlBevelButtonNormalBevelProc , (long) this ) ;
     }
     UMAShowControl( m_controlHandle ) ;
@@ -207,7 +212,7 @@ wxToolBarTool::wxToolBarTool(wxToolBar *tbar,
     {
         ::SetControl32BitValue( m_controlHandle , 0 ) ;
     }
-    
+
     ControlHandle container = (ControlHandle) tbar->MacGetContainerForEmbedding() ;
     wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ;
     ::EmbedControl( m_controlHandle , container ) ;
@@ -242,12 +247,12 @@ void wxToolBar::Init()
 
 bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
             long style, const wxString& name)
-{  
+{
     int x = pos.x;
     int y = pos.y;
     int width = size.x;
     int height = size.y;
-    
+
     if (width <= 0)
         width = 100;
     if (height <= 0)
@@ -256,20 +261,20 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
         x = 0;
     if (y < 0)
         y = 0;
-    
+
     SetName(name);
-    
+
     m_windowStyle = style;
     parent->AddChild(this);
-    
+
     m_backgroundColour = parent->GetBackgroundColour() ;
     m_foregroundColour = parent->GetForegroundColour() ;
-    
-    if (id == -1)
+
+    if (id == wxID_ANY)
         m_windowId = NewControlId();
     else
         m_windowId = id;
-    
+
     {
         m_width = size.x ;
         m_height = size.y ;
@@ -279,12 +284,12 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
         m_x = x ;
         m_y = y ;
     }
-    
-    return TRUE;
+
+    return true;
 }
 
 wxToolBar::~wxToolBar()
-{    
+{
     // we must refresh the frame size when the toolbar is deleted but the frame
     // is not - otherwise toolbar leaves a hole in the place it used to occupy
 }
@@ -292,17 +297,17 @@ wxToolBar::~wxToolBar()
 bool wxToolBar::Realize()
 {
     if (m_tools.GetCount() == 0)
-        return FALSE;
+        return false;
 
     int x = m_xMargin + kwxMacToolBarLeftMargin ;
     int y = m_yMargin + kwxMacToolBarTopMargin ;
 
     int tw, th;
     GetSize(& tw, & th);
-    
+
     int maxWidth = 0 ;
     int maxHeight = 0 ;
-    
+
     int maxToolWidth = 0;
     int maxToolHeight = 0;
 
@@ -326,15 +331,15 @@ bool wxToolBar::Realize()
     {
         wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
         wxSize cursize = tool->GetSize() ;
-        
+
         // for the moment we just do a single row/column alignement
         if ( x + cursize.x > maxWidth )
             maxWidth = x + cursize.x ;
         if ( y + cursize.y > maxHeight )
             maxHeight = y + cursize.y ;
-            
+
         tool->SetPosition( wxPoint( x , y ) ) ;
-        
+
         if ( GetWindowStyleFlag() & wxTB_VERTICAL )
         {
             y += cursize.y ;
@@ -346,7 +351,7 @@ bool wxToolBar::Realize()
 
         node = node->GetNext();
     }
-    
+
     if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
     {
         if ( m_maxRows == 0 )
@@ -354,7 +359,7 @@ bool wxToolBar::Realize()
             // if not set yet, only one row
             SetRows(1);
         }
-        maxWidth = tw ; 
+        maxWidth = tw ;
         maxHeight += m_yMargin + kwxMacToolBarTopMargin;
         m_maxHeight = maxHeight ;
     }
@@ -369,11 +374,11 @@ bool wxToolBar::Realize()
         maxWidth += m_xMargin + kwxMacToolBarLeftMargin;
         m_maxWidth = maxWidth ;
     }
-    
+
     SetSize(maxWidth, maxHeight);
     InvalidateBestSize();
-    
-    return TRUE;
+
+    return true;
 }
 
 void wxToolBar::SetToolBitmapSize(const wxSize& size)
@@ -387,15 +392,15 @@ wxSize wxToolBar::GetToolSize() const
     return wxSize(m_defaultWidth + 4, m_defaultHeight + 4);
 }
 
-void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) ) 
+void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) )
 {
     wxToolBarToolsList::Node *node;
     for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
     {
-        wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ; 
+        wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ;
         if ( tool->IsButton() )
         {
-           if( (WXWidget) tool->GetControlHandle() == control ) 
+           if( (WXWidget) tool->GetControlHandle() == control )
            {
                 if ( tool->CanBeToggled() )
                 {
@@ -419,7 +424,7 @@ void wxToolBar::SetRows(int nRows)
     m_maxRows = nRows;
 }
 
-void wxToolBar::MacSuperChangedPosition() 
+void wxToolBar::MacSuperChangedPosition()
 {
     wxWindow::MacSuperChangedPosition() ;
     Realize() ;
@@ -491,7 +496,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
     tool->Attach(this);
     InvalidateBestSize();
 
-    return TRUE;
+    return true;
 }
 
 void wxToolBar::DoSetToggle(wxToolBarToolBase *WXUNUSED(tool), bool WXUNUSED(toggle))
@@ -519,7 +524,7 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
     tool->Detach();
 
     // and finally reposition all the controls after this one
-    
+
     for ( /* node -> first after deleted */ ; node; node = node->GetNext() )
     {
         wxToolBarTool *tool2 = (wxToolBarTool*) node->GetData();
@@ -535,24 +540,24 @@ bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
         }
         tool2->SetPosition( pt ) ;
     }
-    
+
     InvalidateBestSize();
-    return TRUE ;
+    return true ;
 }
 
 void wxToolBar::OnPaint(wxPaintEvent& event)
 {
     wxPaintDC dc(this) ;
     wxMacPortSetter helper(&dc) ;
-    
-    Rect toolbarrect = { dc.YLOG2DEVMAC(0) , dc.XLOG2DEVMAC(0) , 
+
+    Rect toolbarrect = { dc.YLOG2DEVMAC(0) , dc.XLOG2DEVMAC(0) ,
         dc.YLOG2DEVMAC(m_height) , dc.XLOG2DEVMAC(m_width) } ;
     UMADrawThemePlacard( &toolbarrect , IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
     {
         wxToolBarToolsList::Node *node;
         for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
         {
-            wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ; 
+            wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ;
             if ( tool->IsButton() )
             {
                UMADrawControl( tool->GetControlHandle() ) ;
@@ -561,41 +566,41 @@ void wxToolBar::OnPaint(wxPaintEvent& event)
     }
 }
 
-void  wxToolBar::OnMouse( wxMouseEvent &event ) 
+void  wxToolBar::OnMouse( wxMouseEvent &event )
 {
     if (event.GetEventType() == wxEVT_LEFT_DOWN || event.GetEventType() == wxEVT_LEFT_DCLICK )
     {
-            
+
         int x = event.m_x ;
         int y = event.m_y ;
-        
+
         MacClientToRootWindow( &x , &y ) ;
-            
+
         ControlHandle   control ;
         Point       localwhere ;
         SInt16      controlpart ;
         WindowRef   window = (WindowRef) MacGetRootWindow() ;
-        
+
         localwhere.h = x ;
         localwhere.v = y ;
-    
+
         short modifiers = 0;
-        
+
         if ( !event.m_leftDown && !event.m_rightDown )
             modifiers  |= btnState ;
-    
+
         if ( event.m_shiftDown )
             modifiers |= shiftKey ;
-            
+
         if ( event.m_controlDown )
             modifiers |= controlKey ;
-    
+
         if ( event.m_altDown )
             modifiers |= optionKey ;
-    
+
         if ( event.m_metaDown )
             modifiers |= cmdKey ;
-    
+
         controlpart = ::FindControl( localwhere , window , &control ) ;
         {
             if ( control && ::IsControlActive( control ) )
@@ -614,4 +619,3 @@ void  wxToolBar::OnMouse( wxMouseEvent &event )
 }
 
 #endif // wxUSE_TOOLBAR
-
index 6029bd7a324b6e412df7442c42af2ab8080fc400..35d67b0619ed0307e2b93e7107ba8ab4564b6e49 100644 (file)
     #include "wx/menu.h"
     #include "wx/icon.h"
     #include "wx/settings.h"
+    #include "wx/toolbar.h"
 #endif
 
 #include "wx/statusbr.h"
-#include "wx/toolbar.h"
 
 #ifdef __VMS__
     #pragma message disable nosimpint
index e36a8017d71249f1fc2382be924a697b1fd3faef..ed5230d7d166d554d3062fbb761713bc4b21fccb 100644 (file)
@@ -34,6 +34,7 @@
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/toolbar.h"
 #endif
 
 #include "wx/msw/private.h"
     #include "wx/msw/wince/resources.h"
 #endif // __SMARTPHONE__ && __WXWINCE__
 
-#if wxUSE_TOOLBAR && defined(__POCKETPC__)
-#include "wx/toolbar.h"
-#endif
-
 // ----------------------------------------------------------------------------
 // wxWin macros
 // ----------------------------------------------------------------------------
index f438b28bb7d51f767760ae78d4d5bf2b1c045267..55edcb689fb2ae98f6ca6b73a77d8055b25d06dd 100644 (file)
@@ -36,6 +36,7 @@
     #include "wx/mdi.h"
     #include "wx/panel.h"
     #include "wx/log.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
 #include "wx/msw/private.h"
     #include "wx/generic/statusbr.h"
 #endif // wxUSE_STATUSBAR
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif // wxUSE_TOOLBAR
-
 #include "wx/menuitem.h"
 
 #ifdef __WXUNIVERSAL__
index 5b7dd5e75ec830e8e32fb01850afb2a84fc3c363..9d39671a99bf6939927cff333823c5ce9fac0e64 100644 (file)
@@ -38,6 +38,7 @@
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/toolbar.h"
 #endif
 
 #include "wx/stockitem.h"
     #include "wx/msw/statbr95.h"
 #endif
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif // wxUSE_TOOLBAR
-
 #include <string.h>
 
 // ---------------------------------------------------------------------------
index 1068ff35ed1aa6a3de889b840a5064e0f0f7f2a5..f28404d38b126fcfa7e2e2cfae08ab8a3c7894ab 100644 (file)
@@ -26,6 +26,8 @@
 
 #if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && !defined(__SMARTPHONE__)
 
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/dynarray.h"
     #include "wx/frame.h"
@@ -38,7 +40,6 @@
     #include "wx/app.h"         // for GetComCtl32Version
 #endif
 
-#include "wx/toolbar.h"
 #include "wx/sysopt.h"
 #include "wx/image.h"
 
index 173dbd249ee2f1fbbbd43f25014e82c9b46cc7ee..f80b550c3a74caf58249cc80bc06e8e8c1443ddd 100644 (file)
@@ -28,6 +28,8 @@
 // with a WinCE earlier than 4, or we wish to emulate a PocketPC-style UI
 #if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (_WIN32_WCE < 400 || defined(__POCKETPC__) || defined(__SMARTPHONE__))
 
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/dynarray.h"
     #include "wx/frame.h"
@@ -39,8 +41,6 @@
     #include "wx/control.h"
 #endif
 
-#include "wx/toolbar.h"
-
 #if !defined(__GNUWIN32__) && !defined(__SALFORDC__)
     #include "malloc.h"
 #endif
index c909d19d1638ce2503b65cdf3a0f3855ebddabbe..2d312201142e24cd649d01c41f6632aac027af96 100644 (file)
@@ -29,6 +29,7 @@
     #include "wx/settings.h"
     #include "wx/dcclient.h"
     #include "wx/mdi.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
 #include "wx/os2/private.h"
     #include "wx/generic/statusbr.h"
 #endif // wxUSE_STATUSBAR
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif // wxUSE_TOOLBAR
-
 #include "wx/menuitem.h"
 
 // ----------------------------------------------------------------------------
index ea8d5f8480b4421105eab0ffdb2daac8db377319..eb6283de0a498b5c2dd35987fca248ed66cfd790 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        toolbar.cpp
+// Name:        src/os2/toolbar.cpp
 // Purpose:     wxToolBar
 // Author:      David Webster
 // Modified by:
@@ -14,6 +14,8 @@
 
 #if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE
 
+#include "wx/toolbar.h"
+
 #ifndef WX_PRECOMP
     #include "wx/settings.h"
     #include "wx/window.h"
@@ -24,9 +26,8 @@
 #endif
 
 #include "wx/tooltip.h"
-#include "wx/toolbar.h"
 
-bool                                wxToolBar::m_bInitialized = FALSE;
+bool wxToolBar::m_bInitialized = false;
 
 // ----------------------------------------------------------------------------
 // private classes
@@ -275,12 +276,10 @@ wxToolBarToolBase* wxToolBar::InsertTool(
     return pTool;
 } // end of wxToolBar::InsertTool
 
-bool wxToolBar::DoInsertTool(
-  size_t                            WXUNUSED(nPos)
-, wxToolBarToolBase*                pToolBase
-)
+bool wxToolBar::DoInsertTool( size_t WXUNUSED(nPos),
+                              wxToolBarToolBase* pToolBase )
 {
-    wxToolBarTool*                  pTool = (wxToolBarTool *)pToolBase;
+    wxToolBarTool* pTool = (wxToolBarTool *)pToolBase;
 
     pTool->m_vX = m_vXPos;
     if (pTool->m_vX == -1)
@@ -303,27 +302,23 @@ bool wxToolBar::DoInsertTool(
         if ((pTool->m_vY + pTool->GetNormalBitmap().GetHeight() + m_yMargin) > m_vMaxHeight)
             m_vMaxHeight = (wxCoord)((pTool->m_vY + pTool->GetHeight() + m_yMargin));
     }
-    return TRUE;
+    return true;
 } // end of wxToolBar::DoInsertTool
 
-bool wxToolBar::DoDeleteTool(
-  size_t                            WXUNUSED(nPos)
-, wxToolBarToolBase*                pTool
-)
+bool wxToolBar::DoDeleteTool( size_t WXUNUSED(nPos),
+                              wxToolBarToolBase* pTool )
 {
     pTool->Detach();
     Refresh();
-    return TRUE;
+    return true;
 } // end of wxToolBar::DoDeleteTool
 
-bool wxToolBar::Create(
-  wxWindow*                         pParent
-, wxWindowID                        vId
-, const wxPoint&                    rPos
-, const wxSize&                     rSize
-, long                              lStyle
-, const wxString&                   rsName
-)
+bool wxToolBar::Create( wxWindow* pParent,
+                        wxWindowID vId,
+                        const wxPoint& rPos,
+                        const wxSize& rSize,
+                        long lStyle,
+                        const wxString& rsName )
 {
     if ( !wxWindow::Create( pParent
                            ,vId
@@ -332,7 +327,7 @@ bool wxToolBar::Create(
                            ,lStyle
                            ,rsName
                           ))
-        return FALSE;
+        return false;
 
     // Set it to grey (or other 3D face colour)
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR));
@@ -418,7 +413,7 @@ bool wxToolBar::Create(
             ,nWidth
             ,nHeight
            );
-    return TRUE;
+    return true;
 } // end of wxToolBar::Create
 
 wxToolBar::~wxToolBar()
@@ -577,8 +572,8 @@ bool wxToolBar::Realize()
 
     m_maxWidth += m_xMargin;
     m_maxHeight += m_yMargin;
-    m_bInitialized = TRUE;
-    return TRUE;
+    m_bInitialized = true;
+    return true;
 } // end of wxToolBar::Realize
 
 // ----------------------------------------------------------------------------
@@ -716,9 +711,7 @@ void wxToolBar::OnMouseEvent(
             pTool = (wxToolBarTool *)FindById(m_nCurrentTool);
             if (pTool && !pTool->IsToggled())
             {
-                RaiseTool( pTool
-                          ,FALSE
-                         );
+                RaiseTool( pTool, FALSE );
             }
             m_nCurrentTool = -1;
             OnMouseEnter(-1);
@@ -745,9 +738,7 @@ void wxToolBar::OnMouseEvent(
             wxToolBarTool*          pOldTool = (wxToolBarTool*)FindById(m_nCurrentTool);
 
             if (pOldTool && !pTool->IsToggled())
-                RaiseTool( pOldTool
-                          ,FALSE
-                         );
+                RaiseTool( pOldTool, FALSE );
             m_nCurrentTool = pTool->GetId();
             OnMouseEnter(m_nCurrentTool);
             if (!pTool->GetShortHelp().empty())
@@ -810,27 +801,20 @@ void wxToolBar::OnMouseEvent(
 // drawing
 // ----------------------------------------------------------------------------
 
-void wxToolBar::DrawTool(
-  wxToolBarToolBase*                pTool
-)
+void wxToolBar::DrawTool( wxToolBarToolBase* pTool )
 {
-    wxClientDC                      vDc(this);
+    wxClientDC vDc(this);
 
-    DrawTool( vDc
-             ,pTool
-            );
+    DrawTool( vDc, pTool );
 } // end of wxToolBar::DrawTool
 
-void wxToolBar::DrawTool(
-  wxDC&                             rDc
-, wxToolBarToolBase*                pToolBase
-)
+void wxToolBar::DrawTool( wxDC& rDc, wxToolBarToolBase* pToolBase )
 {
     wxToolBarTool* pTool = (wxToolBarTool *)pToolBase;
     wxColour gray85( 85,85,85 );
     wxPen vDarkGreyPen( gray85, 1, wxSOLID );
     wxBitmap vBitmap = pTool->GetNormalBitmap();
-    bool bUseMask = FALSE;
+    bool bUseMask = false;
     wxMask* pMask = NULL;
 
     PrepareDC(rDc);
@@ -839,7 +823,7 @@ void wxToolBar::DrawTool(
         return;
     if ((pMask = vBitmap.GetMask()) != NULL)
         if (pMask->GetMaskBitmap() != NULLHANDLE)
-            bUseMask = TRUE;
+            bUseMask = true;
 
     if (!pTool->IsToggled())
     {
@@ -1179,15 +1163,11 @@ void wxToolBar::RaiseTool ( wxToolBarToolBase* pToolBase,
     }
 } // end of wxToolBar::RaiseTool
 
-void wxToolBar::OnTimer (
-  wxTimerEvent&                     rEvent
-)
+void wxToolBar::OnTimer ( wxTimerEvent& rEvent )
 {
     if (rEvent.GetId() == m_vToolTimer.GetTimerId())
     {
-        wxPoint                     vPos( m_vXMouse
-                                         ,m_vYMouse
-                                        );
+        wxPoint vPos( m_vXMouse, m_vYMouse );
 
         m_pToolTip->DisplayToolTipWindow(vPos);
         m_vToolTimer.Stop();
index 8d2f51ee16d44f6690f31ab4d17861e34afffecf..db49861dda35ec0ae733a612ff860141cc22f364 100644 (file)
@@ -36,6 +36,7 @@
     #include "wx/mdi.h"
     #include "wx/panel.h"
     #include "wx/log.h"
+    #include "wx/toolbar.h"
 #endif // WX_PRECOMP
 
 #if wxUSE_STATUSBAR
     #include "wx/generic/statusbr.h"
 #endif // wxUSE_STATUSBAR
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif // wxUSE_TOOLBAR
-
 #include "wx/menuitem.h"
 
 #ifdef __WXUNIVERSAL__
index 247c714c411d02b23d6c1731cad19e37c0dbae76..859faae02d9c92bf029a15fe06f4ed1fcf972112 100644 (file)
@@ -38,6 +38,7 @@
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/toolbar.h"
 #endif
 
 #include "wx/mdi.h"
     #include "wx/palmos/statbr95.h"
 #endif
 
-#if wxUSE_TOOLBAR
-    #include "wx/toolbar.h"
-#endif // wxUSE_TOOLBAR
-
 #include <string.h>
 
 // ---------------------------------------------------------------------------
index 7c1f0fa055483f260242088e3b80819ce24aa09c..f89cc657c1370a2accc6686b3e05555cbdaa8f4c 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/frame.h"
+    #include "wx/toolbar.h"
 #endif
 
-#include "wx/toolbar.h"
-
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
 
 wxToolBarXmlHandler::wxToolBarXmlHandler()