1
////////////////////////////////////////////////////////////////////////////////
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 2000, Vrije Universiteit Amsterdam.
5
// Author: Frank Dehne (frank@cs.vu.nl).
7
// TCM is free software; you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License as published by
9
// the Free Software Foundation; either version 2 of the License, or
10
// (at your option) any later version.
12
// TCM 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
15
// GNU General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with TCM; if not, write to the Free Software
19
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21
////////////////////////////////////////////////////////////////////////////////
22
#include "nodealignmentdialog.h"
25
#include "AlignTop.xbm"
26
#include "AlignBottom.xbm"
27
#include "AlignLeft.xbm"
28
#include "AlignRight.xbm"
29
#include "AlignHorizontal.xbm"
30
#include "AlignVertical.xbm"
32
NodeAlignmentDialog::NodeAlignmentDialog(Widget w):
33
NToggleListDialog(w, False) {
34
SetAutoUnmanage(False);
37
void NodeAlignmentDialog::Configure() {
38
NToggleListDialog::Configure();
39
List<string *> labels;
40
labels.add(new string("Node Alignment"));
41
List<List<string *> *> items;
43
l.add(new string("Top"));
44
l.add(new string("Horizontal"));
45
l.add(new string("Bottom"));
46
l.add(new string("Left"));
47
l.add(new string("Vertical"));
48
l.add(new string("Right"));
50
CreateToggleLists(&labels, &items);
53
ManageHelpButton(True);
54
SetHelpButtonLabel("Default");
55
Bitmap topIcon = {AlignTop_width, AlignTop_height,
57
Bitmap horizIcon = {AlignHorizontal_width, AlignHorizontal_height,
58
AlignHorizontal_bits};
59
Bitmap bottomIcon = {AlignBottom_width, AlignBottom_height,
61
Bitmap leftIcon = {AlignLeft_width, AlignLeft_height,
63
Bitmap vertIcon = {AlignVertical_width, AlignVertical_height,
65
Bitmap rightIcon = {AlignRight_width, AlignRight_height,
67
SetItemBitmap(0, 0, &topIcon);
68
SetItemBitmap(0, 1, &horizIcon);
69
SetItemBitmap(0, 2, &bottomIcon);
70
SetItemBitmap(0, 3, &leftIcon);
71
SetItemBitmap(0, 4, &vertIcon);
72
SetItemBitmap(0, 5, &rightIcon);
73
List<Widget> *tl = (*GetToggleList())[0];
74
Widget rc = XtParent((*tl)[0]);
75
AddLiteClue((*tl)[0], "Align top");
76
AddLiteClue((*tl)[1], "Align horizontal");
77
AddLiteClue((*tl)[2], "Align bottom");
78
AddLiteClue((*tl)[3], "Align left");
79
AddLiteClue((*tl)[4], "Align vertical");
80
AddLiteClue((*tl)[5], "Align right");
81
XtVaSetValues(rc, XmNnumColumns, 2,
82
XmNorientation, XmHORIZONTAL, 0);