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

FXDockTitle.h
1 /********************************************************************************
2 * *
3 * D o c k T i t l e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2005,2022 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (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 *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXDOCKTITLE_H
22 #define FXDOCKTITLE_H
23 
24 #ifndef FXDOCKHANDLER_H
25 #include "FXDockHandler.h"
26 #endif
27 
28 namespace FX {
29 
30 
36 class FXAPI FXDockTitle : public FXDockHandler {
37  FXDECLARE(FXDockTitle)
38 protected:
39  FXString caption; // Caption text
40  FXFont *font; // Caption font
41  FXColor captionColor; // Caption color
42 protected:
43  FXDockTitle();
44 private:
45  FXDockTitle(const FXDockTitle&);
46  FXDockTitle& operator=(const FXDockTitle&);
47 public:
48  long onPaint(FXObject*,FXSelector,void*);
49  long onCmdSetValue(FXObject*,FXSelector,void*);
50  long onCmdSetStringValue(FXObject*,FXSelector,void*);
51  long onCmdGetStringValue(FXObject*,FXSelector,void*);
52 public:
53 
55  FXDockTitle(FXComposite* p,const FXString& text,FXObject* tgt=nullptr,FXSelector sel=0,FXuint opts=FRAME_NORMAL|JUSTIFY_CENTER_X|JUSTIFY_CENTER_Y,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0);
56 
58  virtual void create();
59 
61  virtual void detach();
62 
64  virtual FXint getDefaultWidth();
65 
67  virtual FXint getDefaultHeight();
68 
70  void setCaption(const FXString& text);
71 
73  FXString getCaption() const { return caption; }
74 
76  void setFont(FXFont *fnt);
77 
79  FXFont* getFont() const { return font; }
80 
82  FXColor getCaptionColor() const { return captionColor; }
83 
85  void setCaptionColor(FXColor clr);
86 
88  void setJustify(FXuint mode);
89 
91  FXuint getJustify() const;
92 
94  virtual void save(FXStream& store) const;
95 
97  virtual void load(FXStream& store);
98 
100  virtual ~FXDockTitle();
101  };
102 
103 }
104 
105 #endif
Base composite.
Definition: FXComposite.h:32
FXColor getCaptionColor() const
Get the current caption color.
Definition: FXDockTitle.h:82
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXFont * getFont() const
Get caption font.
Definition: FXDockTitle.h:79
A dock title is used to move its container, a dock bar.
Definition: FXDockTitle.h:36
FXString getCaption() const
Get the caption for the grip.
Definition: FXDockTitle.h:73
Definition: FX4Splitter.h:28
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
Font class.
Definition: FXFont.h:137
The dock handler exists as a common base class for tool bar grip and dock title.
Definition: FXDockHandler.h:35
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp