1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/* -*- mode: C++; tab-width: 4 -*- */
/* ===================================================================== *\
Copyright (c) 2000-2001 Palm, Inc. or its subsidiaries.
All rights reserved.
This file is part of the Palm OS Emulator.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
\* ===================================================================== */
#ifndef EmDlgFltk_h
#define EmDlgFltk_h
#include "EmDlg.h"
// For EmDlgFltkFactory.cpp
class Fl_Widget;
void PrvSetWidgetID (Fl_Widget* o, EmDlgItemID id);
// For fltk_main.cpp
void HandleDialogs (void);
void CloseAllDialogs (void);
// Fl_Push_Button is a button that can be configured as the Default
// Button (draws with the Return Arrow and responds to the Return
// key), Cancel Button (responds to the Escape Key), or a Normal
// Button (no special drawing or keyboard handling).
#include <FL/Fl_Return_Button.H>
class Fl_Push_Button : public Fl_Return_Button
{
public:
Fl_Push_Button (int x, int y, int w, int h, const char* l = NULL) :
Fl_Return_Button (x, y, w, h, l),
fType (kNormal)
{}
virtual int handle (int);
void SetDefaultButton (void) { fType = kDefault; }
void SetCancelButton (void) { fType = kCancel; }
void SetNormalButton (void) { fType = kNormal; }
protected:
virtual void draw (void);
private:
enum
{
kNormal,
kDefault,
kCancel
};
int fType;
};
#endif /* EmDlgFltk_h */
|