XMLID->XRCID, XMLCTRL->XRCCTRL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-01-27 23:42:16 +00:00
parent 20e453de9b
commit 5ed345b7ed
11 changed files with 96 additions and 94 deletions

View File

@@ -359,19 +359,19 @@ wxTreeItemId PropEditCtrlDim::CreateTreeEntry(wxTreeItemId parent, const Propert
// --------------------- PropEditCtrlXMLID -----------------------------
// --------------------- PropEditCtrlXRCID -----------------------------
#define REAL_NODE (NodeHandler::Find(GetNode())->GetRealNode(GetNode()))
void PropEditCtrlXMLID::ReadValue()
void PropEditCtrlXRCID::ReadValue()
{
m_TextCtrl->SetValue(REAL_NODE->GetPropVal(_T("name"), wxEmptyString));
}
void PropEditCtrlXMLID::WriteValue()
void PropEditCtrlXRCID::WriteValue()
{
wxString s =m_TextCtrl->GetValue();
if (s.IsEmpty()) s = _T("-1");
@@ -385,7 +385,7 @@ void PropEditCtrlXMLID::WriteValue()
void PropEditCtrlXMLID::Clear()
void PropEditCtrlXRCID::Clear()
{
EndEdit();
REAL_NODE->DeleteProperty(_T("name"));
@@ -395,7 +395,7 @@ void PropEditCtrlXMLID::Clear()
void PropEditCtrlXMLID::OnDetails()
void PropEditCtrlXRCID::OnDetails()
{
wxString choices[] = {wxString(_T("-1"))
#define stdID(id) , wxString(#id)
@@ -420,7 +420,7 @@ void PropEditCtrlXMLID::OnDetails()
};
wxString s =
wxGetSingleChoice(_("Choose from predefined IDs:"), _("XMLID"),
wxGetSingleChoice(_("Choose from predefined IDs:"), _("XRCID"),
38/*sizeof choices*/, choices);
if (!s) return;
m_TextCtrl->SetValue(s);
@@ -430,14 +430,14 @@ void PropEditCtrlXMLID::OnDetails()
wxString PropEditCtrlXMLID::GetValueAsText(wxTreeItemId ti)
wxString PropEditCtrlXRCID::GetValueAsText(wxTreeItemId ti)
{
return REAL_NODE->GetPropVal(_T("name"), wxEmptyString);
}
bool PropEditCtrlXMLID::IsPresent(const PropertyInfo& pinfo)
bool PropEditCtrlXRCID::IsPresent(const PropertyInfo& pinfo)
{
return REAL_NODE->HasProp(_T("name"));
}

View File

@@ -116,10 +116,10 @@ class PropEditCtrlDim : public PropEditCtrlTxt
class PropEditCtrlXMLID : public PropEditCtrlTxt
class PropEditCtrlXRCID : public PropEditCtrlTxt
{
public:
PropEditCtrlXMLID(PropertiesFrame *propFrame)
PropEditCtrlXRCID(PropertiesFrame *propFrame)
: PropEditCtrlTxt(propFrame) {}
virtual void ReadValue();

View File

@@ -246,7 +246,7 @@ PropertiesFrame::PropertiesFrame()
m_EditCtrls.Put(_T("integer"), new PropEditCtrlInt(this));
m_EditCtrls.Put(_T("not_implemented"), new PropEditCtrlNull(this));
m_EditCtrls.Put(_T("text"), new PropEditCtrlTxt(this));
m_EditCtrls.Put(_T("xmlid"), new PropEditCtrlXMLID(this));
m_EditCtrls.Put(_T("xmlid"), new PropEditCtrlXRCID(this));
m_EditCtrls.Put(_T("font"), new PropEditCtrlFont(this));
m_EditCtrls.Put(_T("choice"), new PropEditCtrlChoice(this));
m_EditCtrls.Put(_T("file"), new PropEditCtrlFile(this));
@@ -277,7 +277,7 @@ void PropertiesFrame::ShowProps(wxXmlNode *node)
m_Node = node;
ClearProps();
AddSingleProp(PropertyInfo(_T("xmlid"), _T("XMLID"), wxEmptyString));
AddSingleProp(PropertyInfo(_T("xmlid"), _T("XRCID"), wxEmptyString));
AddProps(NodeHandler::Find(node)->GetPropsList(node));
m_tree->Expand(m_tree->GetRootItem());