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

FXStatusbar.h

00001 /********************************************************************************
00002 *                                                                               *
00003 *                       S t a t u s b a r   W i d g e t                         *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2002 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (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 GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXStatusbar.h,v 1.13 2002/01/18 22:42:54 jeroen Exp $                    *
00023 ********************************************************************************/
00024 #ifndef FXSTATUSBAR_H
00025 #define FXSTATUSBAR_H
00026 
00027 #ifndef FXHORIZONTALFRAME_H
00028 #include "FXHorizontalFrame.h"
00029 #endif
00030 
00031 
00032 
00033 /// Statusbar options
00034 enum {
00035   STATUSBAR_WITH_DRAGCORNER = 0x00020000    /// Causes the DragCorner to be shown
00036   };
00037 
00038 
00039 class FXDragCorner;
00040 class FXStatusline;
00041 
00042 
00043 /// Status bar
00044 class FXAPI FXStatusbar : public FXHorizontalFrame {
00045   FXDECLARE(FXStatusbar)
00046 protected:
00047   FXDragCorner *corner;
00048   FXStatusline *status;
00049 protected:
00050   FXStatusbar(){}
00051   virtual void layout();
00052 private:
00053   FXStatusbar(const FXStatusbar&);
00054   FXStatusbar& operator=(const FXStatusbar&);
00055 public:
00056 
00057   /// Construct status bar with or without a drag corner
00058   FXStatusbar(FXComposite* p,FXuint opts=0,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=4,FXint vs=0);
00059 
00060   /// Return default width
00061   virtual FXint getDefaultWidth();
00062 
00063   /// Return default height
00064   virtual FXint getDefaultHeight();
00065 
00066   /// Show or hide the drag corner
00067   void setCornerStyle(FXbool withcorner=TRUE);
00068 
00069   /// Return TRUE if drag corner shown
00070   FXbool getCornerStyle() const;
00071 
00072   /// Acess the status line widget
00073   FXStatusline *getStatusline() const { return status; }
00074 
00075   /// Access the drag corner widget
00076   FXDragCorner *getDragCorner() const { return corner; }
00077 
00078   /// Save status bar to a stream
00079   virtual void save(FXStream& store) const;
00080 
00081   /// Load status bar from a stream
00082   virtual void load(FXStream& store);
00083 
00084   /// Destructor
00085   virtual ~FXStatusbar();
00086   };
00087 
00088 
00089 #endif