dock.cpp revision 21540d59a919b4404c3f298470257f8b33310351
/**
* @file
* A desktop dock pane to dock dialogs.
*/
/* Author:
* Gustav Broberg <broberg@kth.se>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#include "inkscape.h"
#include "preferences.h"
#include "desktop.h"
#include "dock.h"
#include <gtkmm/adjustment.h>
namespace Inkscape {
namespace UI {
namespace Widget {
namespace {
{
}
{
}
}
const int Dock::_default_empty_width = 0;
{
switch (orientation) {
case Gtk::ORIENTATION_VERTICAL:
break;
case Gtk::ORIENTATION_HORIZONTAL:
}
GDL_SWITCHER_STYLE_BOTH, 0, 4));
"switcher-style", gdl_switcher_style,
NULL);
GDL_DOCK_BAR_BOTH, 0, 3));
g_signal_connect(_paned->gobj(), "button-press-event", G_CALLBACK(_on_paned_button_event), (void *)this);
g_signal_connect(_paned->gobj(), "button-release-event", G_CALLBACK(_on_paned_button_event), (void *)this);
signal_layout_changed().connect(sigc::mem_fun(*this, &Inkscape::UI::Widget::Dock::_onLayoutChanged));
}
{
}
{
// FIXME: This is a hack to prevent the dock from expanding the main window, this can't be done
// initially as the paned doesn't exist.
}
}
{
return *_scrolled_window;
}
{
}
{
return _paned;
}
{
return GTK_WIDGET(_gdl_dock);
}
{
i = _dock_items.begin(),
e = _dock_items.end();
for (; i != e; ++i) {
return false;
}
}
return true;
}
bool Dock::hasIconifiedItems() const
{
i = _dock_items.begin(),
e = _dock_items.end();
for (; i != e; ++i) {
if ((*i)->isIconified()) {
return true;
}
}
return false;
}
{
}
{
}
{
static int prev_horizontal_position, prev_vertical_position;
} else {
}
}
{
if (item_y < 0)
}
{
}
void Dock::_onLayoutChanged()
{
if (isEmpty()) {
if (hasIconifiedItems()) {
} else {
}
} else {
// unset any forced size requests
}
}
void
{
/* unset size request when starting a drag */
}
{
return FALSE;
}
const Glib::SignalProxyInfo
{
"layout-changed",
};
} // 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 :