Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

/home/jeroen/FOX/fox/fox-1.7.33/include/FXTabBar.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                          T a b   B a r   W i d g e t                          *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2012 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 #ifndef FXTABBAR_H
00022 #define FXTABBAR_H
00023 
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00032 enum {
00033   TABBOOK_TOPTABS    = 0,                                   
00034   TABBOOK_BOTTOMTABS = 0x00020000,                          
00035   TABBOOK_SIDEWAYS   = 0x00040000,                          
00036   TABBOOK_LEFTTABS   = TABBOOK_SIDEWAYS|TABBOOK_TOPTABS,    
00037   TABBOOK_RIGHTTABS  = TABBOOK_SIDEWAYS|TABBOOK_BOTTOMTABS, 
00038   TABBOOK_NORMAL     = TABBOOK_TOPTABS                      
00039   };
00040 
00041 
00042 
00054 class FXAPI FXTabBar : public FXPacker {
00055   FXDECLARE(FXTabBar)
00056 protected:
00057   FXint current;        // Current tab index
00058   FXint shift;          // Shift amount
00059 protected:
00060   FXTabBar(){}
00061 private:
00062   FXTabBar(const FXTabBar&);
00063   FXTabBar& operator=(const FXTabBar&);
00064 public:
00065   long onPaint(FXObject*,FXSelector,void*);
00066   long onFocusNext(FXObject*,FXSelector,void*);
00067   long onFocusPrev(FXObject*,FXSelector,void*);
00068   long onFocusUp(FXObject*,FXSelector,void*);
00069   long onFocusDown(FXObject*,FXSelector,void*);
00070   long onFocusLeft(FXObject*,FXSelector,void*);
00071   long onFocusRight(FXObject*,FXSelector,void*);
00072   long onCmdOpenItem(FXObject*,FXSelector,void*);
00073   long onCmdSetValue(FXObject*,FXSelector,void*);
00074   long onCmdSetIntValue(FXObject*,FXSelector,void*);
00075   long onCmdGetIntValue(FXObject*,FXSelector,void*);
00076   long onCmdOpen(FXObject*,FXSelector,void*);
00077   long onUpdOpen(FXObject*,FXSelector,void*);
00078 public:
00079   enum {
00080     ID_OPEN_ITEM=FXPacker::ID_LAST,   
00081     ID_OPEN_FIRST,                    
00082     ID_OPEN_SECOND,
00083     ID_OPEN_THIRD,
00084     ID_OPEN_FOURTH,
00085     ID_OPEN_FIFTH,
00086     ID_OPEN_SIXTH,
00087     ID_OPEN_SEVENTH,
00088     ID_OPEN_EIGHTH,
00089     ID_OPEN_NINETH,
00090     ID_OPEN_TENTH,
00091     ID_OPEN_LAST=ID_OPEN_FIRST+100,
00092     ID_LAST
00093     };
00094 public:
00095 
00097   FXTabBar(FXComposite* p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TABBOOK_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING);
00098 
00100   virtual FXint getDefaultWidth();
00101 
00103   virtual FXint getDefaultHeight();
00104 
00106   virtual void layout();
00107 
00114   virtual void setCurrent(FXint panel,FXbool notify=false);
00115 
00117   FXint getCurrent() const { return current; }
00118 
00120   FXuint getTabStyle() const;
00121 
00123   void setTabStyle(FXuint style);
00124 
00126   virtual void save(FXStream& store) const;
00127 
00129   virtual void load(FXStream& store);
00130   };
00131 
00132 }
00133 
00134 #endif

Copyright © 1997-2011 Jeroen van der Zijp