/** @file
* @brief A panel holding dialog
*/
/* Authors:
* C 2007 Gustav Broberg <broberg@kth.se>
* C 2012 Kris De Gussem <Kris.DeGussem@gmail.com>
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_PANEL_DIALOG_H
#define INKSCAPE_PANEL_DIALOG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include "verbs.h"
#include "dialog.h"
#include "ui/dialog/swatches.h"
#include "ui/dialog/floating-behavior.h"
#include "ui/dialog/dock-behavior.h"
#include "preferences.h"
#include "inkscape.h"
#include "desktop.h"
/**
* Auxiliary class for the link between UI::Dialog::PanelDialog and UI::Dialog::Dialog.
*
* PanelDialog handles signals emitted when a desktop changes, either changing to a
* different desktop or a new document.
*/
virtual ~PanelDialogBase() {}
};
/**
* Bridges UI::Widget::Panel and UI::Dialog::Dialog.
*
* Where Dialog handles window behaviour, such as closing, position, etc, and where
* Panel is the actual container for dialog child widgets (and from where the dialog
* content is made), PanelDialog links these two classes together to create a
* dockable and floatable dialog. The link with Dialog is made via PanelDialogBase.
*/
/**
* Constructor.
*
* @param contents panel with the actual dialog content.
* @param verb_num the dialog verb.
*/
virtual ~PanelDialog() {}
inline void _presentDialog();
PanelDialog();
};
template <>
virtual ~PanelDialog() {}
PanelDialog();
};
{
}
{
desktop->connectDocumentReplaced(sigc::mem_fun(*this, &PanelDialogBase::_propagateDocumentReplaced));
}
{
}
{
// TODO: make the order of buttons obey the global preference
if (!apply_label.empty()) {
}
}
}
{
}
{
}
{
}
PanelDialog<Behavior::FloatingBehavior>::PanelDialog(UI::Widget::Panel &panel, char const *prefs_path,
{
// TODO: make the order of buttons obey the global preference
if (!apply_label.empty()) {
}
}
}
{
}
/**
* Specialized factory method for panel dialogs with floating behavior in order to make them work as
* singletons, i.e. allow them track the current active desktop.
*/
{
);
);
return instance;
}
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
#endif //INKSCAPE_PANEL_DIALOG_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :