Laxkit
0.0.7.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
lax
fontdialog.h
1
//
2
//
3
// The Laxkit, a windowing toolkit
4
// Please consult http://laxkit.sourceforge.net about where to send any
5
// correspondence about this software.
6
//
7
// This library is free software; you can redistribute it and/or
8
// modify it under the terms of the GNU Library General Public
9
// License as published by the Free Software Foundation; either
10
// version 2 of the License, or (at your option) any later version.
11
//
12
// This library is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
// Library General Public License for more details.
16
//
17
// You should have received a copy of the GNU Library General Public
18
// License along with this library; if not, write to the Free Software
19
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
//
21
// Copyright (C) 2007 by Tom Lechner
22
//
23
24
#ifndef _LAX_FONTDIALOG_H
25
#define _LAX_FONTDIALOG_H
26
27
#include <lax/rowframe.h>
28
#include <lax/lineinput.h>
29
#include <lax/menuselector.h>
30
31
32
#define FONTD_NO_DEL_WIN (1<<16)
33
34
namespace
Laxkit {
35
36
//-------------------------------------- FontDialogFont -------------------------------------
40
class
FontDialogFont
41
{
42
public
:
43
char
*family;
44
char
*style;
45
char
*file;
46
double
size;
47
48
FontDialogFont
();
49
virtual
~
FontDialogFont
();
50
};
51
52
//-------------------------------------- FontDialog -------------------------------------
53
class
FontDialog
:
public
RowFrame
54
{
55
protected
:
56
char
*sampletext;
57
FcConfig *fcconfig;
58
double
defaultsize;
59
unsigned
long
dialog_style;
60
PtrStack<FontDialogFont>
fonts;
61
int
currentfont;
62
MenuSelector
*fontlist;
63
LineEdit
*text;
64
LineInput
*fontfamily, *fontstyle, *fontsize, *fontfile;
65
66
public
:
67
FontDialog
(
anXWindow
*parnt,
const
char
*nname,
const
char
*ntitle,
unsigned
long
nstyle,
68
int
xx,
int
yy,
int
ww,
int
hh,
int
brder,
69
unsigned
long
nowner,
const
char
*nsend,
70
unsigned
long
ndstyle,
71
const
char
*fam,
const
char
*style,
int
size);
72
virtual
~
FontDialog
();
73
74
virtual
const
char
*whattype() {
return
"FontDialog"
; }
75
virtual
int
init();
76
virtual
int
CharInput(
unsigned
int
ch,
const
char
*buffer,
int
len,
unsigned
int
state,
const
LaxKeyboard
*kb);
77
virtual
int
Event(
const
EventData
*data,
const
char
*mes);
78
79
virtual
int
send
();
80
virtual
void
UpdateStyles
();
81
virtual
void
UpdateSample();
82
};
83
84
}
// namespace Laxkit
85
86
#endif
87
Mon Feb 17 2014 11:52:56, Laxkit