core/vgui/wx/wxSliderPanelXmlHandler.cxx
Go to the documentation of this file.
00001 // This is core/vgui/wx/wxSliderPanelXmlHandler.cxx
00002 
00003 #include "wxSliderPanelXmlHandler.h"
00004 
00005 IMPLEMENT_DYNAMIC_CLASS(wxSliderPanelXmlHandler, wxXmlResourceHandler)
00006 
00007 wxSliderPanelXmlHandler::wxSliderPanelXmlHandler()
00008 : wxXmlResourceHandler()
00009 {
00010 }
00011 
00012 wxObject *wxSliderPanelXmlHandler::DoCreateResource()
00013 {
00014   long base_id = GetLong(wxT("base_id"),10100);
00015 
00016   wxSliderPanel* panel =
00017       new wxSliderPanel(m_parentAsWindow,
00018                         GetID(),
00019                         base_id,
00020                         GetPosition(), GetSize(),
00021                         GetStyle(),
00022                         GetName());
00023 
00024   // TODO: Load initial sliders from the XML File
00025   //vcl_vector<double> min_vals, max_vals, init_vals;
00026   //panel->CreateSliders(init_vals,min_vals,max_vals);
00027 
00028   return panel;
00029 }
00030 
00031 
00032 bool wxSliderPanelXmlHandler::CanHandle(wxXmlNode *node)
00033 {
00034   return IsOfClass(node, wxT("wxSliderPanel"));
00035 }
00036