void static ILNotifyChange (HWND hWnd, PILINE pILine) { // ILNotifyChange HWND hWndParent ; hWndParent = WindowParent (hWnd) ; if (hWndParent) SendMessage (hWndParent, WM_COMMAND, (WPARAM) WindowID (hWnd), (LPARAM) hWnd) ; } // ILNotifyChange
wxString StatusBarWrapper::CppCtorCode() const { // wxStatusBar(wxWindow* parent, wxWindowID id = wxID_ANY, long style = wxST_SIZEGRIP, const wxString& name = // "statusBar") wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << wxT("(") << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << StyleFlags(wxT("wxST_SIZEGRIP")) << wxT(");\n"); code << GetName() << wxT("->SetFieldsCount(") << wxCrafter::ToNumber(PropertyString(PROP_FIELD_COUNT), 1) << wxT(");\n"); code << GetWindowParent() << wxT("->SetStatusBar(") << GetName() << wxT(");\n"); return code; }
wxString ColourPickerWrapper::CppCtorCode() const { wxString code; wxString color = wxCrafter::ColourToCpp(PropertyString(PROP_VALUE)); if(color.IsEmpty()) { color << wxT("*wxBLACK"); } code << GetName() << wxT(" = new ") << GetRealClassName() << wxT("(") << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << color << wxT(", ") << wxT("wxDefaultPosition, ") << SizeAsString() << wxT(", ") << StyleFlags(wxT("wxCLRP_DEFAULT_STYLE")) << wxT(");\n"); code << CPPCommonAttributes(); return code; }
wxString HyperLinkCtrlWrapper::CppCtorCode() const { wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << wxT("(") << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << wxCrafter::UNDERSCORE(PropertyString(PROP_LABEL)) << wxT(", ") << wxCrafter::WXT(PropertyString(PROP_URL)) << wxT(", ") << wxT("wxDefaultPosition, ") << SizeAsString() << wxT(", ") << StyleFlags(wxT("wxHL_DEFAULT_STYLE")) << wxT(");\n"); code << CPPCommonAttributes(); wxString color; color = wxCrafter::ColourToCpp(PropertyString(PROP_NORMAL_COLOR)); if(color.IsEmpty() == false) { code << GetName() << wxT("->SetNormalColour(") << color << wxT(");\n"); } color = wxCrafter::ColourToCpp(PropertyString(PROP_HOVER_COLOR)); if(color.IsEmpty() == false) { code << GetName() << wxT("->SetHoverColour(") << color << wxT(");\n"); } color = wxCrafter::ColourToCpp(PropertyString(PROP_VISITED_COLOR)); if(color.IsEmpty() == false) { code << GetName() << wxT("->SetVisitedColour(") << color << wxT(");\n"); } return code; }
wxString GenericDirCtrlWrapper::CppCtorCode() const { // wxGenericDirCtrl(wxWindow* parent, const wxWindowID id = -1, const wxString& dir = wxDirDialogDefaultFolderStr, // const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = // wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, const wxString& filter = wxEmptyString, int defaultFilter = 0, const // wxString& name = wxTreeCtrlNameStr) wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << wxT("(") << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << wxCrafter::WXT(PropertyString(PROP_DEFAULT_FOLDER)) << wxT(", ") << wxT("wxDefaultPosition, ") << SizeAsString() << wxT(", ") << StyleFlags(wxT("wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER")) << wxT(");\n"); code << CPPCommonAttributes(); // Set the default path wxString path = PropertyString(PROP_DEFAULT_FOLDER); path.Trim().Trim(false); if(path.IsEmpty() == false) { code << GetName() << wxT("->SetDefaultPath(") << wxCrafter::WXT(path) << wxT(");\n"); } // Set the filter string wxString filter = PropertyString(PROP_FILTER); filter.Trim().Trim(false); if(filter.IsEmpty() == false) { code << GetName() << wxT("->SetFilter(") << wxCrafter::WXT(filter) << wxT(");\n"); } // Set the filter index wxString filterIndex = PropertyString(PROP_DEFAULT_FILTER); filterIndex.Trim().Trim(false); int index = wxCrafter::ToNumber(filterIndex, -1); if(-1 != index) { code << GetName() << wxT("->SetFilterIndex(") << index << wxT(");\n"); } // Show hidden files? wxString show = PropertyBool(PROP_SHOW_HIDDEN); code << GetName() << wxT("->ShowHidden(") << show << wxT(");\n"); return code; }
wxString PanelWrapper::CppCtorCode() const { // m_panel4 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << wxT("wxDefaultPosition") << wxT(", ") << SizeAsString() << wxT(", ") << StyleFlags("wxTAB_TRAVERSAL") << ");\n"; code << CPPCommonAttributes(); return code; }
wxString RadioButtonWrapper::CppCtorCode() const { // m_radioBtn3 = new wxRadioButton( m_panel11, wxID_ANY, wxT("RadioBtn"), wxDefaultPosition, wxDefaultSize, // wxRB_USE_CHECKBOX ); m_radioBtn3->SetValue( true ); wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << Label() << wxT(", ") << wxT("wxDefaultPosition, ") << SizeAsString() << wxT(", ") << StyleFlags(wxT("0")) << wxT(");\n"); code << CPPCommonAttributes(); code << GetName() << wxT("->SetValue(") << PropertyString(PROP_VALUE) << wxT(");\n"); return code; }
wxString ChoiceWrapper::CppCtorCode() const { wxString code; wxArrayString options = wxCrafter::Split(PropertyString(PROP_OPTIONS), wxT(";")); code << wxT("wxArrayString ") << GetName() << wxT("Arr;\n"); for(size_t i = 0; i < options.GetCount(); i++) { code << GetName() << wxT("Arr.Add(wxT(\"") << options.Item(i) << wxT("\"));\n"); } code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << wxT("wxDefaultPosition, ") << SizeAsString() << wxT(", ") << GetName() << wxT("Arr") << wxT(", ") << StyleFlags(wxT("0")) << wxT(");\n"); code << CPPCommonAttributes(); long sel = wxCrafter::ToNumber(PropertyString(PROP_SELECTION), -1); if(sel != -1 && sel < (long)options.GetCount()) { code << GetName() << wxT("->SetSelection(") << sel << wxT(");\n"); } return code; }
wxString ListCtrlWrapper::CppCtorCode() const { // wxListCtrl(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = // wxDefaultSize, // long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = // wxListCtrlNameStr) wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID() << wxT(", ") << wxT("wxDefaultPosition, ") << SizeAsString() << wxT(", ") << StyleFlags(wxT("0")) << wxT(");\n"); code << CPPCommonAttributes(); return code; }
wxString BitmapComboxWrapper::CppCtorCode() const { wxArrayString labels, bitmaps; wxString options = PropertyString(PROP_CB_CHOICES); BmpTextVec_t arr = BmpTextSelectorDlg::FromString(options); for(size_t i = 0; i < arr.size(); ++i) { wxcCodeGeneratorHelper::Get().AddBitmap(arr.at(i).first); bitmaps.Add(wxcCodeGeneratorHelper::Get().BitmapCode(arr.at(i).first)); labels.Add(arr.at(i).second); } wxString code; code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID() << wxT(", wxEmptyString") << wxT(", wxDefaultPosition, ") << SizeAsString() << wxT(", wxArrayString(), ") << StyleFlags(wxT("0")) << wxT(");\n"); // Append the items for(size_t i = 0; i < labels.GetCount(); ++i) { code << GetName() << "->Append(" << wxCrafter::UNDERSCORE(labels.Item(i)) << ", " << bitmaps.Item(i) << ");\n"; } int sel = PropertyInt(PROP_SELECTION); if(sel != wxNOT_FOUND && sel < (int)labels.GetCount()) { code << GetName() << "->SetSelection(" << sel << ");\n"; } return code; }
wxString AnimationCtrlWrapper::CppCtorCode() const { wxcCodeGeneratorHelper::Get().AddBitmap(PropertyFile(PROP_DISABLED_BITMAP_PATH)); wxString code; // wxAnimationCtrl (wxWindow *parent, wxWindowID id, const wxAnimation &anim=wxNullAnimation, const wxPoint // &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxAC_DEFAULT_STYLE, const wxString // &name=wxAnimationCtrlNameStr) code << GetName() << wxT(" = new ") << GetRealClassName() << "(" << GetWindowParent() << wxT(", ") << WindowID() << wxT(", wxNullAnimation, wxDefaultPosition, ") << SizeAsString() << wxT(", ") << StyleFlags(wxT("wxAC_DEFAULT_STYLE")) << wxT(");\n"); // Load the image file if(PropertyBool(PROP_ANIM_AUTO_PLAY) == "true") { code << "if( wxFileName::Exists(" << wxCrafter::WXT(PropertyFile(PROP_BITMAP_PATH)) << ") && " << GetName() << "->LoadFile(" << wxCrafter::WXT(PropertyFile(PROP_BITMAP_PATH)) << "))" << GetName() << "->Play();\n"; } code << CPPCommonAttributes(); code << GetName() << "->SetInactiveBitmap(" << wxcCodeGeneratorHelper::Get().BitmapCode(PropertyFile(PROP_DISABLED_BITMAP_PATH)) << ");\n"; return code; }