- wxString sid = GetName();
- long num;
-
- if (sid == wxT("-1")) return -1;
- else if (sid.IsNumber() && sid.ToLong(&num)) return num;
-#define stdID(id) else if (sid == wxT(#id)) return id
- stdID(wxID_OPEN); stdID(wxID_CLOSE); stdID(wxID_NEW);
- stdID(wxID_SAVE); stdID(wxID_SAVEAS); stdID(wxID_REVERT);
- stdID(wxID_EXIT); stdID(wxID_UNDO); stdID(wxID_REDO);
- stdID(wxID_HELP); stdID(wxID_PRINT); stdID(wxID_PRINT_SETUP);
- stdID(wxID_PREVIEW); stdID(wxID_ABOUT); stdID(wxID_HELP_CONTENTS);
- stdID(wxID_HELP_COMMANDS); stdID(wxID_HELP_PROCEDURES);
- stdID(wxID_CUT); stdID(wxID_COPY); stdID(wxID_PASTE);
- stdID(wxID_CLEAR); stdID(wxID_FIND); stdID(wxID_DUPLICATE);
- stdID(wxID_SELECTALL); stdID(wxID_OK); stdID(wxID_CANCEL);
- stdID(wxID_APPLY); stdID(wxID_YES); stdID(wxID_NO);
- stdID(wxID_STATIC); stdID(wxID_FORWARD); stdID(wxID_BACKWARD);
- stdID(wxID_DEFAULT); stdID(wxID_MORE); stdID(wxID_SETUP);
- stdID(wxID_RESET); stdID(wxID_HELP_CONTEXT);
-#undef stdID
- else return wxXmlResource::GetXRCID(sid);
-}
-
-
-
-wxArtID wxXmlResourceHandler::GetStockID(const wxString& param)
-{
- wxXmlNode *stockIDNode = GetParamNode(param);
- if (stockIDNode == NULL)
- return wxEmptyString;
-
- wxXmlNode *oldnode = m_node;
- m_node = stockIDNode;
-
- wxArtID sid = m_node->GetPropVal(wxT("stock_id"), wxT(""));
-
- m_node = oldnode;
-
- if (sid.IsEmpty()) return wxEmptyString;
-#define stdID(id) else if (sid == wxT(#id)) return id
- stdID(wxART_ADD_BOOKMARK); stdID(wxART_DEL_BOOKMARK);
- stdID(wxART_HELP_SIDE_PANEL); stdID(wxART_HELP_SETTINGS);
- stdID(wxART_HELP_BOOK); stdID(wxART_HELP_FOLDER);
- stdID(wxART_HELP_PAGE); stdID(wxART_GO_BACK);
- stdID(wxART_GO_FORWARD); stdID(wxART_GO_UP);
- stdID(wxART_GO_DOWN); stdID(wxART_GO_TO_PARENT);
- stdID(wxART_GO_HOME); stdID(wxART_FILE_OPEN);
- stdID(wxART_PRINT); stdID(wxART_HELP); stdID(wxART_TIP);
- stdID(wxART_REPORT_VIEW); stdID(wxART_LIST_VIEW);
- stdID(wxART_NEW_DIR); stdID(wxART_FOLDER);
- stdID(wxART_GO_DIR_UP); stdID(wxART_EXECUTABLE_FILE);
- stdID(wxART_NORMAL_FILE); stdID(wxART_TICK_MARK);
- stdID(wxART_CROSS_MARK); stdID(wxART_ERROR);
- stdID(wxART_QUESTION); stdID(wxART_WARNING);
- stdID(wxART_INFORMATION);
-#undef stdID
- else return sid;
-}
-
-
-
-wxArtClient wxXmlResourceHandler::GetStockClient(const wxString& param)
-{
- wxXmlNode *stockClientNode = GetParamNode(param);
- if (stockClientNode == NULL)
- return wxEmptyString;
-
- wxXmlNode *oldnode = m_node;
- m_node = stockClientNode;
-
- wxArtClient sid = m_node->GetPropVal(wxT("stock_client"), wxT("wxART_OTHER"));
-
- m_node = oldnode;
-
- if (sid.IsEmpty()) return wxEmptyString;
-#define stdID(id) else if (sid == wxT(#id)) return id
- stdID(wxART_TOOLBAR); stdID(wxART_MENU);
- stdID(wxART_FRAME_ICON); stdID(wxART_CMN_DIALOG);
- stdID(wxART_HELP_BROWSER); stdID(wxART_MESSAGE_BOX);
- stdID(wxART_OTHER);
-#undef stdID
- else return sid;