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,2017 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=NULL,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

Copyright © 1997-2016 Jeroen van der Zijp