]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/utils/wxrcedit/propedit.cpp
Elliptic arc fix for getting bounds
[wxWidgets.git] / contrib / utils / wxrcedit / propedit.cpp
index 07f2d40c009191f065d49e5749a36a25e64d4356..35e267635570898d6f81755476bb9698d16aa628 100644 (file)
@@ -22,6 +22,7 @@
 #include "propframe.h"
 #include "propedit.h"
 #include "xmlhelpr.h"
+#include "editor.h"
 
 enum
 {
@@ -36,14 +37,15 @@ BEGIN_EVENT_TABLE(PropEditCtrl, wxPanel)
     EVT_BUTTON(ID_DETAILS, PropEditCtrl::OnButtonDetails)
 END_EVENT_TABLE()
 
-void PropEditCtrl::OnButtonDetails(wxCommandEvent& event)
+void PropEditCtrl::OnButtonDetails(wxCommandEvent& WXUNUSED(event))
 {
     OnDetails();
 }
 
-void PropEditCtrl::OnButtonClear(wxCommandEvent& event)
+void PropEditCtrl::OnButtonClear(wxCommandEvent& WXUNUSED(event))
 {
     Clear();
+    EditorFrame::Get()->NotifyChanged(CHANGED_PROPS);
 }
 
 
@@ -52,7 +54,7 @@ void PropEditCtrl::BeginEdit(const wxRect& rect, wxTreeItemId ti)
     m_PropInfo = &(((PETreeData*)m_TreeCtrl->GetItemData(ti))->PropInfo);
     m_TreeItem = ti;
 
-    m_CanSave = FALSE;
+    m_CanSave = false;
     if (!m_Created)
     {
         wxSizer *sz = new wxBoxSizer(wxHORIZONTAL);
@@ -60,28 +62,27 @@ void PropEditCtrl::BeginEdit(const wxRect& rect, wxTreeItemId ti)
         sz->Add(m_TheCtrl, 1);
         if (HasDetails())
             sz->Add(new wxButton(this, ID_DETAILS, _T("..."), wxDefaultPosition,
-                    wxSize(16,-1)));
+                    wxSize(16,wxDefaultCoord)));
         if (HasClearButton())
             sz->Add(new wxButton(this, ID_CLEAR, _T("X"), wxDefaultPosition,
-                    wxSize(16,-1)));
-        SetAutoLayout(TRUE);
+                    wxSize(16,wxDefaultCoord)));
         SetSizer(sz);
-        m_Created = TRUE;
+        m_Created = true;
     }
 
     m_TheCtrl->SetFocus();
 
     SetSize(rect.x, rect.y, rect.width, rect.height);
-    Show(TRUE);
+    Show(true);
     ReadValue();
-    m_CanSave = TRUE;
+    m_CanSave = true;
 }
 
 
 
 void PropEditCtrl::EndEdit()
 {
-    Show(FALSE);
+    Show(false);
 }
 
 
@@ -91,7 +92,7 @@ wxTreeItemId PropEditCtrl::CreateTreeEntry(wxTreeItemId parent, const PropertyIn
     wxTreeItemId t = m_TreeCtrl->AppendItem(parent, GetPropName(pinfo));
     m_TreeCtrl->SetItemData(t, new PETreeData(this, pinfo));
     if (IsPresent(pinfo))
-        m_TreeCtrl->SetItemBold(t, TRUE);
+        m_TreeCtrl->SetItemBold(t, true);
     return t;
 }
 
@@ -111,7 +112,7 @@ void PropEditCtrl::Clear()
     {
         n->GetParent()->RemoveChild(n);
         delete n;
-        m_TreeCtrl->SetItemBold(m_TreeItem, FALSE);
+        m_TreeCtrl->SetItemBold(m_TreeItem, false);
     }
 }