1) added wxFrame support to wxrcedit

2) fixes to wxrcedit so that generated files are compatible with new XRC
(both in patch #648659)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-12-21 00:20:35 +00:00
parent fc9a9b2ab2
commit 6267a331cb
7 changed files with 76 additions and 9 deletions

View File

@@ -38,7 +38,18 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
PropsTree(wxWindow* parent, wxWindowID id, const wxPoint& pt = wxDefaultPosition,
const wxSize& sz = wxDefaultSize, long style = wxTR_HAS_BUTTONS)
: wxRemotelyScrolledTreeCtrl(parent, id, pt, sz, style),
m_EditCtrl(NULL) {}
m_EditCtrl(NULL)
{
#if 0
// VS: Don't do it, it is *extremely* ugly.
// FIXME: find a better solution.
//make text larger so controls will fit properly
wxFont font = GetFont();
font.SetPointSize(font.GetPointSize()*1.5);
SetFont(font);
#endif
}
void OnPaint(wxPaintEvent& event)
{
@@ -50,8 +61,8 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
dc.SetDeviceOrigin(0, 0);
wxPen pen(wxColour(_T("BLACK")), 1, wxSOLID);
dc.SetPen(pen);
dc.SetPen(pen);
dc.SetBrush(* wxTRANSPARENT_BRUSH);
wxSize clientSize = GetClientSize();
@@ -63,6 +74,7 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
if (h.IsOk() && GetBoundingRect(h, itemRect))
{
cy = itemRect.GetTop();
dc.DrawLine(0, cy, clientSize.x, cy);
lastH = h;
}
@@ -73,7 +85,7 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
dc.DrawLine(0, cy, clientSize.x, cy);
}
}
void OnSelChange(wxTreeEvent& event)
{
if (m_EditCtrl != NULL)
@@ -88,6 +100,7 @@ class PropsTree: public wxRemotelyScrolledTreeCtrl
{
wxRect bounding;
GetBoundingRect(item, bounding);
bounding.SetX(0);
bounding.SetWidth(GetCompanionWindow()->GetSize().x);
dt->EditCtrl->BeginEdit(bounding, item);
@@ -168,7 +181,6 @@ class PropsValueWindow: public wxTreeCompanionWindow
wxTreeItemId item = GetTreeCtrl()->HitTest(wxPoint(1, event.GetY()), flags);
if (item.IsOk())
{
GetTreeCtrl()->ScrollTo(item);
GetTreeCtrl()->SelectItem(item);
}
}