gdl-dock-item-grip.c revision d19de0ff8b0793e74e98429ded50868ce7e9f75c
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
/*
*
* Author: Michael Meeks Copyright (C) 2002 Sun Microsystems, Inc.
*
* Based on BonoboDockItemGrip. Original copyright notice follows.
*
* Copyright (C) 1998 Ettore Perazzoli
* Copyright (C) 1998 Elliot Lee
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
* All rights reserved.
*
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "gdl-i18n.h"
#include <string.h>
#include <glib-object.h>
#include "gdl-dock-item.h"
#include "gdl-dock-item-grip.h"
#include "gdl-dock-item-button-image.h"
#include "gdl-switcher.h"
#define ALIGN_BORDER 5
#define DRAG_HANDLE_SIZE 10
enum {
};
struct _GdlDockItemGripPrivate {
};
{
if(stock_id) {
}
else if (pixbuf) {
}
if (title) {
} else {
}
}
return GTK_WIDGET(label_box);
}
static gint
{
handle_area.x = allocation.x;
handle_area.y = allocation.y;
} else {
handle_area.y = allocation.y;
}
}
}
}
static void
{
(void)master;
} else {
}
}
} else {
}
}
}
}
static void
{
}
grip);
}
}
static void
{
switch (prop_id) {
case PROP_ITEM:
grip);
grip);
grip);
}
break;
default:
break;
}
}
static void
{
(void)widget;
}
#endif // Gtk+ >= 2.22
static void
{
gint x = 0, y = 0;
}
static void
{
(void)widget;
/* Workaround to unhighlight the iconify button. */
if (GDL_IS_SWITCHER (parent))
{
/* Note: We can not use gtk_container_foreach (parent) here because
* during iconificatoin, the internal children changes in parent.
* Instead we keep a list of items to iconify and iconify them
* one by one.
*/
{
if (!GDL_DOCK_ITEM_CANT_ICONIFY (item))
}
g_list_free (items);
}
else
{
}
}
static void
{
/* create the close button */
/* create the iconify button */
/* set tooltips on the buttons */
_("Iconify this dock"));
_("Close this dock"));
}
static void
{
if (!grip->title_window) {
attributes.x = allocation.x;
attributes.y = allocation.y;
/* Unref the ref from parent realize for NO_WINDOW */
/* Need to ref widget->window, because parent unrealize unrefs it */
/* Unset the background so as to make the colour match the parent window */
else
if (cursor)
}
}
static void
{
if (grip->title_window) {
}
}
static void
{
if (grip->title_window)
}
static void
{
if (grip->title_window)
}
static void
{
gint layout_height = 0;
}
}
}
static void
{
GtkRequisition close_requisition = { 0, };
GtkRequisition iconify_requisition = { 0, };
/* Calculate the Minimum Width where buttons will fit */
+ border_width * 2;
/* Set up the rolling child_allocation rectangle */
else
/* Layout Close Button */
if(space_for_buttons) {
} else {
child_allocation.width = 0;
}
}
/* Layout Iconify Button */
if(space_for_buttons) {
} else {
child_allocation.width = 0;
}
}
/* Layout the Grip Handle*/
}
} else {
}
if(child_allocation.width < 0)
child_allocation.width = 0;
}
if (grip->title_window) {
allocation->x,
allocation->y,
allocation->height);
}
}
static void
{
(void)container;
(void)widget;
g_warning ("gtk_container_add not implemented for GdlDockItemGrip");
}
static void
{
(void)widget;
}
static void
{
}
if (include_internals) {
}
}
}
static GType
{
(void)container;
return G_TYPE_NONE;
}
static void
{
_("Dockitem which 'owns' this grip"),
}
static void
{
}
/* ----- Public interface ----- */
/**
* gdl_dock_item_grip_new:
* @item: The dock item that will "own" this grip widget.
*
* Creates a new GDL dock item grip object.
* Returns: The newly created dock item grip widget.
**/
{
NULL);
return GTK_WIDGET (grip);
}
/**
* gdl_dock_item_grip_set_label:
* @grip: The grip that will get it's label widget set.
* @label: The widget that will become the label.
*
* Replaces the current label widget with another widget.
**/
void
{
}
if (label) {
}
}
/**
* gdl_dock_item_grip_hide_handle:
* @item: The dock item grip to hide the handle of.
*
* This function hides the dock item's grip widget handle hatching.
**/
void
{
};
}
/**
* gdl_dock_item_grip_show_handle:
* @grip: The dock item grip to show the handle of.
*
* This function shows the dock item's grip widget handle hatching.
**/
void
{
};
}