wxWidgets/contrib/utils/wxrcedit/propedit.h
Gilles Depeyrot ab7ce33c56 disable use of #pragma interface under Mac OS X
GNU compiler included with Mac OS X 10.2 (Jaguar) as well as August Developer
Tools update contain a bug concerning #pragma interface handling that can only
be worked around by not using them (and they are not necessary anyways)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-07 12:28:46 +00:00

88 lines
2.4 KiB
C++

/////////////////////////////////////////////////////////////////////////////
// Purpose: XML resources editor
// Author: Vaclav Slavik
// Created: 2000/05/05
// RCS-ID: $Id$
// Copyright: (c) 2000 Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "propedit.h"
#endif
#ifndef _PROPEDIT_H_
#define _PROPEDIT_H_
#include "wx/panel.h"
#include "wx/treectrl.h"
#include "nodesdb.h"
#include "propframe.h"
class WXDLLEXPORT wxXmlNode;
class WXDLLEXPORT wxTreeCtrl;
class WXDLLEXPORT wxTextCtrl;
class PropEditCtrl : public wxPanel
{
public:
PropEditCtrl(PropertiesFrame *propFrame)
: wxPanel(propFrame->m_valueWindow, -1),
m_PropFrame(propFrame), m_Created(FALSE), m_TreeCtrl(propFrame->m_tree)
{Show(FALSE);}
virtual void BeginEdit(const wxRect& rect, wxTreeItemId ti);
virtual void EndEdit();
virtual wxTreeItemId CreateTreeEntry(wxTreeItemId parent, const PropertyInfo& pinfo);
virtual wxWindow* CreateEditCtrl() = 0;
virtual bool IsPresent(const PropertyInfo& pinfo);
virtual void Clear();
virtual void ReadValue() = 0;
virtual void WriteValue() = 0;
virtual wxString GetValueAsText(wxTreeItemId ti);
virtual wxString GetPropName(const PropertyInfo& pinfo)
{ return pinfo.Name.AfterLast(_T('/')); }
virtual bool HasDetails() { return FALSE; }
virtual void OnDetails() {}
virtual bool HasClearButton() { return TRUE; }
void OnButtonDetails(wxCommandEvent& event);
void OnButtonClear(wxCommandEvent& event);
protected:
wxXmlNode *GetNode() { return m_PropFrame->m_Node; }
bool CanSave() { return m_CanSave; }
PropertiesFrame *m_PropFrame;
bool m_Created;
wxTreeCtrl *m_TreeCtrl;
wxTreeItemId m_TreeItem;
wxWindow *m_TheCtrl;
PropertyInfo *m_PropInfo;
bool m_CanSave;
DECLARE_EVENT_TABLE()
};
class PETreeData : public wxTreeItemData
{
public:
PETreeData(PropEditCtrl *p, const PropertyInfo& pi) :
wxTreeItemData(),
EditCtrl(p), PropInfo(pi) {}
PropEditCtrl *EditCtrl;
PropertyInfo PropInfo;
};
#endif