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
|
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin III - PostgreSQL Tools
//
// Copyright (C) 2002 - 2013, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// dlgIndex.h - Index property
//
//////////////////////////////////////////////////////////////////////////
#ifndef __DLG_INDEXPROP
#define __DLG_INDEXPROP
#include "dlg/dlgProperty.h"
class pgIndex;
class pgIndexBase;
#define btnAddCol CTRL_BUTTON("btnAddCol")
#define btnRemoveCol CTRL_BUTTON("btnRemoveCol")
class dlgIndexBase : public dlgCollistProperty
{
public:
dlgIndexBase(pgaFactory *factory, frmMain *frame, const wxString &resName, pgIndexBase *index, pgTable *parentNode);
dlgIndexBase(pgaFactory *factory, frmMain *frame, const wxString &resName, ctlListView *colList);
void OnSelectComboCol(wxCommandEvent &ev);
void OnSelectListCol(wxListEvent &ev);
void OnSelectCol();
void CheckChange();
pgObject *GetObject();
int Go(bool modal);
protected:
pgIndexBase *index;
private:
DECLARE_EVENT_TABLE()
};
class dlgIndex : public dlgIndexBase
{
public:
dlgIndex(pgaFactory *factory, frmMain *frame, pgIndex *index, pgTable *parentNode);
int Go(bool modal);
void CheckChange();
wxString GetColumns();
wxString GetSql();
pgObject *CreateObject(pgCollection *collection);
private:
#ifdef __WXMAC__
void OnChangeSize(wxSizeEvent &ev);
#endif
void OnSelectType(wxCommandEvent &ev);
void OnDescChange(wxCommandEvent &ev);
void OnAddCol(wxCommandEvent &ev);
void OnRemoveCol(wxCommandEvent &ev);
wxString m_previousType;
DECLARE_EVENT_TABLE()
};
#endif
|