2
The contents of this file are subject to the Initial Developer's Public
3
License Version 1.0 (the "License"); you may not use this file except in
4
compliance with the License. You may obtain a copy of the License here:
5
http://www.flamerobin.org/license.html.
7
Software distributed under the License is distributed on an "AS IS"
8
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
9
License for the specific language governing rights and limitations under
12
The Original Code is FlameRobin (TM).
14
The Initial Developer of the Original Code is Milan Babuskov.
16
Portions created by the original developer
17
are Copyright (C) 2004 Milan Babuskov.
24
// For compilers that support precompilation, includes "wx/wx.h".
25
#include "wx/wxprec.h"
31
// for all others, include the necessary headers (this file is usually all you
32
// need because it includes almost all "standard" wxWindows headers
37
// -*- C++ -*- generated by wxGlade 0.2.2 on Thu Sep 09 11:22:32 2004
40
#include "ReorderFieldsDialog.h"
42
//! included xpm files, so that icons are compiled into executable
43
namespace reorder_icons {
48
ReorderFieldsDialog::ReorderFieldsDialog(wxWindow* parent, YTable *table):
49
wxDialog(parent, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize)
52
tableM->checkAndLoadColumns();
55
// begin wxGlade: ReorderFieldsDialog::ReorderFieldsDialog
56
panel_1 = new wxPanel(this, -1);
57
const wxString list_box_1_choices[] = {
60
list_box_1 = new wxListBox(panel_1, -1, wxDefaultPosition, wxDefaultSize, 1, list_box_1_choices, wxLB_SINGLE);
61
button_up = new wxBitmapButton(panel_1, ID_button_up, wxBitmap(reorder_icons::up_xpm));
62
button_down = new wxBitmapButton(panel_1, ID_button_down, wxBitmap(reorder_icons::down_xpm));
63
button_ok = new wxButton(panel_1, ID_button_ok, _("OK"));
64
button_cancel = new wxButton(panel_1, ID_button_cancel, _("Cancel"));
70
SetTitle(_("Reordering fields of table ") + std2wx(table->getName()));
75
void ReorderFieldsDialog::set_properties()
77
// begin wxGlade: ReorderFieldsDialog::set_properties
78
SetSize(wxSize(303, 281));
79
list_box_1->SetSelection(0);
80
button_up->SetSize(wxSize(23, 23));
81
button_down->SetSize(wxSize(23, 23));
82
button_ok->SetDefault();
87
void ReorderFieldsDialog::do_layout()
89
// begin wxGlade: ReorderFieldsDialog::do_layout
90
wxBoxSizer* sizer_1 = new wxBoxSizer(wxHORIZONTAL);
91
wxBoxSizer* sizer_2 = new wxBoxSizer(wxVERTICAL);
92
wxBoxSizer* sizer_3 = new wxBoxSizer(wxHORIZONTAL);
93
wxBoxSizer* sizer_4 = new wxBoxSizer(wxVERTICAL);
94
wxBoxSizer* sizer_5 = new wxBoxSizer(wxHORIZONTAL);
95
sizer_2->Add(list_box_1, 1, wxALL|wxEXPAND, 5);
96
sizer_3->Add(button_up, 0, wxALL, 3);
97
sizer_3->Add(button_down, 0, wxALL, 3);
98
sizer_5->Add(button_ok, 0, wxALL, 3);
99
sizer_5->Add(button_cancel, 0, wxALL, 3);
100
sizer_4->Add(sizer_5, 1, wxALIGN_RIGHT, 0);
101
sizer_3->Add(sizer_4, 1, wxEXPAND, 0);
102
sizer_2->Add(sizer_3, 0, wxALL|wxEXPAND, 2);
103
panel_1->SetAutoLayout(true);
104
panel_1->SetSizer(sizer_2);
105
sizer_2->Fit(panel_1);
106
sizer_2->SetSizeHints(panel_1);
107
sizer_1->Add(panel_1, 1, wxEXPAND, 0);