]> git.saurik.com Git - wxWidgets.git/commitdiff
MSW fixes; ^M removal
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 27 Nov 2000 13:55:03 +0000 (13:55 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 27 Nov 2000 13:55:03 +0000 (13:55 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/utils/wxrcedit/pe_adv.cpp
contrib/utils/wxrcedit/preview.cpp
contrib/utils/wxrcedit/propedit.h
contrib/utils/wxrcedit/propframe.cpp

index 9c570d096bb137a8364b8686cf6f35212b207f70..c5776cbb428e587f1c4b1a0c6b4381b2c4b56444 100644 (file)
@@ -165,6 +165,7 @@ void PropEditCtrlFlags::OnDetails()
 
     dlg.SetSizer(sz);
     dlg.SetAutoLayout(TRUE);
+    dlg.Layout();
     
     for (i = 0; i < arr.GetCount(); i++)
         lbox->Append(arr[i]);
index 7ed924bb1c2c0c09d7f3db7fa886951de322a6aa..b1085bee8a52bbee42d838c83738663665d3910c 100644 (file)
@@ -61,7 +61,9 @@ PreviewFrame *PreviewFrame::Get()
 }
 
 PreviewFrame::PreviewFrame()
-    : wxFrame(NULL, -1, _("Preview"))
+    : wxFrame(EditorFrame::Get(), -1, _("Preview"),
+              wxDefaultPosition, wxDefaultSize, 
+              wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR | wxFRAME_TOOL_WINDOW)
 {
     m_Dirty = FALSE;
     ms_Instance = this;
@@ -89,6 +91,8 @@ PreviewFrame::PreviewFrame()
     m_Splitter->SplitHorizontally(m_ScrollWin, m_LogCtrl, cfg->Read(_T("previewframe_sash"), 300));
 
     CreateStatusBar();
+
+    SetSize(GetSize()); // refresh: MSW needs it
 }
 
 
index b74371604e1e93b801c5aaa3666bb6048f018f64..712035943cb46d1164d3bfcf93912e619b53d5f6 100644 (file)
@@ -20,7 +20,7 @@
 #include "propframe.h"
 
 class WXDLLEXPORT wxXmlNode;
-class WXDLLEXPORT wxTreeCtrl;
+class WXDLLEXPORT wxGenericTreeCtrl;
 class WXDLLEXPORT wxTextCtrl;
 
 
@@ -61,7 +61,7 @@ class PropEditCtrl : public wxPanel
     
         PropertiesFrame *m_PropFrame;
         bool m_Created;
-        wxTreeCtrl *m_TreeCtrl;
+        wxGenericTreeCtrl *m_TreeCtrl;
         wxTreeItemId m_TreeItem;
         wxWindow *m_TheCtrl;
         PropertyInfo *m_PropInfo;
index b03e2142c169482434ae9dc4178b0c869c0ebefa..fe4ac39b6f268d1292585cd899bdb659afbba068 100644 (file)
@@ -27,6 +27,7 @@
 #include "propedit.h"
 #include "pe_basic.h"
 #include "pe_adv.h"
+#include "editor.h"
 
 // ------------- support classes --------
 
@@ -104,6 +105,19 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
                 m_EditCtrl = NULL;
             }
         }
+
+        void OnScroll(wxScrollWinEvent& event)
+        {
+            event.Skip();
+            if (event.GetOrientation() == wxHORIZONTAL) return;
+            if (!m_EditCtrl) return;
+            
+            wxTreeItemId id = GetSelection();
+            wxRect bounding;
+            GetBoundingRect(id, bounding);
+            
+            m_EditCtrl->Move(-1, bounding.y);
+        }
         
         PropEditCtrl *m_EditCtrl;
         
@@ -113,6 +127,7 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
 BEGIN_EVENT_TABLE(PropsTree, wxRemotelyScrolledTreeCtrl)
        EVT_PAINT(PropsTree::OnPaint)
     EVT_TREE_SEL_CHANGED(-1, PropsTree::OnSelChange)
+    EVT_SCROLLWIN(PropsTree::OnScroll)
 END_EVENT_TABLE()
 
 
@@ -157,7 +172,7 @@ class PropsValueWindow: public wxTreeCompanionWindow
                 GetTreeCtrl()->SelectItem(item);
             }
         }
-        
+
         DECLARE_EVENT_TABLE()
 };
 
@@ -184,7 +199,9 @@ PropertiesFrame *PropertiesFrame::Get()
 }
 
 PropertiesFrame::PropertiesFrame()
-    : wxFrame(NULL, -1, _("Properties"))
+    : wxFrame(EditorFrame::Get(), -1, _("Properties"),
+              wxDefaultPosition, wxDefaultSize,
+              wxDEFAULT_FRAME_STYLE | wxFRAME_NO_TASKBAR | wxFRAME_TOOL_WINDOW)
 {
     ms_Instance = this;
     m_Node = NULL;