gdl-switcher.c revision d19de0ff8b0793e74e98429ded50868ce7e9f75c
4598f03f732c48a5d53546b9ee7c952df32576d5Reid Burke/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
aac87d471e46faaa4093fa5291f7d3fc2f6c3c7cMatt Sweeney * Copyright (C) 2003 Ettore Perazzoli,
#ifdef HAVE_CONFIG_H
#include <config.h>
#include "gdl-i18n.h"
#include "gdl-switcher.h"
#include "libgdlmarshal.h"
#include "libgdltypebuiltins.h"
int id;
} Button;
struct _GdlSwitcherPrivate {
static Button *
button);
button);
return button;
button);
button);
static gint
if (switcher_id <= 0) {
return switcher_id;
GSList *p;
int id = 0;
GSList *p;
if (is_active)
int btns_per_row;
int row_number;
int optimal_layout_width = 0;
int row_last;
int rows_count;
int last_buttons_height;
GTK_WIDGET_CLASS (gdl_switcher_parent_class)->size_request (GTK_WIDGET (switcher), &client_requisition);
if (num_btns == 0)
&requisition);
if (!icons_only) {
btns_per_row--;
rows_count++;
row_number = 0;
row_number ++;
if (row_last > 0)
if (last_buttons_height >= 0) {
for (i = row_last; i >= 0; i --) {
y -= max_btn_height;
extra_width = 0;
child_allocation.x = x;
child_allocation.y = y;
y -= V_PADDING;
for (i = 0; i <= row_last; i ++)
GTK_WIDGET_CLASS (gdl_switcher_parent_class)->size_allocate (GTK_WIDGET (switcher), &child_allocation);
GSList *p;
if (include_internals) {
GSList *p;
button_free (b);
GSList *p;
static gint
GSList *p;
GSList *p;
switch (prop_id) {
case PROP_SWITCHER_STYLE:
switch (prop_id) {
case PROP_SWITCHER_STYLE:
#if HAVE_GNOME
(void)nb;
(void)page_num;
(void)nb;
(void)page_num;
while (node)
switcher);
switcher);
gdl_switcher_new (void)
switcher);
if (stock_id) {
} else if (pixbuf_icon) {
if (!label) {
tooltips);
case GDL_SWITCHER_STYLE_TEXT:
case GDL_SWITCHER_STYLE_ICON:
case GDL_SWITCHER_STYLE_BOTH:
GSList *p;
switcher);
if (!tab_widget) {
switcher);
return ret_position;
GSList *p;
switch (switcher_style) {
case GDL_SWITCHER_STYLE_TEXT:
case GDL_SWITCHER_STYLE_ICON:
case GDL_SWITCHER_STYLE_BOTH:
GSList *p;
if (show)
static GdlSwitcherStyle
return GDL_SWITCHER_STYLE_TABS;