dialog.h revision 36fe57c03027fcd94aad7d16f751c7d1647dd4a1
/** @file
* @brief Base class for dialogs in Inkscape
*/
/* Authors:
* Bryce W. Harrington <bryce@bryceharrington.org>
* Gustav Broberg <broberg@kth.se>
* Kris De Gussem <Kris.DeGussem@gmail.com>
*
* Copyright (C) 2004--2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_DIALOG_H
#define INKSCAPE_DIALOG_H
#include "dock-behavior.h"
#include "floating-behavior.h"
}
/**
* Base class for Inkscape dialogs.
*
* UI::Dialog::Dialog is a base class for all dialogs in Inkscape. The
* purpose of this class is to provide a unified place for ensuring
* style and behavior. Specifically, this class provides functionality
* for saving and restoring the size and position of dialogs (through
* the user's preferences file).
*
* It also provides some general purpose signal handlers for things like
* showing and hiding all dialogs.
*
* Fundamental parts of the dialog's behavior are controlled by
* a UI::Dialog::Behavior subclass instance connected to the dialog.
*
* @see UI::Widget::Panel panel class from which the dialogs are actually derived from.
* @see UI::Dialog::DialogManager manages the dialogs within inkscape.
* @see UI::Dialog::PanelDialog which links Panel and Dialog together in a dockable and floatable dialog.
*/
/**
* Constructor.
*
* @param behavior_factory floating or docked.
* @param verb_num the dialog verb.
*/
virtual void onShutdown();
/* Hide and show dialogs */
virtual void show_all_children();
virtual void set_size_request(int, int);
virtual void get_position(int &x, int &y);
bool _user_hidden; // when it is closed by the user, to prevent repopping on f12
bool _hiddenF12;
/**
* Read window position from preferences.
*/
void read_geometry();
/**
* Save window position to preferences.
*/
void save_geometry();
bool retransientize_suppress; // when true, do not retransientize (prevents races when switching new windows too fast)
int _verb_num;
bool _is_active_desktop;
/* Closes the dialog window.
*
* This code sends a delete_event to the dialog,
* instead of just destroying it, so that the
* dialog can do some housekeeping, such as remember
* its position.
*/
Dialog(); // no constructor without params
};
} // namespace Dialog
} // namespace UI
} // namespace Inkscape
#endif //INKSCAPE_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 :