Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

152 rader
4.8 KiB

  1. /* GTK - The GIMP Toolkit
  2. * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. /*
  20. * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
  21. * file for a list of people on the GTK+ Team. See the ChangeLog
  22. * files for a list of changes. These files are distributed with
  23. * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  24. */
  25. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  26. #error "Only <gtk/gtk.h> can be included directly."
  27. #endif
  28. #ifndef __GTK_TABLE_H__
  29. #define __GTK_TABLE_H__
  30. #include <gtk/gtkcontainer.h>
  31. G_BEGIN_DECLS
  32. #define GTK_TYPE_TABLE (gtk_table_get_type ())
  33. #define GTK_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TABLE, GtkTable))
  34. #define GTK_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TABLE, GtkTableClass))
  35. #define GTK_IS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TABLE))
  36. #define GTK_IS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TABLE))
  37. #define GTK_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TABLE, GtkTableClass))
  38. typedef struct _GtkTable GtkTable;
  39. typedef struct _GtkTableClass GtkTableClass;
  40. typedef struct _GtkTableChild GtkTableChild;
  41. typedef struct _GtkTableRowCol GtkTableRowCol;
  42. struct _GtkTable
  43. {
  44. GtkContainer container;
  45. GList *GSEAL (children);
  46. GtkTableRowCol *GSEAL (rows);
  47. GtkTableRowCol *GSEAL (cols);
  48. guint16 GSEAL (nrows);
  49. guint16 GSEAL (ncols);
  50. guint16 GSEAL (column_spacing);
  51. guint16 GSEAL (row_spacing);
  52. guint GSEAL (homogeneous) : 1;
  53. };
  54. struct _GtkTableClass
  55. {
  56. GtkContainerClass parent_class;
  57. };
  58. struct _GtkTableChild
  59. {
  60. GtkWidget *widget;
  61. guint16 left_attach;
  62. guint16 right_attach;
  63. guint16 top_attach;
  64. guint16 bottom_attach;
  65. guint16 xpadding;
  66. guint16 ypadding;
  67. guint xexpand : 1;
  68. guint yexpand : 1;
  69. guint xshrink : 1;
  70. guint yshrink : 1;
  71. guint xfill : 1;
  72. guint yfill : 1;
  73. };
  74. struct _GtkTableRowCol
  75. {
  76. guint16 requisition;
  77. guint16 allocation;
  78. guint16 spacing;
  79. guint need_expand : 1;
  80. guint need_shrink : 1;
  81. guint expand : 1;
  82. guint shrink : 1;
  83. guint empty : 1;
  84. };
  85. GType gtk_table_get_type (void) G_GNUC_CONST;
  86. GtkWidget* gtk_table_new (guint rows,
  87. guint columns,
  88. gboolean homogeneous);
  89. void gtk_table_resize (GtkTable *table,
  90. guint rows,
  91. guint columns);
  92. void gtk_table_attach (GtkTable *table,
  93. GtkWidget *child,
  94. guint left_attach,
  95. guint right_attach,
  96. guint top_attach,
  97. guint bottom_attach,
  98. GtkAttachOptions xoptions,
  99. GtkAttachOptions yoptions,
  100. guint xpadding,
  101. guint ypadding);
  102. void gtk_table_attach_defaults (GtkTable *table,
  103. GtkWidget *widget,
  104. guint left_attach,
  105. guint right_attach,
  106. guint top_attach,
  107. guint bottom_attach);
  108. void gtk_table_set_row_spacing (GtkTable *table,
  109. guint row,
  110. guint spacing);
  111. guint gtk_table_get_row_spacing (GtkTable *table,
  112. guint row);
  113. void gtk_table_set_col_spacing (GtkTable *table,
  114. guint column,
  115. guint spacing);
  116. guint gtk_table_get_col_spacing (GtkTable *table,
  117. guint column);
  118. void gtk_table_set_row_spacings (GtkTable *table,
  119. guint spacing);
  120. guint gtk_table_get_default_row_spacing (GtkTable *table);
  121. void gtk_table_set_col_spacings (GtkTable *table,
  122. guint spacing);
  123. guint gtk_table_get_default_col_spacing (GtkTable *table);
  124. void gtk_table_set_homogeneous (GtkTable *table,
  125. gboolean homogeneous);
  126. gboolean gtk_table_get_homogeneous (GtkTable *table);
  127. void gtk_table_get_size (GtkTable *table,
  128. guint *rows,
  129. guint *columns);
  130. G_END_DECLS
  131. #endif /* __GTK_TABLE_H__ */