示例#1
0
static void ShowProperties(HWND parent, Doc doc, DisplayModel *dm, bool extended=false)
{
    PropertiesLayout *layoutData = FindPropertyWindowByParent(parent);
    if (layoutData) {
        SetActiveWindow(layoutData->hwnd);
        return;
    }

    if (!doc.IsEngine() && !doc.IsEbook())
        return;
    layoutData = new PropertiesLayout();
    gPropertiesWindows.Append(layoutData);
    GetProps(doc, layoutData, dm, extended);

    if (!CreatePropertiesWindow(parent, layoutData))
        delete layoutData;
}
示例#2
0
static void ShowProperties(HWND parent, Controller *ctrl, bool extended=false)
{
    PropertiesLayout *layoutData = FindPropertyWindowByParent(parent);
    if (layoutData) {
        SetActiveWindow(layoutData->hwnd);
        return;
    }

    if (!ctrl)
        return;
    layoutData = new PropertiesLayout();
    gPropertiesWindows.Append(layoutData);
    GetProps(ctrl, layoutData, extended);

    if (!CreatePropertiesWindow(parent, layoutData))
        delete layoutData;
}
示例#3
0
void DeletePropertiesWindow(HWND hwndParent)
{
    PropertiesLayout *pl = FindPropertyWindowByParent(hwndParent);
    if (pl)
        DestroyWindow(pl->hwnd);
}