Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

apress foundations_of gtk plus development 2007 phần 9 pot
Nội dung xem thử
Mô tả chi tiết
484 APPENDIX A ■ GTK+ PROPERTIES
Table A-3. Continued
Table A-4. GtkActionGroup Properties
Table A-5. GtkAdjustment Properties
Property Type Description
stock-id gchararray The stock icon to display for widgets
using the action. This property takes
precedence over icon-name.
tooltip gchararray A tooltip for the action that will be displayed when the user hovers over a
toolbar item.
visible gboolean If set to TRUE, the action will be visible
to the user.
visible-horizontal gboolean If set to TRUE, the action will be visible
in toolbars when the toolbar orientation is set as horizontal.
visible-overflown gboolean If set to TRUE, the action will be displayed in the toolbar overflow menu.
Otherwise, it will be hidden from view.
visible-vertical gboolean If set to TRUE, the action will be visible
in toolbars when the toolbar orientation is set as vertical.
Property Type Description
name gchararray A string that distinguishes the action
group.
sensitive gboolean If set to TRUE, the action group is set as
active or enabled.
visible gboolean If set to TRUE, the action group will be
visible to the user.
Property Type Description
lower gdouble The minimum gdouble value that the
adjustment can reach.
page-increment gdouble The increment that will be shifted
when moving one page forward or
backward.
7931.book Page 484 Thursday, March 8, 2007 7:02 PM
APPENDIX A ■ GTK+ PROPERTIES 485
Table A-6. GtkAlignment Properties
Table A-7. GtkArrow Properties
page-size gdouble The size of a page of the adjustment.
You should set this to zero when you
use GtkAdjustment for GtkSpinButton.
step-increment gdouble The increment that will be moved in
an individual step. For example, with
GtkSpinButton, a single step will be
taken when an arrow button is
pressed.
upper gdouble The maximum gdouble value that the
adjustment can reach.
value gdouble The current value of the adjustment, which is always between lower
and upper.
Property Type Description
bottom-padding guint Padding added along the bottom of
the child widget
left-padding guint Padding added along the left side of
the child widget
right-padding guint Padding added along the right side of
the child widget
top-padding guint Padding added along the top of the
child widget
xalign (yalign) gfloat A number between 0.0 and 1.0 used to
align the child widget, where 1.0 is
aligned to the right side or bottom of
the container
xscale (yscale) gfloat A number between 0.0 and 1.0 used to
expand the child to fill extra space
Property Type Description
arrow-type GtkArrowType The direction the GtkArrow will point
shadow-type GtkShadowType The type of shadow to place around
the arrow
Property Type Description
7931.book Page 485 Thursday, March 8, 2007 7:02 PM
486 APPENDIX A ■ GTK+ PROPERTIES
Table A-8. GtkAspectFrame Properties
Table A-9. GtkBox Properties
Table A-10. GtkButton Properties
Property Type Description
obey-child gboolean If set to TRUE, use the aspect ratio
defined by the child widget instead
of the ratio property.
ratio gfloat A number between 0.0001 and 10,000
that defines the aspect ratio.
xalign (yalign) gfloat The alignment of the child within the
container as defined by a number
between 0.0 and 1.0, where 0.5 is
centered.
Property Type Description
homogeneous gboolean If set to TRUE, all of the children will be
set to the same size.
spacing gint The spacing to add between each child
and its neighbors.
Property Type Description
focus-on-click gboolean If set to TRUE, the button will grab
focus when it is clicked by the mouse.
image GtkWidget A widget to display beside the button’s text.
image-position GtkPositionType The position of image with respect to
the label.
label gchararray A text label to display within the button if the button contains a label.
relief GtkReliefStyle The type of border to place around the
button.
use-stock gboolean If set to TRUE, a stock item will be used
as the button’s content.
use-underline gboolean If set to TRUE, a mnemonic keyboard
accelerator will be used for the character following an underscore.
xalign (yalign) gfloat A floating point number between 0.0
and 1.0 that aligns the child widget if it
is a GtkMisc or GtkAlignment widget,
where 0.5 is centered.
7931.book Page 486 Thursday, March 8, 2007 7:02 PM
APPENDIX A ■ GTK+ PROPERTIES 487
Table A-11. GtkButtonBox Properties
Table A-12. GtkCalendar Properties
Table A-13. GtkCellRenderer Properties
Property Type Description
layout-style GtkButtonBoxStyle The type of layout that is used for the
child buttons
Property Type Description
day gint The currently selected day between 1
and 31. A day of 0 will deselect the current day.
month gint The currently selected month between
0 and 11, where 0 is January.
no-month-change gboolean If set to TRUE, the user will be prevented from changing the month.
show-day-names gboolean If set to TRUE, the day names will be
displayed above the days.
show-heading gboolean If set to TRUE, the calendar heading will
be displayed.
show-week-numbers gboolean If set to TRUE, the week numbers for
the current month and year will be
displayed along the left side of the
calendar.
year gint The currently selected year.
Property Type Description
cell-background gchararray A string that represents the background color such as "Red" or
"#00CC00". For this property to take
effect, you have to also set cellbackground-set to TRUE.
cell-background-gdk GdkColor The background color of the cell.
height gint The height of the cell. Set this property to -1 to use the default height of
the cell.
is-expanded gboolean If the row has children, this property will
be set to TRUE if the row is expanded.
is-expander gboolean Set to TRUE if the row has child rows.
Continued
7931.book Page 487 Thursday, March 8, 2007 7:02 PM
488 APPENDIX A ■ GTK+ PROPERTIES
Table A-13. Continued
Table A-14. GtkCellRendererAccel Properties
Property Type Description
mode GtkCellRendererMode The interactivity mode of the cell.
sensitive gboolean If set to TRUE, the user will be able to
interact with the cell.
visible gboolean If set the TRUE, the cell will be visible to
the user.
width gint The width of the cell. Set this property
to -1 to use the default width of the cell.
xalign (yalign) gfloat The alignment of the content within
the cell as defined by a number
between 0.0 and 1.0, where 0.5 is
centered.
xpad (ypad) guint Horizontal and vertical padding to
place on either side of the child content of the cell.
Property Type Description
accel-key guint The key value for the accelerator.
A list of key codes can be found in
gdkkeysyms.h.
accel-mode GtkCellRendererAccelMode A flag value that determines whether
the accelerators are GTK+ accelerators. A value of GTK_CELL_RENDERER_
ACCEL_MODE_GTK will stop accelerators
that are already used from being
entered.
accel-mods GdkModifierType A modifier to use for the accelerator.
keycode guint The hardware key code for the keyboard accelerator. The accel-key
property should be used when the key
has a key value available.
7931.book Page 488 Thursday, March 8, 2007 7:02 PM
APPENDIX A ■ GTK+ PROPERTIES 489
Table A-15. GtkCellRendererCombo Properties
Table A-16. GtkCellRendererPixbuf Properties
Property Type Description
has-entry gboolean If set to TRUE, a GtkComboBoxEntry widget will be displayed when the cell is
being edited.
model GtkTreeModel The tree model that defines the
choices in the GtkComboBox widget.
text-column gint The column number in model that will
be displayed when the cell is not being
edited.
Property Type Description
follow-state gboolean If set to TRUE, the pixbuf will be colored based on GtkCellRendererState.
icon-name gchararray An icon to display from the icon
theme. The stock-id and pixbuf
properties take precedence over this
setting.
pixbuf GdkPixbuf An image to display in the cell.
This property takes precedence
over icon-name.
pixbuf-expander-closed GdkPixbuf An image to display as the expander
when the child rows are hidden.
pixbuf-expander-open GdkPixbuf An image to display as the expander
when the child rows are visible.
stock-detail gchararray A string that is sent to the theme
engine that gives more information
about rendering a stock item.
stock-id gchararray A stock identifier to use as the icon.
This property takes precedence over
icon-name.
stock-size guint The size of the stock icon to render.
7931.book Page 489 Thursday, March 8, 2007 7:02 PM