~pac72/ubuntu/lucid/ddd/devel

« back to all changes in this revision

Viewing changes to ddd/mydialogs.C

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2004-07-22 03:49:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040722034937-cysl08t1jvba4jrx
Tags: 1:3.3.9-3
USERINFO has been renamed to USERINFO.txt; adjust debian/rules code
to match, to get correct information on the About DDD dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// $Id: mydialogs.C,v 1.36 2001/04/26 11:08:07 zeller Exp $
 
1
// $Id$
2
2
// Create dialogs to select display expressions
3
3
 
4
4
// Copyright (C) 1995 Technische Universitaet Braunschweig, Germany.
27
27
// or send a mail to the DDD developers <ddd@gnu.org>.
28
28
 
29
29
char mydialogs_rcsid[] =
30
 
    "$Id: mydialogs.C,v 1.36 2001/04/26 11:08:07 zeller Exp $";
31
 
 
32
 
#ifdef __GNUG__
33
 
#pragma implementation
34
 
#endif
 
30
    "$Id$";
35
31
 
36
32
//-----------------------------------------------------------------------------
37
33
// Create dialogs to select display expressions
69
65
                                     ArgList args, Cardinal num_args)
70
66
{
71
67
    if (app_data.transient_dialogs)
72
 
        return XmCreateSelectionDialog(parent, CONST_CAST(char *,name), args, num_args);
 
68
        return XmCreateSelectionDialog(parent, XMST(name), args, num_args);
73
69
 
74
70
    ArgList new_args = new Arg[num_args + 10];
75
71
    Cardinal arg = 0;
97
93
    Widget shell = verify(XtCreateWidget(shell_name.chars(), 
98
94
                                         topLevelShellWidgetClass,
99
95
                                         parent, new_args, arg));
100
 
    Widget box = XmCreateSelectionBox(shell, CONST_CAST(char *,name), new_args, arg);
 
96
    Widget box = XmCreateSelectionBox(shell, XMST(name), new_args, arg);
101
97
 
102
98
    delete[] new_args;
103
99
 
124
120
// NOTIFY:          Whether callbacks should be invoked
125
121
//
126
122
void setLabelList (Widget  selectionList,
127
 
                   string  label_list[],
128
 
                   bool    selected[],
 
123
                   const string  label_list[],
 
124
                   const bool selected[],
129
125
                   int     list_length,
130
126
                   bool    highlight_title,
131
127
                   bool    notify)
162
158
// Replace all elements in SELECTIONLIST with the corresponding
163
159
// entries in LABEL_LIST (i.e. with the same leading number).
164
160
void updateLabelList (Widget  selectionList,
165
 
                      string  label_list[],
 
161
                      const string  label_list[],
166
162
                      int     list_length)
167
163
{
168
164
    if (selectionList == 0)
212
208
// Fill the item numbers in DISP_NRS
213
209
void getItemNumbers(Widget selectionList, IntArray& numbers)
214
210
{
215
 
    static IntArray empty;
 
211
    static const IntArray empty;
216
212
    numbers = empty;
217
213
 
218
214
    if (selectionList == 0)
242
238
 
243
239
// Create an array of XmStrings from the list LABEL_LIST of length
244
240
// LIST_LENGTH.  If HIGHLIGHT_TITLE is set, let the first line be bold.
245
 
XmStringTable makeXmStringTable (string label_list[],
 
241
XmStringTable makeXmStringTable (const string label_list[],
246
242
                                 int list_length, bool highlight_title)
247
243
{
248
244
    XmStringTable xmlist = 
251
247
    int i = 0;
252
248
    if (highlight_title && i < list_length)
253
249
    {
254
 
        xmlist[i] = XmStringCreateLtoR(CONST_CAST(char*,label_list[i].chars()), LIST_TITLE_CHARSET);
 
250
        xmlist[i] = XmStringCreateLtoR(XMST(label_list[i].chars()), LIST_TITLE_CHARSET);
255
251
        i++;
256
252
    }
257
253
        
258
254
    while (i < list_length)
259
255
    {
260
 
        xmlist[i] = XmStringCreateLtoR(CONST_CAST(char*,label_list[i].chars()), LIST_CHARSET);
 
256
        xmlist[i] = XmStringCreateLtoR(XMST(label_list[i].chars()), LIST_CHARSET);
261
257
        i++;
262
258
    }
263
259