Laxkit
0.0.7.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
lax
shortcutwindow.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) 2012-2013 by Tom Lechner
22
//
23
#ifndef _LAX_SHORTCUTWINDOW_H
24
#define _LAX_SHORTCUTWINDOW_H
25
26
27
#include <lax/rowframe.h>
28
#include <lax/menuinfo.h>
29
30
namespace
Laxkit {
31
32
enum
ShortcutWindowStyles
33
{
34
SHORTCUTW_Show_Search = (1<<16),
35
SHORTCUTW_Load_Save = (1<<17),
36
SHORTCUTW_MAX
37
};
38
39
class
ShortcutWindow
:
public
Laxkit::RowFrame
40
{
41
protected
:
42
43
char
*initialarea;
44
Laxkit::ShortcutHandler
*sc;
45
//virtual int PerformAction(int action);
46
47
unsigned
long
swin_style;
48
int
search_type;
49
void
UpdateSearch
();
50
public
:
51
char
*textheader;
52
53
ShortcutWindow
(
Laxkit::anXWindow
*parnt,
const
char
*nname,
const
char
*ntitle,
unsigned
long
nstyle,
54
int
xx,
int
yy,
int
ww,
int
hh,
int
brder,
55
const
char
*place=NULL);
56
virtual
~
ShortcutWindow
();
57
virtual
const
char
*whattype() {
return
"ShortcutWindow"
; }
58
virtual
int
init();
59
//virtual Laxkit::ShortcutHandler *GetShortcuts();
60
//virtual int CharInput(unsigned int ch, const char *buffer,int len,unsigned int state,const Laxkit::LaxKeyboard *d);
61
virtual
int
Event(
const
Laxkit::EventData
*e,
const
char
*mes);
62
63
virtual
int
MouseMove (
int
x,
int
y,
unsigned
int
state,
const
LaxMouse
*m);
64
virtual
int
LBDown(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
65
virtual
int
LBUp(
int
x,
int
y,
unsigned
int
state,
const
LaxMouse
*d);
66
//virtual int MBDown(int x,int y,unsigned int state,int count,const LaxMouse *d);
67
//virtual int MBUp(int x,int y,unsigned int state,const LaxMouse *d);
68
//virtual int RBDown(int x,int y,unsigned int state,int count,const LaxMouse *d);
69
//virtual int RBUp(int x,int y,unsigned int state,const LaxMouse *d);
70
virtual
int
WheelUp(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
71
virtual
int
WheelDown(
int
x,
int
y,
unsigned
int
state,
int
count,
const
LaxMouse
*d);
72
virtual
int
CharInput(
unsigned
int
ch,
const
char
*buffer,
int
len,
unsigned
int
state,
const
LaxKeyboard
*kb);
73
virtual
int
SetSearch
(
const
char
*str,
int
searchtype=-1);
74
75
virtual
LaxFiles::Attribute
*dump_out_atts(
LaxFiles::Attribute
*att,
int
what,
anObject
*context);
76
virtual
void
dump_in_atts(
LaxFiles::Attribute
*att,
int
flag,
anObject
*context);
77
78
};
79
80
}
//namespace Laxkit
81
82
#endif
83
Mon Feb 17 2014 11:52:57, Laxkit