dock-item.cpp revision e6ab333964dd7ef6941edd00f4a43bb5b1bdb2ff
/**
* \brief A custom Inkscape 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.
*/
#include "dock-item.h"
#include "desktop.h"
#include "inkscape.h"
#include "prefs-utils.h"
#include <gtkmm/invisible.h>
namespace Inkscape {
namespace UI {
namespace Widget {
_prev_state (state),
{
/* Add a "signal_response" signal to the GdlDockItem, make sure it is
* only done once for the class.
*/
static guint response_signal = 0;
if (response_signal == 0) {
0,
}
if (icon) {
// check icon type (inkscape, gtk, none)
}
delete icon;
}
} else {
}
signal_state_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onStateChanged));
signal_delete_event().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onDeleteEvent));
show_all();
}
{
}
{
}
{
return _gdl_dock_item;
}
{
return &_dock_item_box;
}
bool
DockItem::isAttached() const
{
return GDL_DOCK_OBJECT_ATTACHED (_gdl_dock_item);
}
bool
DockItem::isFloating() const
{
"floating", &floating,
NULL);
}
return floating;
}
bool
DockItem::isIconified() const
{
return GDL_DOCK_ITEM_ICONIFIED (_gdl_dock_item);
}
{
}
DockItem::getPrevState() const
{
return _prev_state;
}
DockItem::getPlacement() const
{
gdl_dock_object_child_placement(gdl_dock_object_get_parent_object (GDL_DOCK_OBJECT(_gdl_dock_item)),
&placement);
}
void
{
// Create a button box for the response buttons if it's the first button to be added
if (!_dock_item_action_area) {
}
}
void
{
}
void
{
}
void
{
}
void
{
// iconified
if (isIconified()) {
show();
return;
}
// unattached
if (!isAttached()) {
return;
}
// tabbed
if (getPlacement() == CENTER) {
if (i >= 0)
return;
}
// we're already present, do nothing
}
void
DockItem::get_position(int& x, int& y)
{
if (getWindow()) {
getWindow()->get_position(x, y);
} else {
x = _x;
y = _y;
}
}
void
{
if (_window) {
} else {
}
}
void
{
if (_window)
}
void
{
if (_window)
}
void
{
if (_window)
}
void
{
}
void
{
}
void
{
NULL);
}
/* Signal wrappers */
{
}
{
}
{
}
Glib::SignalProxy1<void, int>
{
}
{
}
Glib::SignalProxy1<void, bool>
{
}
{
return _signal_state_changed;
}
void
{
if (_window)
}
void
{
}
void
{
}
void
{
_prev_state = getState();
if (_prev_state == FLOATING_STATE)
}
void
DockItem::_onDragEnd(bool)
{
if (state != _prev_state)
if (state == FLOATING_STATE) {
if (_prev_state == FLOATING_STATE)
}
_prev_state = state;
}
bool
{
return return_value;
}
void
{
if (new_state == FLOATING_STATE) {
_window->signal_hide().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onHideWindow));
_window->signal_key_press_event().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::DockItem::_onKeyPress));
}
}
bool
{
hide();
return false;
}
{
}
const Glib::SignalProxyInfo
{
"show",
};
const Glib::SignalProxyInfo
{
"hide",
};
const Glib::SignalProxyInfo
{
"delete_event",
};
const Glib::SignalProxyInfo
{
"signal_response",
};
const Glib::SignalProxyInfo
{
"dock-drag-begin",
};
const Glib::SignalProxyInfo
{
"dock_drag_end",
};
{
using namespace Gtk;
try {
} catch(...) {
}
}
return RType();
}
void
{
using namespace Gtk;
try {
} catch(...) {
}
}
}
void
{
using namespace Gtk;
try {
} catch(...) {
}
}
}
} // namespace Widget
} // namespace UI
} // namespace Inkscape
/*
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 :