Laxkit
0.0.7.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
lax
messagebar.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-2012 by Tom Lechner
22
//
23
#ifndef _LAX_MESSAGEBAR_H
24
#define _LAX_MESSAGEBAR_H
25
26
#include <lax/anxapp.h>
27
#include <lax/buttondowninfo.h>
28
29
namespace
Laxkit {
30
31
enum
MessageBarTypes {
32
//***these must jive with xymesbar and filepreviewer defines
33
MB_LEFT =(1<<16),
34
MB_RIGHT =(1<<17),
35
MB_CENTERX =(1<<18),
36
MB_CENTERY =(1<<19),
37
MB_CENTER =(1<<18 | 1<<19),
38
MB_TOP =(1<<20),
39
MB_BOTTOM =(1<<21),
40
MB_MOVE =(1<<22),
41
MB_COPY =(1<<23),
42
MB_WRAP =(1<<24),
43
MB_LEAVE_DESTROYS =(1<<25),
44
MB_BINARY =(1<<26),
45
46
MB_MAX
47
};
48
49
class
MessageBar
:
public
anXWindow
50
{
51
protected
:
52
int
lbdown,firsttime;
53
int
msx,msy,
ox
,
oy
;
54
double
ex
,
ey
,fasc,fdes;
// ex,ey are extents
55
char
**thetext;
56
int
nlines;
57
double
*indents;
58
unsigned
long
textcolor,bkcolor,bordercolor;
59
ButtonDownInfo
buttondown;
60
public
:
61
int
padx,pady;
62
MessageBar
(
anXWindow
*pwindow,
63
const
char
*nname,
64
const
char
*ntitle,
65
unsigned
long
nstyle,
66
int
nx,
int
ny,
int
nw,
int
nh,
int
brder,
const
char
*newtext);
67
virtual
~
MessageBar
();
68
virtual
int
SetText
(
const
char
*newtext);
69
virtual
int
SetupMetrics
();
70
virtual
char
*
GetText
();
71
virtual
int
init();
72
virtual
int
Event(
const
EventData
*e,
const
char
*mes);
73
virtual
void
Refresh();
74
virtual
const
char
*whattype() {
return
"MessageBar"
; }
75
virtual
int
LBDown(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
76
virtual
int
MBDown(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
77
virtual
int
RBDown(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
78
virtual
int
LBUp(
int
x,
int
y,
unsigned
int
state,
const
LaxMouse
*d);
79
virtual
int
MBUp(
int
x,
int
y,
unsigned
int
state,
const
LaxMouse
*d);
80
virtual
int
RBUp(
int
x,
int
y,
unsigned
int
state,
const
LaxMouse
*d);
81
virtual
int
WheelUp(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
82
virtual
int
WheelDown(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
83
virtual
int
MouseMove
(
int
x,
int
y,
unsigned
int
state,
const
LaxMouse
*d);
84
virtual
int
MoveResize(
int
nx,
int
ny,
int
nw,
int
nh);
85
virtual
int
Resize(
int
nw,
int
nh);
86
87
//serializing aids
88
virtual
LaxFiles::Attribute
*
dump_out_atts
(
LaxFiles::Attribute
*att,
int
what,
anObject
*context);
89
virtual
void
dump_in_atts
(
LaxFiles::Attribute
*att,
int
flag,
anObject
*context);
90
};
91
92
}
// namespace Laxkit
93
94
#endif
95
Mon Feb 17 2014 11:52:57, Laxkit