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

FXFontDialog.h
1 /********************************************************************************
2 * *
3 * F o n t S e l e c t i o n D i a l o g *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1999,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 FXFONTDIALOG_H
22 #define FXFONTDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXFontSelector;
32 
33 
35 class FXAPI FXFontDialog : public FXDialogBox {
36  FXDECLARE(FXFontDialog)
37 protected:
38  FXFontSelector *fontbox;
39 protected:
40  static const FXchar sectionName[];
41 protected:
42  FXFontDialog(){}
43  void loadSettings();
44  void saveSettings();
45 private:
46  FXFontDialog(const FXFontDialog&);
47  FXFontDialog &operator=(const FXFontDialog&);
48 public:
49 
51  FXFontDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
52 
54  FXFontDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
55 
57  void setFont(const FXString& string);
58 
60  FXString getFont() const;
61 
63  void setFontDesc(const FXFontDesc& fontdesc);
64 
66  const FXFontDesc& getFontDesc() const;
67 
69  void setSampleText(const FXString& sampletext);
70 
72  FXString getSampleText() const;
73 
75  virtual void save(FXStream& store) const;
76 
78  virtual void load(FXStream& store);
79 
81  virtual ~FXFontDialog();
82  };
83 
84 }
85 
86 #endif
DialogBox window.
Definition: FXDialogBox.h:37
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Font description.
Definition: FXFont.h:115
Font selection dialog.
Definition: FXFontDialog.h:35
Definition: FX4Splitter.h:28
Font selection widget.
Definition: FXFontSelector.h:41
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp