Laxkit
0.0.7.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
lax
rowframe.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) 2004-2010 by Tom Lechner
22
//
23
#ifndef _LAX_ROWFRAME_H
24
#define _LAX_ROWFRAME_H
25
26
#include <lax/anxapp.h>
27
#include <lax/boxarrange.h>
28
#include <lax/winframebox.h>
29
30
31
#define ROWFRAME_COLUMNS (1<<16)
32
#define ROWFRAME_VERTICAL (1<<16)
33
#define ROWFRAME_ROWS (1<<17)
34
#define ROWFRAME_HORIZONTAL (1<<17)
35
36
#define ROWFRAME_CENTER (1<<19|1<<22)
37
#define ROWFRAME_LEFT (1<<18)
38
#define ROWFRAME_HCENTER (1<<19)
39
#define ROWFRAME_RIGHT (1<<20)
40
#define ROWFRAME_TOP (1<<21)
41
#define ROWFRAME_VCENTER (1<<22)
42
#define ROWFRAME_BOTTOM (1<<23)
43
44
// these work with COLUMNS/ROWS/HORIZONTAL/VERTICAL to determine
45
// flags&BOX_FLOW_MASK
46
#define ROWFRAME_ROWS_TO_TOP (0<<24)
47
#define ROWFRAME_ROWS_TO_BOTTOM (1<<24)
48
#define ROWFRAME_COLS_TO_LEFT (0<<24)
49
#define ROWFRAME_COLS_TO_RIGHT (1<<24)
50
#define ROWFRAME_ROWS_LR (0<<25)
51
#define ROWFRAME_ROWS_RL (1<<25)
52
#define ROWFRAME_COLS_TB (0<<25)
53
#define ROWFRAME_COLS_BT (1<<25)
54
55
// how to fill gaps between boxes
56
// these refer to filling whole window
57
#define ROWFRAME_STRETCH (1<<27|1<<28)
58
#define ROWFRAME_STRETCHX (1<<27)
59
#define ROWFRAME_STRETCHY (1<<28)
60
#define ROWFRAME_SPACE (1<<29|1<<30)
61
#define ROWFRAME_SPACEX (1<<29)
62
#define ROWFRAME_SPACEY (1<<30)
63
64
// these refer to filling extra (width in cols) or (height in rows)
65
#define ROWFRAME_STRETCH_IN_ROW (1<<31)
66
#define ROWFRAME_STRETCH_IN_COL (1<<31)
67
68
namespace
Laxkit {
69
71
class
RowFrame
:
public
anXWindow
,
public
RowColBox
72
{
73
protected
:
74
public
:
75
unsigned
long
highlight,shadow,mobkcolor,bkcolor;
76
RowFrame
(
anXWindow
*parnt,
const
char
*nname,
const
char
*ntitle,
unsigned
long
nstyle,
77
int
xx,
int
yy,
int
ww,
int
hh,
int
brder,
78
anXWindow
*prev,
unsigned
long
owner,
const
char
*mes,
79
int
npad=0);
80
virtual
~
RowFrame
();
81
virtual
int
init
();
82
virtual
int
Sync
(
int
add=0);
// add=0, if 1 means addwindow
83
virtual
int
MoveResize
(
int
nx,
int
ny,
int
nw,
int
nh);
84
virtual
int
Resize
(
int
nw,
int
nh);
85
virtual
int
findWindowIndex
(
const
char
*name);
86
virtual
anXWindow
*
findWindow
(
const
char
*name);
87
virtual
int
AddNull
(
int
where=-1);
88
virtual
int
AddHSpacer(
int
npw,
int
nws,
int
nwg,
int
nhalign,
int
where=-1);
89
virtual
int
AddVSpacer(
int
npw,
int
nws,
int
nwg,
int
nhalign,
int
where=-1);
90
virtual
int
AddSpacer(
int
npw,
int
nws,
int
nwg,
int
nhalign,
91
int
nph,
int
nhs,
int
nhg,
int
nvalign,
92
int
where=-1);
93
virtual
int
AddWin
(
WinFrameBox
*box,
char
islocal=1,
int
where=-1);
94
virtual
int
AddWin
(
anXWindow
*win,
int
absorbcount,
int
where);
// adds with what is w/h in window, no stretch
95
virtual
int
AddWin
(
anXWindow
*win,
int
absorbcount,
96
int
npw,
int
nws,
int
nwg,
int
nhalign,
int
nhgap,
97
int
nph,
int
nhs,
int
nhg,
int
nvalign,
int
nvgap,
98
int
where);
99
virtual
void
Refresh
();
100
};
101
102
}
// namespace Laxkit
103
104
#endif
105
Mon Feb 17 2014 11:52:57, Laxkit