dock-item.cpp revision d32069a97446378779c1bad23f8ec9a1f4f98f0a
/*
* Author:
* Gustav Broberg <broberg@kth.se>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#include <gtkmm.h>
#include "dock-item.h"
#include "desktop.h"
#include "inkscape.h"
#include "preferences.h"
namespace Inkscape {
namespace UI {
namespace Widget {
_prev_position(0),
_window(0),
_x(0),
_y(0),
_grab_focus_on_realize(false),
_gdl_dock_item(0),
{
// Icon might be in the icon theme, or might be a stock item. Check the proper source:
int width = 0;
int height = 0;
} else {
}
}
}
if ( _icon_pixbuf ) {
} 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;
}
void
DockItem::get_position(int& x, int& y)
{
if (getWindow()) {
getWindow()->get_position(x, y);
} else {
x = _x;
y = _y;
}
}
void
{
if (getWindow()) {
} else {
}
}
void
{
if (_window)
}
void
{
if (_window)
}
void
{
if (_window)
}
void
{
}
void
{
}
void
{
NULL);
}
bool
DockItem::isAttached() const
{
return GDL_DOCK_OBJECT_ATTACHED (_gdl_dock_item);
}
bool
DockItem::isFloating() const
{
_dock.getGdlWidget());
}
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
{
}
void
{
}
void
{
}
void
{
if (isIconified() || !isAttached()) {
show();
}
// tabbed
else if (getPlacement() == CENTER) {
if (i >= 0)
}
// always grab focus, even if we're already present
grab_focus();
_dock.scrollToItem(*this);
}
void
{
if (gtk_widget_get_realized (_gdl_dock_item)) {
// make sure the window we're in is present
}
} else {
_grab_focus_on_realize = true;
}
}
/* Signal wrappers */
{
}
{
}
{
}
{
}
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;
}
void
{
if (_grab_focus_on_realize) {
_grab_focus_on_realize = false;
grab_focus();
}
}
bool
{
return return_value;
}
void
{
_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
{
"dock-drag-begin",
};
const Glib::SignalProxyInfo
{
"dock_drag_end",
};
const Glib::SignalProxyInfo
{
"realize",
};
{
using namespace Gtk;
try {
} catch(...) {
}
}
return RType();
}
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:fileencoding=utf-8:textwidth=99 :