dock-item.h revision 073fa4ce4f7402aa0ce7e02dea7c3da7a1cacc27
/**
* \brief A custom wrapper around gdl-dock-item
*
* Author:
* Gustav Broberg <broberg@kth.se>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_UI_WIGET_DOCK_ITEM_H
#define INKSCAPE_UI_WIGET_DOCK_ITEM_H
#include <gtkmm/buttonbox.h>
FLOATING_STATE, // item not in its dock (but can be docked in other,
// e.g. floating, docks)
DOCKED_STATE }; // item in its assigned dock
enum Placement {
TOP = GDL_DOCK_TOP,
};
~DockItem();
void get_position(int& x, int& y);
void move(int x, int y);
bool isAttached() const;
bool isFloating() const;
bool isIconified() const;
State getPrevState() const;
Placement getPlacement() const;
Gtk::Window *getWindow(); //< gives the parent window, if the dock item has one (i.e. it's floating)
void hide();
void show();
void show_all();
void present();
void grab_focus();
int _prev_position;
bool _grab_focus_on_realize; //< if the dock item should grab focus on the next realize
/** Interface widgets, will be packed like
* gdl_dock_item -> _frame -> _dock_item_box -> (_dock_item_action_area)
*/
/** Internal signal handlers */
void _onHide();
void _onHideWindow();
void _onShow();
void _onResponse(int response_id);
void _onDragBegin();
void _onDragEnd(bool cancelled);
void _onRealize();
/** GdlDockItem signal proxy structures */
/** In order to emulate a signal_response signal like the one for Gtk::Dialog we inject a new
* signal into GdlDockItem. This signal will be emitted when a button in the dock item added
* through the addButton(..., response_id) method, is clicked.
*/
DockItem();
};
} // namespace Widget
} // namespace UI
} // namespace Inkscape
#endif // INKSCAPE_UI_WIGET_DOCK_ITEM_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:encoding=utf-8:textwidth=99 :