/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* This file is part of the GNOME Devtools Libraries.
*
* Copyright (C) 2003 Jeroen Zwartepoorte <jeroen@xs4all.nl>
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <stdlib.h>
#include <string.h>
#include "gdl-dock.h"
#include "gdl-dock-master.h"
#include "gdl-dock-bar.h"
#include "libgdltypebuiltins.h"
enum {
};
/* ----- Private prototypes ----- */
GParamSpec *pspec);
GParamSpec *pspec);
GdlDockItem *item);
/* ----- Class variables and definitions ----- */
struct _GdlDockBarPrivate {
};
/* ----- Private functions ----- */
void
{
_("GdlDockMaster object which the dockbar widget "
"is attached to"),
_("Dockbar style to show items on it"),
}
static void
{
}
static void
{
switch (prop_id) {
case PROP_MASTER:
break;
case PROP_DOCKBAR_STYLE:
break;
default:
};
}
static void
{
switch (prop_id) {
case PROP_MASTER:
break;
case PROP_DOCKBAR_STYLE:
break;
default:
};
}
static void
{
dock_bar);
}
static void
{
object);
}
}
}
}
static void
{
g_warning ("Item has not been added to the dockbar");
return;
}
dockbar);
}
static void
{
}
static void
{
g_warning ("Item has already been added to the dockbar");
return;
}
/* Create a button for the item. */
button = gtk_button_new ();
else
}
/* FIXME: For now AUTO behaves same as BOTH */
if (stock_id) {
} else if (pixbuf_icon) {
} else {
}
}
/* Set up destroy notify */
dockbar);
}
static void
{
/* add only items, not toplevels */
if (GDL_IS_DOCK_ITEM (object))
}
static void
{
return;
/* build items list */
if (!full_update) {
}
} else {
if (GDL_DOCK_ITEM_ICONIFIED (item))
}
}
g_list_free (items);
}
static void
{
}
static void
{
}
dockbar);
}
}
{
/* default to vertical for unknown values */
break;
case GTK_ORIENTATION_VERTICAL:
default:
break;
}
}
{
/* default to vertical for unknown values */
break;
case GTK_ORIENTATION_VERTICAL:
default:
break;
}
}
{
requisition->width = 0;
requisition->height = 0;
nvis_children = 0;
{
{
&expand,
&fill,
&padding,
&pack_type);
if (gtk_box_get_homogeneous (box))
{
}
else
{
}
nvis_children += 1;
}
}
if (nvis_children > 0)
{
if (gtk_box_get_homogeneous (box))
}
}
{
gint y;
nvis_children = 0;
nexpand_children = 0;
{
&expand,
&fill,
&padding,
&pack_type);
{
nvis_children += 1;
if (expand)
nexpand_children += 1;
}
}
if (nvis_children > 0)
{
if (gtk_box_get_homogeneous (box))
{
border_width * 2 -
}
else if (nexpand_children > 0)
{
}
else
{
height = 0;
extra = 0;
}
y = allocation->y + border_width;
{
&expand,
&fill,
&padding,
&pack_type);
{
if (gtk_box_get_homogeneous (box))
{
if (nvis_children == 1)
else
nvis_children -= 1;
}
else
{
if (expand)
{
if (nexpand_children == 1)
child_height += height;
else
child_height += extra;
nexpand_children -= 1;
}
}
if (fill)
{
child_allocation.y = y + padding;
}
else
{
}
}
}
{
&expand,
&fill,
&padding,
&pack_type);
{
if (gtk_box_get_homogeneous (box))
{
if (nvis_children == 1)
else
nvis_children -= 1;
}
else
{
if (expand)
{
if (nexpand_children == 1)
child_height += height;
else
child_height += extra;
nexpand_children -= 1;
}
}
if (fill)
{
}
else
{
}
}
}
}
}
{
requisition->width = 0;
requisition->height = 0;
nvis_children = 0;
{
&expand,
&fill,
&padding,
&pack_type);
{
if (gtk_box_get_homogeneous (box))
{
}
else
{
}
nvis_children += 1;
}
}
if (nvis_children > 0)
{
if (gtk_box_get_homogeneous (box))
}
}
{
gint x;
nvis_children = 0;
nexpand_children = 0;
{
&expand,
&fill,
&padding,
&pack_type);
{
nvis_children += 1;
if (expand)
nexpand_children += 1;
}
}
if (nvis_children > 0)
{
if (gtk_box_get_homogeneous (box))
{
border_width * 2 -
}
else if (nexpand_children > 0)
{
}
else
{
width = 0;
extra = 0;
}
x = allocation->x + border_width;
{
&expand,
&fill,
&padding,
&pack_type);
{
if (gtk_box_get_homogeneous (box))
{
if (nvis_children == 1)
child_width = width;
else
child_width = extra;
nvis_children -= 1;
}
else
{
if (expand)
{
if (nexpand_children == 1)
child_width += width;
else
child_width += extra;
nexpand_children -= 1;
}
}
if (fill)
{
child_allocation.x = x + padding;
}
else
{
}
if (direction == GTK_TEXT_DIR_RTL)
child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
}
}
{
&expand,
&fill,
&padding,
&pack_type);
{
if (gtk_box_get_homogeneous (box))
{
if (nvis_children == 1)
child_width = width;
else
child_width = extra;
nvis_children -= 1;
}
else
{
if (expand)
{
if (nexpand_children == 1)
child_width += width;
else
child_width += extra;
nexpand_children -= 1;
}
}
if (fill)
{
}
else
{
}
if (direction == GTK_TEXT_DIR_RTL)
child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
}
}
}
}
{
/* get the master of the given dock */
if (dock)
return g_object_new (GDL_TYPE_DOCK_BAR,
}
{
}
{
}
{
}
{
return style;
}