Beispiel #1
0
CDataLoader* CSRA_DataLoaderCF::CreateAndRegister(
    CObjectManager& om,
    const TPluginManagerParamTree* params) const
{
    if ( !ValidParams(params) ) {
        // Use constructor without arguments
        return CSRADataLoader::RegisterInObjectManager(om).GetLoader();
    }
    // IsDefault and Priority arguments may be specified
    return CSRADataLoader::RegisterInObjectManager(
        om,
        GetIsDefault(params),
        GetPriority(params)).GetLoader();
}
wxString ButcherProjectAreaConfigBase::GetFlagsDescription()
{
    wxString ret(wxEmptyString), tmp;
	if (area_->GetAreaClass() == ButcherProjectArea::AC_GLOBAL)
        ret+=wxT("<G>");
    switch (GetAreaKind())
    {
    case AK_NONE:
        ret+=wxT("N");
        break;
    case AK_IMAGE:
        ret+=wxT("I");
        break;
    case AK_MASK:
        ret+=wxT("M");
        break;
    default:
        ret+=wxT("?");
        break;
    }
    if (!GetIsDefault()) ret+=wxT("C");
    if (GetBackground()) ret+=wxT("B");
    if (GetIsBGColor()) ret+=wxT("L");
    if (GetImageSource()==IS_LINK) ret+=wxT("K");
    if (GetAlternateFile()>-1) ret+=wxT("A");
    if (GetInnerScrollable()) ret+=wxT("S");
    if (GetVariableSize()) ret+=wxT("Z");
    if (GetHaveMap()) ret+=wxT("P");
    if (ImageInfo().TransparentColors().size()>0) ret+=wxT("T");
    switch (GetAlign())
    {
    case AA_LEFT: ret+=wxT("@L"); break;
    case AA_CENTER: ret+=wxT("@C"); break;
    case AA_RIGHT: ret+=wxT("@R"); break;
    default: break;
    }
    switch (GetVAlign())
    {
    case AV_NONE: ret+=wxT("$N"); break;
    case AV_MIDDLE: ret+=wxT("$M"); break;
    case AV_BOTTOM: ret+=wxT("$B"); break;
    default: break;
    }
    switch (GetBGRepeat())
    {
    case BR_NONE: ret+=wxT("*N"); break;
    case BR_HORIZONTAL: ret+=wxT("*H"); break;
    case BR_VERTICAL: ret+=wxT("*V"); break;
    default: break;
    }
    tmp=wxEmptyString;
    for (int i=0; i<BUTCHERCONST_VIEW_MAXALTERNATE; i++)
    {
        if (altimageinfo_[i]->GetEnabled())
            tmp+=wxString::Format(wxT("%d"), i+1);
    }
    if (!tmp.IsEmpty())
    {
        ret+=wxT("+");
        ret+=tmp;
    }
    return ret;
}