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

FXDockTitle.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * D o c k T i t l e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2005,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: FXDockTitle.h,v 1.3 2006/01/22 17:58:01 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXDOCKTITLE_H
25 #define FXDOCKTITLE_H
26 
27 #ifndef FXDOCKHANDLER_H
28 #include "FXDockHandler.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /**
35 * A dock title is used to move its container, a dock bar.
36 * The dock title is also used simultaneously to provide a
37 * caption above the dock bar.
38 */
41 protected:
42  FXString caption; // Caption text
43  FXFont *font; // Caption font
44  FXColor captionColor; // Caption color
45 protected:
46  FXDockTitle();
47 private:
48  FXDockTitle(const FXDockTitle&);
49  FXDockTitle& operator=(const FXDockTitle&);
50 public:
51  long onPaint(FXObject*,FXSelector,void*);
52  long onCmdSetValue(FXObject*,FXSelector,void*);
53  long onCmdSetStringValue(FXObject*,FXSelector,void*);
54  long onCmdGetStringValue(FXObject*,FXSelector,void*);
55 public:
56 
57  /// Construct dock bar title widget
59 
60  /// Create server-side resources
61  virtual void create();
62 
63  /// Detach server-side resources
64  virtual void detach();
65 
66  /// Return default width
67  virtual FXint getDefaultWidth();
68 
69  /// Return default height
70  virtual FXint getDefaultHeight();
71 
72  /// Set the caption for the grip
73  void setCaption(const FXString& text);
74 
75  /// Get the caption for the grip
76  FXString getCaption() const { return caption; }
77 
78  /// Set caption font
79  void setFont(FXFont *fnt);
80 
81  /// Get caption font
82  FXFont* getFont() const { return font; }
83 
84  /// Get the current caption color
85  FXColor getCaptionColor() const { return captionColor; }
86 
87  /// Set the current caption color
88  void setCaptionColor(FXColor clr);
89 
90  /// Set the current justification mode.
91  void setJustify(FXuint mode);
92 
93  /// Get the current justification mode.
94  FXuint getJustify() const;
95 
96  /// Save to stream
97  virtual void save(FXStream& store) const;
98 
99  /// Load from stream
100  virtual void load(FXStream& store);
101 
102  /// Destroy
103  virtual ~FXDockTitle();
104  };
105 
106 }
107 
108 #endif
Contents centered horizontally.
Definition: FXFrame.h:40
unsigned int FXuint
Definition: fxdefs.h:389
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
Base composite.
Definition: FXComposite.h:35
#define NULL
Definition: fxdefs.h:41
FXuint FXColor
Definition: fxdefs.h:447
A dock title is used to move its container, a dock bar.
Definition: FXDockTitle.h:39
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:390
Regular raised/thick border.
Definition: FXWindow.h:82
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
Font class.
Definition: FXFont.h:142
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92
The dock handler exists as a common base class for tool bar grip and dock title.
Definition: FXDockHandler.h:38
Contents centered vertically.
Definition: FXFrame.h:44
FXString provides essential string manipulation capabilities.
Definition: FXString.h:33

Copyright © 1997-2005 Jeroen van der Zijp