void wxsCustomWidget::OnEnumWidgetProperties(long Flags)
{
    wxString XmlDataInit = m_XmlData;
    if ( GetPropertiesFlags() & flSource )
    {
        WXS_STRING(wxsCustomWidget,m_CreatingCode,_("Creating code"),_T("creating_code"),_T(""),true);
        WXS_SHORT_STRING(wxsCustomWidget,m_IncludeFile,_("Include file"), _T("include_file"), _T(""),false);
        WXS_BOOL(wxsCustomWidget,m_IncludeIsLocal,_(" Use \"\" for include (instead of <>)"), _T("local_include"), false);
    }
    else
    {
        if ( !(Flags&flXml) )
        {
            WXS_STRING(wxsCustomWidget,m_XmlData,_("Xml Data"),_T(""),_T(""),false);
        }
    }

    WXS_SHORT_STRING(wxsCustomWidget,m_Style,_("Style"),_T("style"),_T("0"),false);

    if ( Flags&flPropGrid )
    {
        if ( XmlDataInit != m_XmlData )
        {
            // We know it's propgrid operation and xml data has changed,
            // need to reparse this data
            RebuildXmlDataDoc();
        }
    }
}
Example #2
0
void wxsToolBarItem::OnEnumToolProperties(long Flags)
{

    switch ( m_Type )
    {
        case Normal:
        case Radio:
        case Check:
            WXS_SHORT_STRING(wxsToolBarItem,m_Label,_("Label"),_T("label"),_T(""),true);
            WXS_BITMAP(wxsToolBarItem,m_Bitmap,_("Bitmap"),_T("bitmap"),_T("wxART_TOOLBAR"));
            WXS_BITMAP(wxsToolBarItem,m_Bitmap2,_("Disabled bitmap"),_T("bitmap2"),_T("wxART_TOOLBAR"));
            WXS_STRING(wxsToolBarItem,m_ToolTip,_("Tooltip"),_T("tooltip"),_T(""),false);
            WXS_STRING(wxsToolBarItem,m_HelpText,_("Help text"),_T("longhelp"),_T(""),false);
            break;

        default:;
    }
}
void wxsCustomButton::OnEnumWidgetProperties(long Flags)
{
    WXS_ENUM(wxsCustomButton,m_Type,_("Type"),_T("type"),TypeValues,TypeNames,wxCUSTBUT_BUTTON);
    WXS_BOOL(wxsCustomButton,m_Flat,_("Flat"),_T("flat"),false);
    WXS_STRING(wxsCustomButton,m_Label,_("Label"),_T("label"),_T(""),false);
    WXS_ENUM(wxsCustomButton,m_LabelPosition,_("Label position"),_T("label_position"),LabelPositionValues,LabelPositionNames,wxCUSTBUT_BOTTOM);
    WXS_BITMAP(wxsCustomButton,m_Bitmap,_("Bitmap"),_T("bitmap"),_T("wxART_OTHER"));
    WXS_BITMAP(wxsCustomButton,m_BitmapSelected,_("Selected bmp"),_T("selected"),_T("wxART_OTHER"));
    WXS_BITMAP(wxsCustomButton,m_BitmapFocused,_("Focused bmp"),_T("focused"),_T("wxART_OTHER"));
    WXS_BITMAP(wxsCustomButton,m_BitmapDisabled,_("Disbled bmp"),_T("disabled"),_T("wxART_OTHER"));
    WXS_SIZE(wxsCustomButton,m_Margins,_("Default margin"),_("Margin width"),_("Margin height"),_("Margin in Dialog Units"),_T("margin"));
    WXS_SIZE(wxsCustomButton,m_LabelMargins,_("Default label margin"),_("Label marg. width"),_("Label marg. height"),_("Label marg. in Dialog Units"),_T("label_margin"));
    WXS_SIZE(wxsCustomButton,m_BitmapMargins,_("Default bitmap margin"),_("Bitmap marg. width"),_("Bitmap marg. height"),_("Bitmap marg. in Dialog Units"),_T("bitmap_margin"));
}
Example #4
0
void wxsAxis::OnEnumWidgetProperties(long Flags) {
    static const long    TypeValues[]  = {    0,            1,        0};
    static const wxChar* TypeNames[]   = {_T("X-Axis"), _T("Y-Axis"), 0};
    static const long    AlignValues[] = {    mpALIGN_BORDER_LEFT,       mpALIGN_BORDER_TOP,       mpALIGN_LEFT,       mpALIGN_TOP,       mpALIGN_CENTER,       mpALIGN_RIGHT,       mpALIGN_BOTTOM,       mpALIGN_BORDER_RIGHT,       mpALIGN_BORDER_BOTTOM,   0};
    static const wxChar* AlignNames[]  = {_T("mpALIGN_BORDER_LEFT"), _T("mpALIGN_BORDER_TOP"), _T("mpALIGN_LEFT"), _T("mpALIGN_TOP"), _T("mpALIGN_CENTER"), _T("mpALIGN_RIGHT"), _T("mpALIGN_BOTTOM"), _T("mpALIGN_BORDER_RIGHT"), _T("mpALIGN_BORDER_BOTTOM"), 0};



    WXS_ENUM(  wxsAxis, mType,       _("Axis Type"),      _("mType"),   TypeValues,  TypeNames, 0);
    WXS_STRING(wxsAxis, mLabel,      _("Label"),          _T("mLabel"), _T("axis"),  true);
    WXS_ENUM(  wxsAxis, mAlign,      _("Axis Location"),  _("mAlign"),  AlignValues, AlignNames, mpALIGN_CENTER);
    WXS_BOOL(  wxsAxis, mTics,       _("Show Tic Marks"), _("mTics"),   true);
    WXS_COLOUR(wxsAxis, mPenColour,  _("Pen Colour"),     _("mPenColour"));
    WXS_FONT(  wxsAxis, mPenFont,    _("Pen Font"),       _("mPenFont"));

}
        Preview->SetBorders(Borders.GetPixels(Parent));
    }
    if ( !Url.empty() )
    {
        if ( Flags & pfExact )
        {
            Preview->LoadPage(Url);
        }
        else
        {
            Preview->SetPage(
                wxString(_T("<body><center>")) +
                _("Following url will be used:") +
                _T("<br>") + Url + _T("</center></body>"));
        }
    }
    else if ( !HtmlCode.empty() )
    {
        Preview->SetPage(HtmlCode);
    }

    return SetupWindow(Preview,Flags);
}

void wxsHtmlWindow::OnEnumWidgetProperties(long Flags)
{
    WXS_SHORT_STRING(wxsHtmlWindow,Url,_("Url"),_T("url"),_T(""),false)
    WXS_STRING(wxsHtmlWindow,HtmlCode,_("Html Code"),_T("htmlcode"),_T(""),false)
    WXS_DIMENSION(wxsHtmlWindow,Borders,_("Borders"),_("Borders in Dialog Units"),_("borders"),0,false)
}
Example #6
0
            AddHeader(_T("<wx/button.h>"),GetInfo().ClassName,hfInPCH);
            #if wxCHECK_VERSION(2, 9, 0)
            Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Label.wx_str());
            #else
            Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Label.c_str());
            #endif
            if ( IsDefault ) Codef( _T("%ASetDefault();\n"));
            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsButton::OnBuildCreatingCode"),GetLanguage());
        }
    }
}

wxObject* wxsButton::OnBuildPreview(wxWindow* Parent,long Flags)
{
    wxButton* Preview = new wxButton(Parent,GetId(),Label,Pos(Parent),Size(Parent),Style());
    if ( IsDefault ) Preview->SetDefault();
    return SetupWindow(Preview,Flags);
}

void wxsButton::OnEnumWidgetProperties(long Flags)
{
    WXS_STRING(wxsButton,Label,_("Label"),_T("label"),_T(""),false)
    WXS_BOOL(wxsButton,IsDefault,_("Is default"),_T("default"),false)
}
Example #7
0
            #if wxCHECK_VERSION(2, 9, 0)
            Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Text.wx_str());
            #else
            Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Text.c_str());
            #endif
            if ( MaxLength > 0 ) Codef(_T("%ASetMaxLength(%d);\n"),MaxLength);
            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsTextCtrl::OnBuildCreatingCode"),GetLanguage());
        }
    }
}


wxObject* wxsTextCtrl::OnBuildPreview(wxWindow* Parent,long Flags)
{
    wxTextCtrl* Preview = new wxTextCtrl(Parent,GetId(),Text,Pos(Parent),Size(Parent),Style());
    return SetupWindow(Preview,Flags);
}


void wxsTextCtrl::OnEnumWidgetProperties(long Flags)
{
    WXS_STRING(wxsTextCtrl,Text,_("Text"),_T("value"),_T(""),false)
    WXS_LONG(wxsTextCtrl,MaxLength,_("Max Length"),_T("maxlength"),0)
}
		preview->SetNormalColour(cc);
	}
	cc = m_HoverColour.GetColour();
	if ( cc.IsOk() )
	{
		preview->SetHoverColour(cc);
	}
	cc = m_VisitedColour.GetColour();
	if ( cc.IsOk() )
	{
		preview->SetVisitedColour(cc);
	}

    return SetupWindow(preview,flags);
}

/*! \brief Enumerate the control's properties.
 *
 * \param flags long	The control flags.
 * \return void
 *
 */
void wxsHyperlinkCtrl::OnEnumWidgetProperties(long flags)
{
    WXS_STRING(wxsHyperlinkCtrl,m_Label,_("Label"),_T("label"),_T(""),false)
    WXS_SHORT_STRING(wxsHyperlinkCtrl,m_URL,_("URL"),_T("url"),_T(""),false)
    WXS_COLOUR(wxsHyperlinkCtrl, m_NormalColour,_T("Normal"),_T("normal_colour"))
    WXS_COLOUR(wxsHyperlinkCtrl, m_HoverColour,_T("Hover"),_T("hover_colour"))
    WXS_COLOUR(wxsHyperlinkCtrl, m_VisitedColour,_T("Visited"),_T("visited_colour"))
}
Example #9
0
        {
            AddHeader(_T("<wx/stattext.h>"),GetInfo().ClassName,hfInPCH);
            #if wxCHECK_VERSION(2, 9, 0)
            Codef(_T("%C(%W, %I, %t, %P, %S, %T, %N);\n"),Label.wx_str());
            #else
            Codef(_T("%C(%W, %I, %t, %P, %S, %T, %N);\n"),Label.c_str());
            #endif
            BuildSetupWindowCode();
            return;
        }

        default:
        {
            wxsCodeMarks::Unknown(_T("wxsStaticText::OnBuildCreatingCode"),GetLanguage());
        }
    }
}


wxObject* wxsStaticText::OnBuildPreview(wxWindow* Parent,long Flags)
{
    wxStaticText* Preview = new wxStaticText(Parent,GetId(),Label,Pos(Parent),Size(Parent),Style());
    return SetupWindow(Preview,Flags);
}


void wxsStaticText::OnEnumWidgetProperties(long Flags)
{
    WXS_STRING(wxsStaticText,Label,_("Label"),_T("label"),_T(""),true)
}
Example #10
0
        rchtxtAttr.SetFontUnderlined(fnt.GetUnderlined());
        rchtxtAttr.SetFontWeight(fnt.GetWeight());
    }

    if(m_iAlignment != wxTEXT_ALIGNMENT_LEFT || m_iAttribute != 0 || m_iBullets != wxTEXT_ATTR_BULLET_STYLE_NONE ||
            m_iSpacing != wxTEXT_ATTR_LINE_SPACING_NORMAL || m_iEffects != wxTEXT_ATTR_EFFECT_NONE || bClrChanged || fnt.IsOk()){
        Preview->SetBasicStyle(rchtxtAttr);
    }

    return SetupWindow(Preview, Flags);
}

/*! \brief Enumerate the control's properties.
 *
 * \param flags long    The control flags.
 * \return void
 *
 */
void wxsRichTextCtrl::OnEnumWidgetProperties(long Flags)
{
    WXS_STRING(wxsRichTextCtrl, m_sText, _("Text"), _T("value"), wxEmptyString, false)
    WXS_FLAGS(wxsRichTextCtrl, m_iAttribute, _("Attributes"), _T("attributes"), arrAttributeStates, arrAttributeNames, 0)
    WXS_FLAGS(wxsRichTextCtrl, m_iBullets, _("Bullet Style"), _T("bullet_style"), arrBulletStates, arrBulletNames, wxTEXT_ATTR_BULLET_STYLE_NONE)
    WXS_ENUM(wxsRichTextCtrl, m_iSpacing, _("Line Spacing"), _T("line_spacing"), arrSpacingStates, arrSpacingNames, wxTEXT_ATTR_LINE_SPACING_NORMAL)
    WXS_ENUM(wxsRichTextCtrl, m_iAlignment, _("Paragraph Alignment"), _T("paragraph_alignment"), arrAlignmentStates, arrAlignmentNames, wxTEXT_ALIGNMENT_LEFT)
    WXS_FLAGS(wxsRichTextCtrl, m_iEffects, _("Text Effects"), _T("text_effects"), arrEffectStates, arrEffectNames, wxTEXT_ATTR_EFFECT_NONE)
    WXS_COLOUR(wxsRichTextCtrl, m_cdTextColour, _("Text Colour"), wxT("text_colour"))
    WXS_COLOUR(wxsRichTextCtrl, m_cdTextBackground, _("Text Background Colour"), wxT("text_background_colour"))
    WXS_FONT(wxsRichTextCtrl, m_fdFont, _("Font"), _T("font"))
}