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 74 75 76 77 78 79 80 81 82 83 84 85
|
//////////////////////////////////////////////////////////////////////////
//
// pgAdmin III - PostgreSQL Tools
//
// Copyright (C) 2002 - 2014, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
// frmConfig.h - Configuration tool
//
//////////////////////////////////////////////////////////////////////////
#ifndef FRMCONFIG_H
#define FRMCONFIG_H
#include <wx/textbuf.h>
class pgConn;
class ctlListView;
class frmMain;
extern wxImageList *configImageList;
class frmConfig : public pgFrame
{
public:
enum tryMode
{
NONE = 0,
ANYFILE,
HBAFILE,
MAINFILE,
PGPASSFILE
};
static frmConfig *Create(const wxString &title, const wxString &configFile, tryMode mode);
void Go();
void DoOpen(const wxString &fn = wxEmptyString);
protected:
frmConfig(const wxString &title, const wxString &configFile);
frmConfig(frmMain *parent, const wxString &title, pgConn *conn);
~frmConfig();
virtual void DisplayFile(const wxString &str) = 0;
virtual void WriteFile(pgConn *conn = 0) = 0;
virtual wxString GetHintString()
{
return wxEmptyString;
}
void OpenLastFile();
void InitFrame(const wxChar *frameName);
bool DoWriteFile(const wxChar *str, pgConn *conn);
bool CheckChanged(bool canVeto);
private:
virtual void OnOpen(wxCommandEvent &event);
void OnSave(wxCommandEvent &event);
void OnSaveAs(wxCommandEvent &event);
void OnClose(wxCloseEvent &event);
void OnExecute(wxCommandEvent &event);
void OnHelp(wxCommandEvent &event);
void OnHint(wxCommandEvent &event);
void OnBugreport(wxCommandEvent &event);
void DisplayHint(bool force);
protected:
pgConn *conn;
frmMain *mainForm;
wxString serverFileName;
wxTextFileType filetype;
DECLARE_EVENT_TABLE()
};
#endif
|