void HyperLinkCtrlWrapper::LoadPropertiesFromwxFB(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxFB(node); wxXmlNode* propertynode = XmlUtils::FindNodeByName(node, "property", "url"); if(propertynode) { SetPropertyString(PROP_URL, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindNodeByName(node, "property", "hover_color"); if(propertynode) { wxString col = wxCrafter::ValueToColourString(propertynode->GetNodeContent()); if(!col.empty()) { SetPropertyString(PROP_HOVER_COLOR, col); } } propertynode = XmlUtils::FindNodeByName(node, "property", "normal_color"); if(propertynode) { wxString col = wxCrafter::ValueToColourString(propertynode->GetNodeContent()); if(!col.empty()) { SetPropertyString(PROP_NORMAL_COLOR, col); } } propertynode = XmlUtils::FindNodeByName(node, "property", "visited_color"); if(propertynode) { wxString col = wxCrafter::ValueToColourString(propertynode->GetNodeContent()); if(!col.empty()) { SetPropertyString(PROP_VISITED_COLOR, col); } } }
// After changing any name field you should call this to update PR_INITIALS and PR_DISPLAY_NAME bool MAPIContact::UpdateDisplayName() { String strPrefix, strFirst, strMiddle, strLast, strGeneration, strFullName, strFileAs, strInitials; strPrefix = GetDisplayNamePrefix(); if(strPrefix.GetLength()) { strFullName = strPrefix; strFullName += ' '; } strFirst = GetName(PR_GIVEN_NAME); if(strFirst.GetLength()) { strFileAs += strFirst; strInitials += strFirst[0]; strInitials += '.'; } strMiddle = GetName(PR_MIDDLE_NAME); if(strMiddle.GetLength()) { if(strFileAs.GetLength()) strFileAs += ' '; strFileAs += strMiddle; strInitials += strMiddle[0]; strInitials += '.'; int i = 1, nLen = strMiddle.GetLength(); while(i < nLen) { if(strMiddle[i-1] == ' ') { strInitials += strMiddle[i]; strInitials += '.'; } i++; } } strLast = GetName(PR_SURNAME); if(strLast.GetLength()) { if(strFileAs.GetLength()) strFileAs += ' '; strFileAs += strLast; strInitials += strLast[0]; strInitials += '.'; } if(strFileAs.GetLength()) strFullName += strFileAs; strGeneration = GetGeneration(); if(strGeneration.GetLength()) { if(strFullName.GetLength()) strFullName += ' '; strFullName += strGeneration; } #ifdef _WIN32_WCE return SetName(strFileAs, PR_DISPLAY_NAME); #else if(!SetPropertyString(PR_INITIALS, strInitials)) return false; if(!SetName(strFullName, PR_DISPLAY_NAME)) return false; SetOutlookProperty(OUTLOOK_DATA1, OUTLOOK_FILE_AS, strFileAs); if(!SetPropertyString(PR_SUBJECT, strFileAs)) return false; return SetPropertyString(PR_NORMALIZED_SUBJECT, strFileAs); #endif }
NS_IMETHOD Run() { nsresult rv = NS_OK; if (m_Result == EWS_SUCCESS) { //Save item id rv = SetPropertyString(m_Todo, NS_LITERAL_STRING("X-ITEM-ID"), m_ItemId); NS_ENSURE_SUCCESS(rv, rv); //Save change key rv = SetPropertyString(m_Todo, NS_LITERAL_STRING("X-CHANGE-KEY"), m_ChangeKey); NS_ENSURE_SUCCESS(rv, rv); nsCString oldUid; rv = m_Todo->GetId(oldUid); if (NS_SUCCEEDED(rv) && oldUid.IsEmpty()) { //Updat the uid m_Todo->SetId(m_ItemId); } } NotifyEnd(m_Runnable, m_Result); return NS_OK; }
void RadioButtonWrapper::LoadPropertiesFromwxSmith(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxSmith(node); wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("label")); if(propertynode) { SetPropertyString(PROP_VALUE, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindFirstByTagName(node, wxT("selected")); if(propertynode) { SetPropertyString(PROP_SELECTION, propertynode->GetNodeContent()); } }
void ChoiceWrapper::LoadPropertiesFromwxSmith(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxSmith(node); // The Options (content) property has a default, so we must clear it even if the node is absent wxString multistring; wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("content")); if(propertynode) { multistring = XmlUtils::ChildNodesContentToString(propertynode); } SetPropertyString(PROP_OPTIONS, multistring); propertynode = XmlUtils::FindFirstByTagName(node, wxT("selection")); if(propertynode) { SetPropertyString(PROP_SELECTION, propertynode->GetNodeContent()); } }
void GenericDirCtrlWrapper::LoadPropertiesFromwxSmith(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromXRC(node); wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("defaultfolder")); if(propertynode) { SetPropertyString(PROP_DEFAULT_FOLDER, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindFirstByTagName(node, wxT("filter")); if(propertynode) { SetPropertyString(PROP_FILTER, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindFirstByTagName(node, wxT("defaultfilter")); if(propertynode) { SetPropertyString(PROP_DEFAULT_FILTER, propertynode->GetNodeContent()); } }
void ChoiceWrapper::LoadPropertiesFromwxFB(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxFB(node); // The "choices" property has a default, so we should clear it even if the node was absent wxXmlNode* propertynode = XmlUtils::FindNodeByName(node, "property", "choices"); wxString content; if(propertynode) { content = ImportFromwxFB::ConvertFBOptionsString(propertynode->GetNodeContent()); } SetPropertyString(PROP_OPTIONS, content); propertynode = XmlUtils::FindNodeByName(node, "property", "selection"); if(propertynode) { SetPropertyString(PROP_SELECTION, propertynode->GetNodeContent()); } }
HyperLinkCtrlWrapper::HyperLinkCtrlWrapper() : wxcWidget(ID_WXHYPERLINK) { PREPEND_STYLE_FALSE(wxHL_ALIGN_LEFT); PREPEND_STYLE_FALSE(wxHL_ALIGN_RIGHT); PREPEND_STYLE_FALSE(wxHL_ALIGN_CENTRE); PREPEND_STYLE_FALSE(wxHL_CONTEXTMENU); PREPEND_STYLE_TRUE(wxHL_DEFAULT_STYLE); RegisterEvent(wxT("wxEVT_COMMAND_HYPERLINK"), wxT("wxHyperlinkEvent"), _("The hyperlink was (left) clicked. If this event is not handled in user's code (or it's skipped; " "see wxEvent::Skip)\nthen a call to wxLaunchDefaultBrowser is done with the hyperlink's URL.")); SetPropertyString(_("Common Settings"), "wxHyperLinkCtrl"); AddProperty(new StringProperty(PROP_LABEL, wxT("codelite IDE"), _("The label of the hyperlink"))); AddProperty( new StringProperty(PROP_URL, wxT("http://www.codelite.org"), _("The URL associated with the given label"))); AddProperty( new ColorProperty(PROP_NORMAL_COLOR, wxT("#0000FF"), _("Sets the colour used to print the label when the link has never been clicked " "before\n(i.e. the link has not been visited) and the mouse is not over the control."))); AddProperty(new ColorProperty(PROP_VISITED_COLOR, wxT("#FF0000"), _("Sets the colour used to print the label when the mouse is not over the control " "and the link has already been clicked before\n(i.e. the link has been visited)"))); AddProperty(new ColorProperty( PROP_HOVER_COLOR, wxT("#0000FF"), _("Sets the colour used to print the label of the hyperlink when the mouse is over the control"))); m_namePattern = wxT("m_hyperLink"); SetName(GenerateName()); }
void HyperLinkCtrlWrapper::LoadPropertiesFromwxSmith(const wxXmlNode* node) { wxcWidget::LoadPropertiesFromwxSmith(node); // Baseclass stuff first wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("url")); if(propertynode) { SetPropertyString(PROP_URL, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindFirstByTagName(node, wxT("normal_color")); if(propertynode) { SetPropertyString(PROP_NORMAL_COLOR, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindFirstByTagName(node, wxT("hover_color")); if(propertynode) { SetPropertyString(PROP_HOVER_COLOR, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindFirstByTagName(node, wxT("visited_color")); if(propertynode) { SetPropertyString(PROP_VISITED_COLOR, propertynode->GetNodeContent()); } }
bool MAPIContact::SetNotes(const String &szNotes, bool bRTF) { #ifdef _WIN32_WCE return SetPropertyString(PR_BODY, szNotes); #else if(!Contact() || IsNull(szNotes)) return false; ULONG nLen = (ULONG)szNotes.GetLength(); HRESULT hr = E_FAIL; LPSTREAM pStream = NULL; if(bRTF) { if(Contact()->OpenProperty(PR_RTF_COMPRESSED, &IID_IStream, STGM_CREATE | STGM_WRITE, MAPI_MODIFY | MAPI_CREATE, (LPUNKNOWN*)&pStream) == S_OK) { IStream *pUncompressed; if(WrapCompressedRTFStream(pStream,MAPI_MODIFY, &pUncompressed) == S_OK) { hr = pUncompressed->Write(szNotes, nLen*sizeof(TCHAR), NULL); if(pUncompressed->Commit(STGC_DEFAULT)==S_OK) pStream->Commit(STGC_DEFAULT); RELEASE(pUncompressed); } } } else { if(Contact()->OpenProperty(PR_BODY, &IID_IStream, 0, MAPI_MODIFY | MAPI_CREATE, (LPUNKNOWN*)&pStream) == S_OK) hr = pStream->Write(szNotes, (nLen+1)*sizeof(TCHAR), NULL); } RELEASE(pStream); return (hr == S_OK); #endif }
RibbonButtonBarWrapper::RibbonButtonBarWrapper() : wxcWidget(ID_WXRIBBONBUTTONBAR) { SetPropertyString(_("Common Settings"), "wxRibbonButtonBar"); m_namePattern = "m_ribbonButtonBar"; SetName(GenerateName()); }
bool MAPIContact::SetFileAs(const String &szFileAs) { #ifdef _WIN32_WCE return SetPropertyString(PR_DISPLAY_NAME, szFileAs); #else return SetOutlookProperty(OUTLOOK_DATA1, OUTLOOK_FILE_AS, szFileAs); #endif }
TaskBarIconWrapper::TaskBarIconWrapper() : wxcWidget(ID_WXTASKBARICON) { m_styles.Clear(); AddText(PROP_TOOLTIP, _("Set the wxTaskBarIcon tooltip")); wxArrayString types; types.Add("wxTBI_DEFAULT_TYPE"); types.Add("wxTBI_DOCK"); types.Add("wxTBI_CUSTOM_STATUSITEM"); SetPropertyString(_("Common Settings"), "wxTaskBarIcon"); AddProperty( new ChoiceProperty(PROP_TASKBAR_ICONTYPE, types, 0, _("The iconType is only applicable on wxOSX_Cocoa"))); AddProperty(new BitmapPickerProperty(PROP_BITMAP_PATH, "", _("Set the wxTaskBarIcon icon"))); RegisterEvent("wxEVT_TASKBAR_MOVE", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_MOVE event")); RegisterEvent("wxEVT_TASKBAR_LEFT_DOWN", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_LEFT_DOWN event")); RegisterEvent("wxEVT_TASKBAR_LEFT_UP", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_LEFT_UP event")); RegisterEvent("wxEVT_TASKBAR_RIGHT_DOWN", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_RIGHT_DOWN event")); RegisterEvent("wxEVT_TASKBAR_RIGHT_UP", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_RIGHT_UP event")); RegisterEvent("wxEVT_TASKBAR_LEFT_DCLICK", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_LEFT_DCLICK event")); RegisterEvent("wxEVT_TASKBAR_RIGHT_DCLICK", "wxTaskBarIconEvent", _("Process a wxEVT_TASKBAR_RIGHT_DCLICK event")); m_namePattern = "m_taskBarIcon"; SetName(GenerateName()); }
BitmapComboxWrapper::BitmapComboxWrapper() : wxcWidget(ID_WXBITMAPCOMBOBOX) { SetPropertyString(_("Common Settings"), "wxBitmapComboBox"); AddProperty(new BitmapTextArrayProperty(PROP_CB_CHOICES, "", wxT("Combobox drop down choices"))); AddProperty(new StringProperty( PROP_SELECTION, wxT("-1"), wxT("The zero-based position of any initially selected string, or -1 if none are to be selected"))); AddProperty(new StringProperty(PROP_VALUE, "", wxT("The combobox initial value"))); RegisterEventCommand(wxT("wxEVT_COMMAND_COMBOBOX_SELECTED"), wxT("Process a wxEVT_COMMAND_COMBOBOX_SELECTED event, when an item on the list is selected. " "Note that calling GetValue returns the new value of selection.")); RegisterEventCommand(wxT("wxEVT_COMMAND_TEXT_UPDATED"), wxT("Process a wxEVT_COMMAND_TEXT_UPDATED event, when the combobox text changes.")); RegisterEventCommand(wxT("wxEVT_COMMAND_TEXT_ENTER"), wxT("Process a wxEVT_COMMAND_TEXT_ENTER event, when <RETURN> is pressed in the combobox.")); PREPEND_STYLE(wxCB_READONLY, false); PREPEND_STYLE(wxCB_SORT, false); PREPEND_STYLE(wxTE_PROCESS_ENTER, false); m_namePattern = "m_bmpComboBox"; SetName(GenerateName()); }
void StatusBarWrapper::LoadPropertiesFromwxFB(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxFB(node); wxXmlNode* propertynode = XmlUtils::FindNodeByName(node, "property", "fields"); if(propertynode) { SetPropertyString(PROP_FIELD_COUNT, propertynode->GetNodeContent()); } }
void BoxSizerWrapper::LoadPropertiesFromwxFB(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxFB(node); wxXmlNode* propertynode = XmlUtils::FindNodeByName(node, "property", "orient"); if(propertynode) { SetPropertyString(PROP_ORIENTATION, propertynode->GetNodeContent()); } }
void HyperLinkCtrlWrapper::LoadPropertiesFromXRC(const wxXmlNode* node) { wxcWidget::LoadPropertiesFromXRC(node); // Baseclass stuff first wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("url")); if(propertynode) { SetPropertyString(PROP_URL, propertynode->GetNodeContent()); } // XRC doesn't seem to do the other properties }
bool MAPIContact::SetName(const String &szName, ULONG ulNameID) { ULONG i = 0; while(NameIDs[i] != ulNameID && NameIDs[i] > 0) i++; if(!NameIDs[i]) return false; return SetPropertyString(ulNameID, szName); }
void ColourPickerWrapper::LoadPropertiesFromwxSmith(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxSmith(node); wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("colour")); if(propertynode) { SetPropertyString(PROP_VALUE, propertynode->GetNodeContent()); } }
void RadioButtonWrapper::LoadPropertiesFromwxFB(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxFB(node); wxXmlNode* propertynode = XmlUtils::FindNodeByName(node, "property", "value"); if(propertynode) { SetPropertyString(PROP_VALUE, propertynode->GetNodeContent()); } }
ListCtrlWrapper::ListCtrlWrapper() : wxcWidget(ID_WXLISTCTRL) { SetPropertyString(_("Common Settings"), "wxListCtrl"); PREPEND_STYLE(wxLC_LIST, false); PREPEND_STYLE(wxLC_REPORT, true); PREPEND_STYLE(wxLC_VIRTUAL, false); PREPEND_STYLE(wxLC_ICON, false); PREPEND_STYLE(wxLC_SMALL_ICON, false); PREPEND_STYLE(wxLC_ALIGN_TOP, false); PREPEND_STYLE(wxLC_ALIGN_LEFT, false); PREPEND_STYLE(wxLC_EDIT_LABELS, false); PREPEND_STYLE(wxLC_NO_HEADER, false); PREPEND_STYLE(wxLC_SINGLE_SEL, false); PREPEND_STYLE(wxLC_SORT_ASCENDING, false); PREPEND_STYLE(wxLC_SORT_DESCENDING, false); PREPEND_STYLE(wxLC_HRULES, false); PREPEND_STYLE(wxLC_VRULES, false); RegisterEvent(wxT("wxEVT_COMMAND_LIST_ITEM_SELECTED"), wxT("wxListEvent"), wxT("The item has been selected")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_ITEM_DESELECTED"), wxT("wxListEvent"), wxT("The item has been deselected")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK"), wxT("wxListEvent"), wxT("The right mouse button has been clicked on an item")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK"), wxT("wxListEvent"), wxT("The middle mouse button has been clicked on an item")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_ITEM_ACTIVATED"), wxT("wxListEvent"), wxT("The item has been activated (ENTER or double click)")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_ITEM_FOCUSED"), wxT("wxListEvent"), wxT("The currently focused item has changed")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_KEY_DOWN"), wxT("wxListEvent"), wxT("A key has been pressed")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_COL_CLICK"), wxT("wxListEvent"), wxT("A column (m_col) has been left-clicked")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_COL_RIGHT_CLICK"), wxT("wxListEvent"), wxT("A column (m_col) has been right-clicked")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_COL_BEGIN_DRAG"), wxT("wxListEvent"), wxT("The user started resizing a column - can be vetoed")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_COL_DRAGGING"), wxT("wxListEvent"), wxT("The divider between columns is being dragged")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_COL_END_DRAG"), wxT("wxListEvent"), wxT("A column has been resized by the user")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_BEGIN_DRAG"), wxT("wxListEvent"), wxT("Begin dragging with the left mouse button")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_BEGIN_RDRAG"), wxT("wxListEvent"), wxT("Begin dragging with the right mouse button.")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT"), wxT("wxListEvent"), wxT("Begin editing a label. This can be prevented by calling Veto()")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_END_LABEL_EDIT"), wxT("wxListEvent"), wxT("Finish editing a label. This can be prevented by calling Veto()")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_DELETE_ITEM"), wxT("wxListEvent"), wxT("Delete an item")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS"), wxT("wxListEvent"), wxT("Delete all items")); RegisterEvent(wxT("wxEVT_COMMAND_LIST_INSERT_ITEM"), wxT("wxListEvent"), wxT("An item has been inserted")); m_namePattern = wxT("m_listCtrl"); SetName(GenerateName()); }
PanelWrapper::PanelWrapper() : wxcWidget(ID_WXPANEL) { SetPropertyString(_("Common Settings"), "wxPanel"); // Enable the 'wxTAB_TRAVERSAL' style EnableStyle(wxT("wxTAB_TRAVERSAL"), true); m_namePattern = wxT("m_panel"); SetName(GenerateName()); }
DataViewListCtrlWrapper::DataViewListCtrlWrapper() : wxcWidget(ID_WXDATAVIEWLISTCTRL) { PREPEND_STYLE(wxDV_SINGLE, true); PREPEND_STYLE(wxDV_MULTIPLE, false); PREPEND_STYLE(wxDV_ROW_LINES, true); PREPEND_STYLE(wxDV_HORIZ_RULES, false); PREPEND_STYLE(wxDV_VERT_RULES, false); PREPEND_STYLE(wxDV_VARIABLE_LINE_HEIGHT, false); PREPEND_STYLE(wxDV_NO_HEADER, false); RegisterEvent("wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED event.\nThis event is triggered by double " "clicking an item or pressing some special key (usually \"Enter\") when it is focused")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING event.\nThis event can be vetoed in order to " "prevent editing on an item by item basis")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU event generated when the user right clicks " "inside the control.\nNotice that this menu is generated even if the click didn't occur on any " "valid item, in this case wxDataViewEvent::GetItem() simply returns an invalid item.")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE event")); RegisterEvent("wxEVT_COMMAND_DATAVIEW_ITEM_DROP", "wxDataViewEvent", _("Process a wxEVT_COMMAND_DATAVIEW_ITEM_DROP event")); SetPropertyString(_("Common Settings"), "wxDataViewListCtrl"); m_namePattern = "m_dvListCtrl"; DelProperty(_("Control Specific Settings")); SetName(GenerateName()); }
GenericDirCtrlWrapper::GenericDirCtrlWrapper() : wxcWidget(ID_WXGENERICDIRCTRL) { SetPropertyString(_("Common Settings"), "wxGenericDirCtrl"); AddProperty(new StringProperty(PROP_DEFAULT_FOLDER, wxT(""), _("Sets the default path"))); AddProperty(new StringProperty(PROP_FILTER, wxT(""), _("Sets the filter string. The syntax is similar to the one used in wxFileDialog"))); AddProperty(new StringProperty(PROP_DEFAULT_FILTER, wxT(""), _("Sets the current filter index (zero-based)."))); AddProperty(new BoolProperty(PROP_SHOW_HIDDEN, false, _("Show hidden files"))); PREPEND_STYLE_FALSE(wxDIRCTRL_DIR_ONLY); PREPEND_STYLE_TRUE(wxDIRCTRL_3D_INTERNAL); PREPEND_STYLE_FALSE(wxDIRCTRL_SELECT_FIRST); PREPEND_STYLE_FALSE(wxDIRCTRL_SHOW_FILTERS); PREPEND_STYLE_FALSE(wxDIRCTRL_EDIT_LABELS); RegisterEvent(wxT("wxEVT_COMMAND_TREE_BEGIN_DRAG"), wxT("wxTreeEvent"), wxT("The user has started dragging an item with the left mouse button.\nThe event handler must call " "wxTreeEvent::Allow() for the drag operation to continue.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_BEGIN_RDRAG"), wxT("wxTreeEvent"), wxT("The user has started dragging an item with the right mouse button.\nThe event handler must call " "wxTreeEvent::Allow() for the drag operation to continue.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_END_DRAG"), wxT("wxTreeEvent"), wxT("The user has released the mouse after dragging an item.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT"), wxT("wxTreeEvent"), wxT("Begin editing a label. This can be prevented by calling Veto().")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_END_LABEL_EDIT"), wxT("wxTreeEvent"), wxT("The user has finished editing a label. This can be prevented by calling Veto().")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_DELETE_ITEM"), wxT("wxTreeEvent"), wxT("A tree item has been deleted.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_EXPANDED"), wxT("wxTreeEvent"), wxT("The item has been expanded.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_EXPANDING"), wxT("wxTreeEvent"), wxT("The item is being expanded. This can be prevented by calling Veto().")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_COLLAPSED"), wxT("wxTreeEvent"), wxT("The item has been collapsed.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_COLLAPSING"), wxT("wxTreeEvent"), wxT("The item is being collapsed. This can be prevented by calling Veto().")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_SEL_CHANGED"), wxT("wxTreeEvent"), wxT("Selection has changed.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_SEL_CHANGING"), wxT("wxTreeEvent"), wxT("Selection is changing. This can be prevented by calling Veto().")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_KEY_DOWN"), wxT("wxTreeEvent"), wxT("A key has been pressed.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_ACTIVATED"), wxT("wxTreeEvent"), wxT("An item has been activated (e.g. double clicked).")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK"), wxT("wxTreeEvent"), wxT("The user has clicked the item with the right mouse button.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK"), wxT("wxTreeEvent"), wxT("The user has clicked the item with the middle mouse button.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK"), wxT("wxTreeEvent"), wxT("The state image has been clicked. Windows only.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP"), wxT("wxTreeEvent"), wxT("The opportunity to set the item tooltip is being given to the application\n (call " "wxTreeEvent::SetToolTip). Windows only.")); RegisterEvent(wxT("wxEVT_COMMAND_TREE_ITEM_MENU"), wxT("wxTreeEvent"), wxT("The context menu for the selected item has been requested,\neither by a right click or by using " "the menu key.")); m_namePattern = wxT("m_genericDirCtrl"); SetName(GenerateName()); }
ActivityrIndicatorWrapper::ActivityrIndicatorWrapper() : wxcWidget(ID_WXACTIVITYINDICATOR) { RegisterEvent(wxT("wxEVT_COMMAND_BUTTON_CLICKED"), wxT("wxCommandEvent"), _("Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked."), wxT("wxCommandEventHandler")); m_namePattern = wxT("m_activityCtrl"); SetPropertyString(_("Common Settings"), "wxActivityIndicator"); SetName(GenerateName()); }
void GenericDirCtrlWrapper::LoadPropertiesFromwxFB(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxFB(node); wxXmlNode* propertynode = XmlUtils::FindNodeByName(node, "property", "defaultfolder"); if(propertynode) { SetPropertyString(PROP_DEFAULT_FOLDER, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindNodeByName(node, "property", "filter"); if(propertynode) { SetPropertyString(PROP_FILTER, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindNodeByName(node, "property", "defaultfilter"); if(propertynode) { SetPropertyString(PROP_DEFAULT_FILTER, propertynode->GetNodeContent()); } propertynode = XmlUtils::FindNodeByName(node, "property", "show_hidden"); if(propertynode) { PropertyBase* prop = GetProperty(PROP_SHOW_HIDDEN); if(prop) { prop->SetValue(propertynode->GetNodeContent()); } } }
ChoiceBookWrapper::ChoiceBookWrapper() : NotebookBaseWrapper(ID_WXCHOICEBOOK) { RegisterEvent(wxT("wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED"), wxT("wxChoicebookEvent"), _("The page selection was changed")); RegisterEvent(wxT("wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING"), wxT("wxChoicebookEvent"), _("The page selection is about to be changed. This event can be vetoed")); SetPropertyString(_("Common Settings"), "wxChoicebook"); m_namePattern = wxT("m_choicebook"); SetName(GenerateName()); }
void BoxSizerWrapper::LoadPropertiesFromwxSmith(const wxXmlNode* node) { // First call the base-class for the standard things wxcWidget::LoadPropertiesFromwxSmith(node); // wxSmith doesn't use "name" here, but "variable" means the same thing afaict wxString value = XmlUtils::ReadString(node, wxT("variable")); if(!value.empty()) { SetName(value); } wxXmlNode* propertynode = XmlUtils::FindFirstByTagName(node, wxT("orient")); if(propertynode) { SetPropertyString(PROP_ORIENTATION, propertynode->GetNodeContent()); } }
bool MAPIContact::SetPhoneNumber(const String &szPhoneNumber, ULONG ulPhoneNumberID) { ULONG i = 0; while(PhoneNumberIDs[i] != ulPhoneNumberID && PhoneNumberIDs[i] > 0) i++; if(!PhoneNumberIDs[i] || szPhoneNumber.IsEmpty()) return false; // lets do a check for North American phone numbers and change the format if so to "(code) xxx-yyyy" String strPhoneNumber = szPhoneNumber; if(strPhoneNumber.GetLength()==12 && szPhoneNumber[3]==(TCHAR)'-' && szPhoneNumber[7]==(TCHAR)'-') strPhoneNumber = Format(t_("(%s) %s"), strPhoneNumber.Mid(0,3), strPhoneNumber.Right(8)); return SetPropertyString(ulPhoneNumberID, strPhoneNumber); }
ChoiceWrapper::ChoiceWrapper() : wxcWidget(ID_WXCHOICE) { SetPropertyString(_("Common Settings"), "wxChoice"); AddProperty( new MultiStringsProperty(PROP_OPTIONS, wxT("The Choice drop down options. A semi-colon list of strings"))); AddProperty(new StringProperty(PROP_SELECTION, wxT(""), wxT("Selected string index"))); RegisterEventCommand(wxT("wxEVT_COMMAND_CHOICE_SELECTED"), wxT("Process a wxEVT_COMMAND_CHOICE_SELECTED event, when an item on the list is selected.")); m_namePattern = wxT("m_choice"); SetName(GenerateName()); }