Ejemplo n.º 1
0
void wxsBitmapComboBox::OnEnumWidgetProperties(long Flags) {
static wxString         sImageNames[128];
static const wxChar    *pImageNames[128];

int                     i,n;
wxString                ss, tt;
wxArrayString           aa;

// find available image lists and store them in our local static arrays

    FindAllImageLists(aa);
    n = aa.GetCount();
    if (n > 127) n = 127;

    for(i=0; i<n; i++) {
        ss = aa.Item(i);
        sImageNames[i] = ss;
        pImageNames[i] = (const wxChar *) sImageNames[i];
    };
    pImageNames[n] = NULL;

    WXS_EDITENUM(wxsBitmapComboBox, mImageList, _("Image List"), _("mImageList"), pImageNames, _("<none>"))

// the list of items to appear in the combo box

    UpdateComboItemList();

    WXS_IMAGECOMBO(wxsBitmapComboBox, mItems, _("Combo Items"), _("mItems"));
    WXS_ARRAYSTRING(wxsBitmapComboBox, mItems, _("Items as Text"), _("mItemsText"), _("item2"));
}
Ejemplo n.º 2
0
/*! \brief Enumerate the control's properties.
 *
 * \param flags long    The control flags.
 * \return void
 *
 */
void wxsTreeCtrl::OnEnumWidgetProperties(cb_unused long Flags)
{
    static wxString     sImageNames[128];
    static const wxChar *pImageNames[128];

    int                 i, n;
    wxString            ss, tt;
    wxArrayString       aa;

    // find available image lists and store them in our local static arrays
    FindAllImageLists(aa);
    n = aa.GetCount();
    if(n > 127)
    {
        n = 127;
    }

    for(i = 0; i < n; i++)
    {
        ss = aa.Item(i);
        sImageNames[i] = ss;
        pImageNames[i] = (const wxChar *) sImageNames[i];
    }
    pImageNames[n] = NULL;

    WXS_EDITENUM(wxsTreeCtrl, m_sImageList, _("Image List"), _T("image_list"), pImageNames, _("<none>"))

    // The list of items to appear in the tree.
    UpdateTreeItemList();

    WXS_IMAGETREE(wxsTreeCtrl, m_arrItems, _("Tree Items"), wxT("tree_items"));
    WXS_ARRAYSTRING(wxsTreeCtrl, m_arrItems, _("Items as Text"), wxT("items_text"), _("item2"));
    WXS_BOOL(wxsTreeCtrl, m_bExpand, _("Expand All"), _("expand_all"), false);
}
Ejemplo n.º 3
0
void wxsImagePanel::OnEnumContainerProperties(cb_unused long Flags) {
static wxString         sImageNames[128];
static const wxChar    *pImageNames[128];

int                     i,n,k;
wxsItemResData         *res;
wxsTool                *tool;
wxString                ss, tt;


// find available images, and pointer to current imagelist

    res = GetResourceData();
    n = 0;
    sImageNames[n] = _("<none>");
    pImageNames[n] = (const wxChar *) sImageNames[n];
    n += 1;
    k = res->GetToolsCount();
    for(i=0; i<k; i++) {
        tool = res->GetTool(i);
        ss = tool->GetUserClass();

        if ((ss == _T("wxImage")) && (n < 127)) {
            ss = tool->GetVarName();
            sImageNames[n] = ss;
            pImageNames[n] = (const wxChar *) sImageNames[n];
            n += 1;
        };
    };
    pImageNames[n] = NULL;

    WXS_EDITENUM(wxsImagePanel, mImage, _("Image"), _T("image"), pImageNames, _("<none>"))

// stretch to fit panel?

    WXS_BOOL(wxsImagePanel, mStretch, _("Stretch"), _T("stretch"), false);
};