}
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;
m_Splitter->SplitHorizontally(m_ScrollWin, m_LogCtrl, cfg->Read(_T("previewframe_sash"), 300));
CreateStatusBar();
+
+ SetSize(GetSize()); // refresh: MSW needs it
}
#include "propframe.h"
class WXDLLEXPORT wxXmlNode;
-class WXDLLEXPORT wxTreeCtrl;
+class WXDLLEXPORT wxGenericTreeCtrl;
class WXDLLEXPORT wxTextCtrl;
PropertiesFrame *m_PropFrame;
bool m_Created;
- wxTreeCtrl *m_TreeCtrl;
+ wxGenericTreeCtrl *m_TreeCtrl;
wxTreeItemId m_TreeItem;
wxWindow *m_TheCtrl;
PropertyInfo *m_PropInfo;
#include "propedit.h"
#include "pe_basic.h"
#include "pe_adv.h"
+#include "editor.h"
// ------------- support classes --------
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;
BEGIN_EVENT_TABLE(PropsTree, wxRemotelyScrolledTreeCtrl)
EVT_PAINT(PropsTree::OnPaint)
EVT_TREE_SEL_CHANGED(-1, PropsTree::OnSelChange)
+ EVT_SCROLLWIN(PropsTree::OnScroll)
END_EVENT_TABLE()
GetTreeCtrl()->SelectItem(item);
}
}
-
+
DECLARE_EVENT_TABLE()
};
}
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;