1
1
//////////////////////////////////////////////////////////////////////////
3
3
// pgAdmin III - PostgreSQL Tools
4
// RCS-ID: $Id: pgConstraints.h,v 1.12 2004/01/02 23:15:00 dpage Exp $
5
// Copyright (C) 2002 - 2004, The pgAdmin Development Team
4
// RCS-ID: $Id: pgConstraints.h 4874 2006-01-06 17:33:27Z dpage $
5
// Copyright (C) 2002 - 2006, The pgAdmin Development Team
6
6
// This software is released under the Artistic Licence
8
8
// pgConstraints.h - Constraint collection
13
13
#ifndef __CONSTRAINTS_H
14
14
#define __CONSTRAINTS_H
16
#include "pgCollection.h"
19
class pgConstraints : public pgCollection
19
class pgConstraintCollection : public pgTableObjCollection
22
pgConstraints(pgSchema *sch);
24
int GetIcon() { return PGICON_CONSTRAINT; }
25
bool IsCollectionForType(int objType);
26
bool CanCreate() { return true; };
27
wxString GetHelpPage(bool forCreate) const { return wxT("sql-altertable"); }
22
pgConstraintCollection(pgaFactory *factory, pgTable *table);
23
~pgConstraintCollection();
24
wxString GetHelpPage(bool forCreate) const { return wxT("pg/sql-altertable"); }
25
bool CanCreate() { return false; }
28
26
wxMenu *GetNewMenu();
30
void ShowTreeDetail(wxTreeCtrl *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane);
28
void ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane);
33
class pgConstraintFactory : public pgTableObjFactory
36
pgConstraintFactory();
37
virtual dlgProperty *CreateDialog(class frmMain *,class pgObject *,class pgObject *) { return 0; }
38
virtual pgCollection *CreateCollection(pgObject *obj);
40
extern pgConstraintFactory constraintFactory;
41
extern pgaCollectionFactory constraintCollectionFactory;