![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * T o o l B a r W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 2004,2009 by Jeroen van der Zijp. All Rights Reserved. * 00007 ********************************************************************************* 00008 * This library is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU Lesser General Public License as published by * 00010 * the Free Software Foundation; either version 3 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU Lesser General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Lesser General Public License * 00019 * along with this program. If not, see <http://www.gnu.org/licenses/> * 00020 ********************************************************************************* 00021 * $Id: FXToolBar.h,v 1.33 2009/01/06 13:07:28 fox Exp $ * 00022 ********************************************************************************/ 00023 #ifndef FXTOOLBAR_H 00024 #define FXTOOLBAR_H 00025 00026 #ifndef FXDOCKBAR_H 00027 #include "FXDockBar.h" 00028 #endif 00029 00030 namespace FX { 00031 00032 class FXDockSite; 00033 00034 00035 /** 00036 * A tool bar widget can be docked in a dock site; it automatically 00037 * adjusts its orientation based on the orientation of the dock site, 00038 * and adjusts the layout options accordingly. 00039 * See dock bar widget for more information on the docking behavior. 00040 */ 00041 class FXAPI FXToolBar : public FXDockBar { 00042 FXDECLARE(FXToolBar) 00043 protected: 00044 FXToolBar(){} 00045 private: 00046 FXToolBar(const FXToolBar&); 00047 FXToolBar &operator=(const FXToolBar&); 00048 public: 00049 long onCmdDockFlip(FXObject*,FXSelector,void*); 00050 long onUpdDockFlip(FXObject*,FXSelector,void*); 00051 public: 00052 00053 /// Construct floatable toolbar, initially docked under parent p 00054 FXToolBar(FXComposite* p,FXComposite* q,FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=3,FXint pr=3,FXint pt=2,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING); 00055 00056 /// Construct a non-floatable toolbar 00057 FXToolBar(FXComposite* p,FXuint opts,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=2,FXint pr=3,FXint pt=3,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING); 00058 00059 /// Perform layout 00060 virtual void layout(); 00061 00062 /// Return default width 00063 virtual FXint getDefaultWidth(); 00064 00065 /// Return default height 00066 virtual FXint getDefaultHeight(); 00067 00068 /// Dock and optionally flip orientation of toolbar before other window 00069 virtual void dock(FXDockSite* docksite,FXWindow* other=NULL,FXbool notify=false); 00070 00071 /// Dock and optionally flip orientation of toolbar 00072 virtual void dock(FXDockSite* docksite,FXint localx,FXint localy,FXbool notify=false); 00073 00074 /// Set docking side 00075 void setDockingSide(FXuint side=LAYOUT_SIDE_TOP); 00076 00077 /// Return docking side 00078 FXuint getDockingSide() const; 00079 }; 00080 00081 } 00082 00083 #endif
![]() |