Some Motif corrections; Dialog Editor compilation under Motif

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-01-17 23:55:38 +00:00
parent 28d9589a71
commit 15d5ab6757
7 changed files with 108 additions and 56 deletions

View File

@@ -83,7 +83,7 @@ wxString wxControl::GetLabel() const
} }
else else
{ {
XmStringFree(text); // XmStringFree(text);
return wxEmptyString; return wxEmptyString;
} }
} }

View File

@@ -111,6 +111,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
m_windowFont = parent->GetFont(); m_windowFont = parent->GetFont();
ChangeFont(FALSE); ChangeFont(FALSE);
SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, width, height); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, width, height);
ChangeBackgroundColour(); ChangeBackgroundColour();
@@ -766,6 +767,13 @@ void wxListBox::ChangeBackgroundColour()
DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE); DoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE); DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
XtVaSetValues (hsb,
XmNtroughColor, backgroundColour.AllocColour(XtDisplay(hsb)),
NULL);
XtVaSetValues (vsb,
XmNtroughColor, backgroundColour.AllocColour(XtDisplay(vsb)),
NULL);
DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE); DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
} }

View File

@@ -181,7 +181,18 @@ wxRadioBox::~wxRadioBox()
{ {
delete[] m_radioButtonLabels; delete[] m_radioButtonLabels;
delete[] m_radioButtons; delete[] m_radioButtons;
DetachWidget(m_formWidget); DetachWidget(m_formWidget);
DetachWidget(m_mainWidget);
if (m_labelWidget)
XtDestroyWidget((Widget) m_labelWidget);
XtDestroyWidget((Widget) m_mainWidget);
XtDestroyWidget((Widget) m_formWidget);
m_mainWidget = (WXWidget) 0;
m_formWidget = (WXWidget) 0;
m_labelWidget = (WXWidget) 0;
} }
wxString wxRadioBox::GetLabel(int item) const wxString wxRadioBox::GetLabel(int item) const

View File

@@ -161,6 +161,10 @@ void wxScrollBar::ChangeFont(bool keepOriginalSize)
void wxScrollBar::ChangeBackgroundColour() void wxScrollBar::ChangeBackgroundColour()
{ {
wxWindow::ChangeBackgroundColour(); wxWindow::ChangeBackgroundColour();
XtVaSetValues ((Widget) GetMainWidget(),
XmNtroughColor, m_backgroundColour.AllocColour(XtDisplay((Widget) GetMainWidget())),
NULL);
} }
void wxScrollBar::ChangeForegroundColour() void wxScrollBar::ChangeForegroundColour()

View File

@@ -127,6 +127,15 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
wxStaticBox::~wxStaticBox() wxStaticBox::~wxStaticBox()
{ {
DetachWidget(m_formWidget); DetachWidget(m_formWidget);
DetachWidget(m_mainWidget);
XtDestroyWidget((Widget) m_mainWidget);
if (m_labelWidget)
XtDestroyWidget((Widget) m_labelWidget);
XtDestroyWidget((Widget) m_formWidget);
m_mainWidget = (WXWidget) 0;
m_labelWidget = (WXWidget) 0;
m_formWidget = (WXWidget) 0;
} }
void wxStaticBox::SetLabel(const wxString& label) void wxStaticBox::SetLabel(const wxString& label)

View File

@@ -71,7 +71,7 @@
static void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event); static void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event);
wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL; wxResourceManager *wxResourceManager::sm_currentResourceManager = NULL;
#ifdef __WXGTK__ #if defined(__WXGTK__) || defined(__WXMOTIF__)
#include "bitmaps/load.xpm" #include "bitmaps/load.xpm"
#include "bitmaps/save.xpm" #include "bitmaps/save.xpm"
#include "bitmaps/new.xpm" #include "bitmaps/new.xpm"
@@ -158,7 +158,7 @@ bool wxResourceManager::Initialize()
GetWindowsDirectory(buf, 256); GetWindowsDirectory(buf, 256);
strcat(buf, "\\dialoged.ini"); strcat(buf, "\\dialoged.ini");
m_optionsResourceFilename = buf; m_optionsResourceFilename = buf;
#elif defined(__WXGTK__) #elif defined(__WXGTK__) || defined(__WXMOTIF__)
wxGetHomeDir( &m_optionsResourceFilename ); wxGetHomeDir( &m_optionsResourceFilename );
m_optionsResourceFilename += "/.dialogedrc"; m_optionsResourceFilename += "/.dialogedrc";
#else #else
@@ -181,7 +181,7 @@ bool wxResourceManager::Initialize()
#ifdef __WXMSW__ #ifdef __WXMSW__
m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE); m_bitmapImage = new wxBitmap("WXWINBMP", wxBITMAP_TYPE_BMP_RESOURCE);
#endif #endif
#ifdef __WXGTK__ #if defined(__WXGTK__) || defined(__WXMOTIF__)
m_bitmapImage = new wxBitmap( wxwin_xpm ); m_bitmapImage = new wxBitmap( wxwin_xpm );
#endif #endif
} }
@@ -322,7 +322,7 @@ bool wxResourceManager::ShowResourceEditor(bool show, wxWindow *WXUNUSED(parent)
c->right.SameAs (m_editorFrame, wxRight, 0); c->right.SameAs (m_editorFrame, wxRight, 0);
c->bottom.SameAs (m_editorFrame, wxBottom, 0); c->bottom.SameAs (m_editorFrame, wxBottom, 0);
c->width.Unconstrained(); c->width.Unconstrained();
#ifdef __WXGTK__ #if defined(__WXGTK__) || defined(__WXMOTIF__)
c->height.Absolute(105); c->height.Absolute(105);
#else #else
c->height.Absolute(60); c->height.Absolute(60);
@@ -741,7 +741,11 @@ wxResourceEditorScrolledWindow *wxResourceManager::OnCreateEditorPanel(wxFrame *
{ {
wxResourceEditorScrolledWindow *panel = new wxResourceEditorScrolledWindow(parent, wxDefaultPosition, wxDefaultSize, wxResourceEditorScrolledWindow *panel = new wxResourceEditorScrolledWindow(parent, wxDefaultPosition, wxDefaultSize,
// wxSUNKEN_BORDER|wxCLIP_CHILDREN); // wxSUNKEN_BORDER|wxCLIP_CHILDREN);
#ifdef __WXMOTIF__
wxBORDER);
#else
wxSUNKEN_BORDER); wxSUNKEN_BORDER);
#endif
panel->SetScrollbars(10, 10, 100, 100); panel->SetScrollbars(10, 10, 100, 100);
@@ -766,7 +770,7 @@ wxToolBar *wxResourceManager::OnCreateToolBar(wxFrame *parent)
wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL"); wxBitmap ToolbarToFrontBitmap("TOFRONTTOOL");
wxBitmap ToolbarHelpBitmap("HELPTOOL"); wxBitmap ToolbarHelpBitmap("HELPTOOL");
#endif #endif
#ifdef __WXGTK__ #if defined(__WXGTK__) || defined(__WXMOTIF__)
wxBitmap ToolbarLoadBitmap( load_xpm ); wxBitmap ToolbarLoadBitmap( load_xpm );
wxBitmap ToolbarSaveBitmap( save_xpm); wxBitmap ToolbarSaveBitmap( save_xpm);
wxBitmap ToolbarNewBitmap( new_xpm ); wxBitmap ToolbarNewBitmap( new_xpm );
@@ -798,47 +802,47 @@ wxToolBar *wxResourceManager::OnCreateToolBar(wxFrame *parent)
int currentX = gap; int currentX = gap;
toolbar->AddSeparator(); toolbar->AddSeparator();
toolbar->AddTool(TOOLBAR_NEW, ToolbarNewBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_NEW, ToolbarNewBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "New dialog"); FALSE, currentX, -1, NULL, "New dialog");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_LOAD_FILE, ToolbarLoadBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_LOAD_FILE, ToolbarLoadBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Load"); FALSE, currentX, -1, NULL, "Load");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_SAVE_FILE, ToolbarSaveBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_SAVE_FILE, ToolbarSaveBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Save"); FALSE, currentX, -1, NULL, "Save");
currentX += width + dx + gap; currentX += width + dx + gap;
toolbar->AddSeparator(); toolbar->AddSeparator();
toolbar->AddTool(TOOLBAR_FORMAT_HORIZ, ToolbarVertBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_FORMAT_HORIZ, ToolbarVertBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Horizontal align"); FALSE, currentX, -1, NULL, "Horizontal align");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_FORMAT_VERT_TOP_ALIGN, ToolbarAlignTBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_FORMAT_VERT_TOP_ALIGN, ToolbarAlignTBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Top align"); FALSE, currentX, -1, NULL, "Top align");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_FORMAT_VERT_BOT_ALIGN, ToolbarAlignBBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_FORMAT_VERT_BOT_ALIGN, ToolbarAlignBBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Bottom align"); FALSE, currentX, -1, NULL, "Bottom align");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_FORMAT_VERT, ToolbarHorizBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_FORMAT_VERT, ToolbarHorizBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Vertical align"); FALSE, currentX, -1, NULL, "Vertical align");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN, ToolbarAlignLBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_LEFT_ALIGN, ToolbarAlignLBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Left align"); FALSE, currentX, -1, NULL, "Left align");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN, ToolbarAlignRBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_FORMAT_HORIZ_RIGHT_ALIGN, ToolbarAlignRBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Right align"); FALSE, currentX, -1, NULL, "Right align");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_COPY_SIZE, ToolbarCopySizeBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_COPY_SIZE, ToolbarCopySizeBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Copy size"); FALSE, currentX, -1, NULL, "Copy size");
currentX += width + dx + gap; currentX += width + dx + gap;
toolbar->AddSeparator(); toolbar->AddSeparator();
toolbar->AddTool(TOOLBAR_TO_FRONT, ToolbarToFrontBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_TO_FRONT, ToolbarToFrontBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "To front"); FALSE, currentX, -1, NULL, "To front");
currentX += width + dx; currentX += width + dx;
toolbar->AddTool(TOOLBAR_TO_BACK, ToolbarToBackBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_TO_BACK, ToolbarToBackBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "To back"); FALSE, currentX, -1, NULL, "To back");
currentX += width + dx + gap; currentX += width + dx + gap;
toolbar->AddSeparator(); toolbar->AddSeparator();
toolbar->AddTool(TOOLBAR_HELP, ToolbarHelpBitmap, wxNullBitmap, toolbar->AddTool(TOOLBAR_HELP, ToolbarHelpBitmap, wxNullBitmap,
FALSE, (float)currentX, -1, NULL, "Help"); FALSE, currentX, -1, NULL, "Help");
currentX += width + dx; currentX += width + dx;
toolbar->Realize(); toolbar->Realize();
@@ -2196,6 +2200,8 @@ wxResourceEditorScrolledWindow::wxResourceEditorScrolledWindow(wxWindow *parent,
m_marginX = 10; m_marginX = 10;
m_marginY = 40; m_marginY = 40;
m_childWindow = NULL; m_childWindow = NULL;
SetBackgroundColour(* wxWHITE);
} }
wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow() wxResourceEditorScrolledWindow::~wxResourceEditorScrolledWindow()
@@ -2275,7 +2281,7 @@ void ObjectMenuProc(wxMenu& menu, wxCommandEvent& event)
* *
*/ */
#ifdef __WXGTK__ // I don't dare to delete it... #if defined(__WXGTK__) || defined(__WXMOTIF__) // I don't dare to delete it...
BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar) BEGIN_EVENT_TABLE(EditorToolBar, wxToolBar)
END_EVENT_TABLE() END_EVENT_TABLE()

View File

@@ -179,6 +179,13 @@ bool wxPropertyInfo::Edit(wxWindow *WXUNUSED(parent), const wxString& title)
view->ShowView(propSheet, propWin->GetPropertyPanel()); view->ShowView(propSheet, propWin->GetPropertyPanel());
propWin->Show(TRUE); propWin->Show(TRUE);
// Otherwise doesn't show itself
#ifdef __WXMOTIF__
wxNoOptimize noOptimize;
propWin->SetSize(-1, -1, width, height);
#endif
return TRUE; return TRUE;
} }
@@ -416,7 +423,7 @@ bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property)
} }
} }
if (x != newX) if (x != pixelX)
{ {
m_propertyWindow->Move(pixelX, y); m_propertyWindow->Move(pixelX, y);
resource->SetSize(newX, resource->GetY(), resource->GetWidth(), resource->GetHeight()); resource->SetSize(newX, resource->GetY(), resource->GetWidth(), resource->GetHeight());
@@ -452,7 +459,7 @@ bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property)
} }
} }
if (y != newY) if (y != pixelY)
{ {
m_propertyWindow->Move(x, pixelY); m_propertyWindow->Move(x, pixelY);
resource->SetSize(resource->GetX(), newY, resource->GetWidth(), resource->GetHeight()); resource->SetSize(resource->GetX(), newY, resource->GetWidth(), resource->GetHeight());
@@ -488,7 +495,7 @@ bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property)
} }
} }
if (width != newWidth) if (width != pixelWidth)
{ {
m_propertyWindow->SetSize(pixelWidth, height); m_propertyWindow->SetSize(pixelWidth, height);
resource->SetSize(resource->GetX(), resource->GetY(), newWidth, resource->GetHeight()); resource->SetSize(resource->GetX(), resource->GetY(), newWidth, resource->GetHeight());
@@ -524,9 +531,9 @@ bool wxWindowPropertyInfo::SetProperty(wxString& name, wxProperty *property)
} }
} }
if (height != newHeight) if (height != pixelHeight)
{ {
m_propertyWindow->SetSize(width, newHeight); m_propertyWindow->SetSize(width, pixelHeight);
resource->SetSize(resource->GetX(), resource->GetY(), resource->GetWidth(), newHeight); resource->SetSize(resource->GetX(), resource->GetY(), resource->GetWidth(), newHeight);
} }
return TRUE; return TRUE;
@@ -757,7 +764,7 @@ bool wxItemPropertyInfo::SetProperty(wxString& name, wxProperty *property)
{ {
wxFont *newFont = SetFontProperty(name, property, font); wxFont *newFont = SetFontProperty(name, property, font);
if (newFont) if (newFont)
itemWindow->SetLabelFont(* newFont); itemWindow->SetFont(* newFont);
return TRUE; return TRUE;
} }
else if (name == "label") else if (name == "label")
@@ -787,6 +794,7 @@ bool wxItemPropertyInfo::InstantiateResource(wxItemResource *resource)
wxControl *item = (wxControl *)m_propertyWindow; wxControl *item = (wxControl *)m_propertyWindow;
wxString str(item->GetLabel()); wxString str(item->GetLabel());
resource->SetTitle(str); resource->SetTitle(str);
if (item->GetFont().Ok()) if (item->GetFont().Ok())
resource->SetFont(* wxTheFontList->FindOrCreateFont(item->GetFont().GetPointSize(), resource->SetFont(* wxTheFontList->FindOrCreateFont(item->GetFont().GetPointSize(),
item->GetFont().GetFamily(), item->GetFont().GetStyle(), item->GetFont().GetWeight(), item->GetFont().GetFamily(), item->GetFont().GetStyle(), item->GetFont().GetWeight(),
@@ -1754,8 +1762,8 @@ bool wxGaugePropertyInfo::InstantiateResource(wxItemResource *resource)
wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name) wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name)
{ {
wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow; wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow;
if (name == "value") if (name == "thumbPosition")
return new wxProperty("value", (long)scrollBar->GetValue(), "integer"); return new wxProperty("value", (long)scrollBar->GetThumbPosition(), "integer");
else if (name == "orientation") else if (name == "orientation")
{ {
char *pos = NULL; char *pos = NULL;
@@ -1770,24 +1778,20 @@ wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name)
} }
else if (name == "pageSize") else if (name == "pageSize")
{ {
int viewStart, pageLength, objectLength, viewLength; int pageLength = scrollBar->GetPageSize();
scrollBar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength);
return new wxProperty("pageSize", (long)pageLength, "integer"); return new wxProperty("pageSize", (long)pageLength, "integer");
} }
else if (name == "viewLength") else if (name == "thumbSize")
{ {
int viewStart, pageLength, objectLength, viewLength; int thumbSize = scrollBar->GetThumbSize();
scrollBar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength);
return new wxProperty("viewLength", (long)viewLength, "integer"); return new wxProperty("thumbSize", (long)thumbSize, "integer");
} }
else if (name == "objectLength") else if (name == "range")
{ {
int viewStart, pageLength, objectLength, viewLength; int range = scrollBar->GetRange();
scrollBar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength); return new wxProperty("range", (long)range, "integer");
return new wxProperty("objectLength", (long)objectLength, "integer");
} }
else else
return wxItemPropertyInfo::GetProperty(name); return wxItemPropertyInfo::GetProperty(name);
@@ -1796,9 +1800,9 @@ wxProperty *wxScrollBarPropertyInfo::GetProperty(wxString& name)
bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property) bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property)
{ {
wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow; wxScrollBar *scrollBar = (wxScrollBar *)m_propertyWindow;
if (name == "value") if (name == "thumbPosition")
{ {
scrollBar->SetValue((int)property->GetValue().IntegerValue()); scrollBar->SetThumbPosition((int)property->GetValue().IntegerValue());
return TRUE; return TRUE;
} }
else if (name == "orientation") else if (name == "orientation")
@@ -1835,17 +1839,26 @@ bool wxScrollBarPropertyInfo::SetProperty(wxString& name, wxProperty *property)
} }
else if (name == "pageSize") else if (name == "pageSize")
{ {
scrollBar->SetPageSize((int)property->GetValue().IntegerValue()); int pos = scrollBar->GetThumbPosition();
int range = scrollBar->GetRange();
int thumbSize = scrollBar->GetThumbSize();
scrollBar->SetScrollbar(pos, thumbSize, range, (int)property->GetValue().IntegerValue());
return TRUE; return TRUE;
} }
else if (name == "viewLength") else if (name == "thumbSize")
{ {
scrollBar->SetViewLength((int)property->GetValue().IntegerValue()); int pos = scrollBar->GetThumbPosition();
int range = scrollBar->GetRange();
int pageSize = scrollBar->GetPageSize();
scrollBar->SetScrollbar(pos, (int)property->GetValue().IntegerValue(), range, pageSize);
return TRUE; return TRUE;
} }
else if (name == "objectLength") else if (name == "range")
{ {
scrollBar->SetObjectLength((int)property->GetValue().IntegerValue()); int pos = scrollBar->GetThumbPosition();
int thumbSize = scrollBar->GetThumbSize();
int pageSize = scrollBar->GetPageSize();
scrollBar->SetScrollbar(pos, thumbSize, (int)property->GetValue().IntegerValue(), pageSize);
return TRUE; return TRUE;
} }
else else
@@ -1856,10 +1869,10 @@ void wxScrollBarPropertyInfo::GetPropertyNames(wxStringList& names)
{ {
wxItemPropertyInfo::GetPropertyNames(names); wxItemPropertyInfo::GetPropertyNames(names);
names.Add("orientation"); names.Add("orientation");
names.Add("value"); names.Add("thumbPosition");
names.Add("thumbSize");
names.Add("pageSize"); names.Add("pageSize");
names.Add("viewLength"); names.Add("range");
names.Add("objectLength");
// Remove some properties we don't inherit // Remove some properties we don't inherit
names.Delete("fontPoints"); names.Delete("fontPoints");
@@ -1873,14 +1886,15 @@ bool wxScrollBarPropertyInfo::InstantiateResource(wxItemResource *resource)
{ {
wxScrollBar *sbar = (wxScrollBar *)m_propertyWindow; wxScrollBar *sbar = (wxScrollBar *)m_propertyWindow;
resource->SetValue1(sbar->GetValue()); int thumbPosition = sbar->GetThumbPosition();
int thumbSize = sbar->GetThumbSize();
int pageSize = sbar->GetPageSize();
int range = sbar->GetRange();
int viewStart, pageLength, objectLength, viewLength; resource->SetValue1(thumbPosition);
sbar->GetValues(&viewStart, &viewLength, &objectLength, &pageLength); resource->SetValue2(thumbSize);
resource->SetValue3(range);
resource->SetValue2(pageLength); resource->SetValue5(pageSize);
resource->SetValue3(objectLength);
resource->SetValue5(viewLength);
return wxItemPropertyInfo::InstantiateResource(resource); return wxItemPropertyInfo::InstantiateResource(resource);
} }