-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxrolo.h
More file actions
149 lines (125 loc) · 4.25 KB
/
xrolo.h
File metadata and controls
149 lines (125 loc) · 4.25 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/**** xrolo.h ****/ /**** formatted with 4-column tabs ****/
/********************************************************************
`xrolo' implements a simple rolodex application. It is composed
of the following modules:
`xrolo.c' -- widget creation for the top-level interface,
plus callbacks and support functions.
`xrolo.db.c' -- rolodex entry manipulation functions and
the state of the database.
`xrolo.help.t' -- a module for providing help system text.
`xrolo.index.c' -- the rolodex index manipulation functions.
`streamdb.c' -- a stream- or byte-oriented database object.
`strstr.c' -- a string search module.
`ctrlpanel.c' -- a control panel pseudo-widget.
`editor.c' -- a self-contained editor pseudo-widget.
`listshell.c' -- a list selection box pseudo-widget.
`help.c' -- a generalized help system.
`motif.c' -- OSF/Motif miscellaneous functions.
See these modules for more details.
********************************************************************/
#include <X11/StringDefs.h>
#include <Xm/Xm.h>
#include <Xm/Label.h>
#include <Xm/Form.h>
#include <Xm/Frame.h>
#include <Xm/PanedW.h>
#include <Xm/PushB.h>
#include <Xm/ToggleB.h>
#include <Xm/CascadeB.h>
#include <Xm/MainW.h>
#include <Xm/RowColumn.h>
#include <Xm/Separator.h>
#include <Xm/Protocols.h>
#include <Xm/FileSB.h>
#include "ctrlpanel.h"
#include "listshell.h"
#include "editor.h"
#include "dialog.h"
#include "help.h"
#include "xrolo.db.h"
#include "xrolo.index.h"
#include "version.h"
/*
`xrolo' constants:
*/
#define xrolo_EXIT_WARNING -1001
#define xrolo_OPEN_WARNING -1002
#define xrolo_EXIT_WARNING_MSG "Exit: unsaved changes!"
#define xrolo_OPEN_WARNING_MSG "Open: unsaved changes!"
#define xrolo_OPEN -2001
#define xrolo_SAVE_AS -2002
#define xrolo_DIR_MASK_MAX_LEN 200
#define xrolo_DIR_MASK "*.xrolo"
#define xrolo_INSERT -1
#define xrolo_ADD -2
#define xrolo_ASCEND -1
#define xrolo_DESCEND -2
#define xrolo_DEFAULT_VIEWPORT_ROWS 12
#define xrolo_DEFAULT_VIEWPORT_COLUMNS 40
#define xrolo_DEFAULT_INDEX_ROWS 15
#define xrolo_DEFAULT_INDEX_COLUMNS 30
#define xrolo_DEFAULT_DELIMITER "####\n"
#define xrolo_DEFAULT_PRINT_COMMAND "lp"
#define xrolo_DEFAULT_SORT_ROW 1
#define xrolo_DEFAULT_INDEX_ROW 1
#define xrolo_APP_CLASS "XRolodex"
/*
Application resources:
*/
typedef struct {
Boolean viewport_menubar;
int viewport_rows;
int viewport_columns;
int index_rows;
int index_columns;
int index_row;
int sort_row;
Boolean center_dialogs;
Boolean minimal_dialogs;
Boolean force_save;
Boolean index_stay_up;
Boolean find_sensitive;
Boolean find_wraparound;
char *delimiter;
char *print_command;
Boolean print_standard_output;
Boolean print_formfeed;
char *dir_mask;
} ApplicationData, *ApplicationDataPtr;
#define XtNviewportMenuBar "viewportMenuBar"
#define XtCViewportMenuBar "ViewportMenuBar"
#define XtNviewportRows "viewportRows"
#define XtCViewportRows "ViewportRows"
#define XtNviewportColumns "viewportColumns"
#define XtCViewportColumns "ViewportColumns"
#define XtNindexRows "indexRows"
#define XtCIndexRows "IndexRows"
#define XtNindexColumns "indexColumns"
#define XtCIndexColumns "IndexColumns"
#define XtNindexStayUp "indexStayUp"
#define XtNsortRow "sortRow"
#define XtCSortRow "SortRow"
#define XtNindexRow "indexRow"
#define XtCIndexRow "IndexRow"
#define XtCIndexStayUp "IndexStayUp"
#define XtNcenterDialogs "centerDialogs"
#define XtCCenterDialogs "CenterDialogs"
#define XtNminimalDialogs "minimalDialogs"
#define XtCMinimalDialogs "MinimalDialogs"
#define XtNforceSave "forceSave"
#define XtCForceSave "ForceSave"
#define XtNfindSensitive "findSensitive"
#define XtCFindSensitive "FindSensitive"
#define XtNfindWraparound "findWraparound"
#define XtCFindWraparound "FindWraparound"
#define XtCMinimalDialogs "MinimalDialogs"
#define XtNentryDelimiter "entryDelimiter"
#define XtCEntryDelimiter "EntryDelimiter"
#define XtNprintCommand "printCommand"
#define XtCPrintCommand "PrintCommand"
#define XtNprintStandardOutput "printStandardOutput"
#define XtCPrintStandardOutput "PrintStandardOutput"
#define XtNprintFormfeed "printFormfeed"
#define XtCPrintFormfeed "PrintFormfeed"
#define XtNdirectoryMask "directoryMask"
#define XtCDirectoryMask "DirectoryMask"