1 /********************************************************************************
2 *                                                                               *
3 *                       S t a t u s B a r   W i d g e t                         *
4 *                                                                               *
5 *********************************************************************************
6 * Copyright (C) 1997,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or                 *
9 * modify it under the terms of the GNU Lesser General Public                    *
10 * License as published by the Free Software Foundation; either                  *
11 * version 2.1 of the License, or (at your option) any later version.            *
12 *                                                                               *
13 * This library is distributed in the hope that it will be useful,               *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
16 * Lesser General Public License for more details.                               *
17 *                                                                               *
18 * You should have received a copy of the GNU Lesser General Public              *
19 * License along with this library; if not, write to the Free Software           *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
21 *********************************************************************************
22 * $Id: FXStatusBar.h 3297 2015-12-14 20:30:04Z arthurcnorman $                        *
23 ********************************************************************************/
24 #ifndef FXSTATUSBAR_H
25 #define FXSTATUSBAR_H
26 
27 #ifndef FXHORIZONTALFRAME_H
28 #include "FXHorizontalFrame.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// StatusBar options
35 enum {
36   STATUSBAR_WITH_DRAGCORNER = 0x00020000    /// Causes the DragCorner to be shown
37   };
38 
39 
40 class FXDragCorner;
41 class FXStatusLine;
42 
43 
44 /// Status bar
45 class FXAPI FXStatusBar : public FXHorizontalFrame {
46   FXDECLARE(FXStatusBar)
47 protected:
48   FXDragCorner *corner;
49   FXStatusLine *status;
50 protected:
FXStatusBar()51   FXStatusBar(){}
52 private:
53   FXStatusBar(const FXStatusBar&);
54   FXStatusBar& operator=(const FXStatusBar&);
55 public:
56 
57   /// Construct status bar with or without a drag corner
58   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);
59 
60   /// Return default width
61   virtual FXint getDefaultWidth();
62 
63   /// Return default height
64   virtual FXint getDefaultHeight();
65 
66   /// Perform layout
67   virtual void layout();
68 
69   /// Show or hide the drag corner
70   void setCornerStyle(FXbool withcorner=TRUE);
71 
72   /// Return TRUE if drag corner shown
73   FXbool getCornerStyle() const;
74 
75   /// Acess the status line widget
getStatusLine()76   FXStatusLine *getStatusLine() const { return status; }
77 
78   /// Access the drag corner widget
getDragCorner()79   FXDragCorner *getDragCorner() const { return corner; }
80 
81   /// Save status bar to a stream
82   virtual void save(FXStream& store) const;
83 
84   /// Load status bar from a stream
85   virtual void load(FXStream& store);
86 
87   /// Destructor
88   virtual ~FXStatusBar();
89   };
90 
91 }
92 
93 #endif
94