1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
5
// Copyright (C) 2002 - 2013, The pgAdmin Development Team
6
// This software is released under the PostgreSQL Licence
8
// pgEventTrigger.h PostgreSQL Event Trigger
10
//////////////////////////////////////////////////////////////////////////
12
#ifndef PGEVENTTRIGGER_H
13
#define PGEVENTTRIGGER_H
15
#include "pgDatabase.h"
20
class pgEventTriggerFactory : public pgDatabaseObjFactory
23
pgEventTriggerFactory();
24
virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent);
25
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr = wxEmptyString);
26
virtual pgCollection *CreateCollection(pgObject *obj);
27
virtual ~pgEventTriggerFactory() {};
38
extern pgEventTriggerFactory eventTriggerFactory;
40
class pgEventTrigger : public pgDatabaseObject
43
pgEventTrigger(const wxString &newName = wxT(""));
45
wxString GetTranslatedMessage(int kindOfMessage) const;
46
void ShowTreeDetail(ctlTree *browser, frmMain *form = 0, ctlListView *properties = 0, ctlSQLBox *sqlPane = 0);
47
bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded);
49
wxString GetSql(ctlTree *browser);
50
pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
54
wxString GetFunction() const
58
void iSetFunction(const wxString &s)
62
wxString GetWhen() const
66
void iSetWhen(const wxString &s)
70
OID GetFunctionOid() const
74
void iSetFunctionOid(const OID d)
78
OID GetSchemaOid() const
82
void iSetSchemaOid(const OID d)
86
wxString GetSource() const
90
void iSetSource(const wxString &s)
94
wxString GetLanguage() const
98
void iSetLanguage(const wxString &s)
102
wxString GetEventName() const
106
wxString GetEnableStatus() const
110
void iSetEnableStatus(const wxString &s)
114
void iSetEventName(const wxString &s)
119
bool GetEnabled() const
123
void iSetEnabled(const bool b)
127
void SetEnabled(ctlTree *browser, const bool b);
131
wxString function, when, language, source, eventName, enableStatus;
132
OID functionOid, schemaOid;
134
pgFunction *eventTriggerFunction;
137
class pgEventTriggerCollection : public pgDatabaseObjCollection
140
pgEventTriggerCollection(pgaFactory *factory, pgDatabase *db);
141
wxString GetTranslatedMessage(int kindOfMessage) const;
144
class enabledisableEventTriggerFactory : public contextActionFactory
147
enabledisableEventTriggerFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar *toolbar);
148
wxWindow *StartDialog(frmMain *form, pgObject *obj);
149
bool CheckEnable(pgObject *obj);
150
bool CheckChecked(pgObject *obj);
b'\\ No newline at end of file'