1. Trang chủ
  2. » Công Nghệ Thông Tin

apress foundations_of gtk plus development 2007 phần 9 pot

60 281 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 60
Dung lượng 1,27 MB

Nội dung

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 dis- played 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 orienta- tion is set as horizontal. visible-overflown gboolean If set to TRUE, the action will be dis- played 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 orienta- tion 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 adjust- ment, 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 but- ton’s text. image-position GtkPositionType The position of image with respect to the label. label gchararray A text label to display within the but- ton 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 charac- ter 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 cur- rent 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 pre- vented 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 back- ground color such as "Red" or "#00CC00". For this property to take effect, you have to also set cell- background-set to TRUE. cell-background-gdk GdkColor The background color of the cell. height gint The height of the cell. Set this prop- erty 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 con- tent 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+ accelera- tors. 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 key- board 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 wid- get 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 col- ored 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 490 APPENDIX A ■ GTK+ PROPERTIES Table A-17. GtkCellRendererProgress Properties Table A-18. GtkCellRendererSpin Properties Table A-19. GtkCellRendererText Properties Property Type Description text gchararray A text string that will be drawn over the progress bar. If this is set to NULL, the default string will be displayed. value gint The amount of the progress bar that is filled in as defined by a number between 0 and 100, where 100 is com- pletely filled. Property Type Description adjustment GtkAdjustment The adjustment that holds informa- tion about the spin button when it is being edited. This property must be set for it to be editable. climb-rate gdouble The rate of acceleration when an arrow button is held down. digits guint The number of decimal places to dis- play in the spin button when the cell is being edited. Note that this does not affect the number of decimal places being displayed when the cell is not being edited. You should use a cell data function to set the normal state digits. Property Type Description alignment PangoAlignment The alignment of lines of text. You must set align-set to TRUE for this property to take effect. attributes PangoAttrList A list of attributes that are applied to the renderer’s text. background gchararray The background color of the cell as a string. You must set background-set to TRUE for this property to take effect. background-gdk GdkColor The background color of the cell. editable gboolean If set to TRUE, the user will be able to edit the text. You must set editable- set to TRUE for this property to take effect. 7931.book Page 490 Thursday, March 8, 2007 7:02 PM APPENDIX A ■ GTK+ PROPERTIES 491 ellipsize PangoEllipsizeMode The place within the string to replace text with ellipses if there is not enough space to display the whole string. You must set ellipsize-set to TRUE for this property to take effect. family gchararray The font family name such as Arial or Monospace. You must set family-set to TRUE for this property to take effect. font gchararray The font description string such as "Monospace Bold 10". You must set font-set to TRUE for this property to take effect. font-desc PangoFontDescription A font description that defines the font for the cell. foreground gchararray The foreground color of the cell as a string. You must set foreground-set to TRUE for this property to take effect. foreground-gdk GdkColor The foreground color of the cell. language gchararray The language of the cell’s text as an ISO code. In most cases, you will not need to use this property. You must set language-set to TRUE for this prop- erty to take effect. markup gchararray Text that will be rendered by the cell that contains Pango markup. rise gint The positive or negative offset of the text. You must set rise-set to TRUE for this property to take effect. scale gdouble The scaling factor for the font as a gdouble value. You must set scale-set to TRUE for this property to take effect. single-paragraph-mode gboolean If set to TRUE, all text will be forced into one paragraph. size gint The font size of the text, scaled by a factor of PANGO_UNITS. You must set size-set to TRUE for this property to take effect. size-points gdouble The font size of the text in points. stretch PangoStretch A flag that is used to add or remove spacing between text characters. You must set stretch-set to TRUE for this property to take effect. Continued Property Type Description 7931.book Page 491 Thursday, March 8, 2007 7:02 PM 492 APPENDIX A ■ GTK+ PROPERTIES Table A-19. Continued Table A-20. GtkCellRendererToggle Properties Property Type Description strikethrough gboolean If set to TRUE, a single line will be placed through the text. You must set strikethrough-set to TRUE for this property to take effect. style PangoStyle The style of the font such as italics or oblique. You must set style-set to TRUE for this property to take effect. text gchararray The text to display in the cell. underline PangoUnderline The style of underline to place below the text. You must set underline-set to TRUE for this property to take effect. variant PangoVariant Set to PANGO_VARIANT_SMALL_CAPS to render lower case characters as small upper case characters. You must set variant-set to TRUE for this property to take effect. weight gint The font weight. You must set weight- set to TRUE for this property to take effect. width-chars gint The width of the cell in characters. If you set this property to -1, GTK+ will calculate the width. wrap-mode PangoWrapMode The type of wrap to use for the text. By default, this is set to PANGO_WRAP_CHAR. wrap-width gint The width at which text will be wrapped. If this property is set to -1, then wrapping will be disabled. Property Type Description activatable gboolean If set to TRUE, the toggle button can be activated by the user. Otherwise, the toggle button can only be used to dis- play a setting. active gboolean If set to TRUE, the toggle button will be set as activated. inconsistent gboolean If set to TRUE, the toggle button is in a state that is neither active nor inactive. 7931.book Page 492 Thursday, March 8, 2007 7:02 PM APPENDIX A ■ GTK+ PROPERTIES 493 Table A-21. GtkCellView Properties Table A-22. GtkCheckMenuItem Properties Table A-23. GtkColorButton Properties indicator-size gint The size of the check button or radio button. By default, this is set to 12 pixels. radio gboolean If set to TRUE, the toggle will be drawn as a radio button. However, you will have to implement the functionality of the radio buttons yourself. Property Type Description background gchararray The background color of the cell as a string. You must set background-set to TRUE for this property to take effect. background-gdk GdkColor The background color of the cell. model GtkTreeModel The tree model associated with the cell view. GtkCellView is used to dis- play one column of a model. Property Type Description active gboolean If set to TRUE, the check menu item is set as active. draw-as-radio gboolean If set to TRUE, the menu item will be drawn as a radio button. However, you will have to implement the functional- ity of the radio buttons yourself. inconsistent gboolean If set to TRUE, the toggle button will display an in-between state that is nei- ther active nor inactive. Property Type Description alpha guint The transparency of the selected color, where 0 is transparent and 65,535 is opaque. color GdkColor The currently selected color. title gchararray The title to give the GtkColorSelectionDialog displayed when the user clicks the button. use-alpha gboolean If set to TRUE, the user will be given the option to select transparency. Property Type Description 7931.book Page 493 Thursday, March 8, 2007 7:02 PM [...]... GtkShadowType A flag that defines what shadow type the GtkFrame uses Table A- 39 GtkHandleBox Properties Property Type Description handle-position GtkPositionType The position of the handle with respect to the child widget shadow-type GtkShadowType A flag that defines what shadow type the GtkHandleBox widget uses snap-edge GtkPositionType The position of the snap edge that will be used to dock the GtkHandleBox... storage-type GtkImageType The type of image storage type that is being used by the GtkImage Table A-42 GtkImageMenuItem Properties Property Type Description image GtkWidget The widget that will appear beside the menu item’s label 793 1.book Page 503 Thursday, March 8, 2007 7:02 PM APPENDIX A ■ GTK+ PROPERTIES Table A-43 GtkInvisible Properties Property Type Description screen GdkScreen The screen on which the GtkInvisible... gfloat Numbers that define the minimum x or y values 495 793 1.book Page 496 Thursday, March 8, 2007 7:02 PM 496 APPENDIX A ■ GTK+ PROPERTIES Table A- 29 GtkDialog Properties Property Type Description has-separator gboolean If set to TRUE, a separator will be placed between the dialog’s GtkVBox widget and its action area Table A-30 GtkEntry Properties Property Type Description activates-default gboolean... GtkEventBox Properties Property Type Description above-child gboolean If set to TRUE, the event box will receive all events that occur within it Otherwise, events will first go to the children and then to the event box visible-window gboolean If set to TRUE, the event box will be visible to the user 497 793 1.book Page 498 Thursday, March 8, 2007 7:02 PM 498 APPENDIX A ■ GTK+ PROPERTIES Table A-33 GtkExpander... 793 1.book Page 506 Thursday, March 8, 2007 7:02 PM 506 APPENDIX A ■ GTK+ PROPERTIES Table A-51 GtkMessageDialog Properties Property Type Description buttons GtkButtonsType The button or buttons shown in the action area of the message dialog image GtkWidget The widget image to display in the GtkMessageDialog message-type GtkMessageType The type of message that is reported by the GtkMessageDialog The message... lower-steppersensitivity GtkSensitivityType The sensitivity associated with the button that decreases the GtkAdjustment object’s value when activated update-policy GtkUpdateType Defines how the GtkRange should be updated on the screen upper-steppersensitivity GtkSensitivityType The sensitivity associated with the button that increases the GtkAdjustment object’s value when activated 793 1.book Page 511 Thursday, March 8, 2007. .. gchararray The current content of GtkEntry truncate-multiline gboolean If set to TRUE, when the user pastes text that spans multiple lines into a GtkEntry widget, only the first line will be inserted visibility gboolean If set to FALSE, all of the characters in the GtkEntry widget will be replaced by invisibility-char 793 1.book Page 497 Thursday, March 8, 2007 7:02 PM APPENDIX A ■ GTK+ PROPERTIES Property... activated Table A-61 GtkRadioButton, GtkRadioMenuItem, and GtkRadioToolButton Properties Property Type Description group GtkWidget A radio button, radio menu item, or radio tool button that links the radio widget to others in the same radio group Table A-62 GtkRange Properties Property Type Description adjustment GtkAdjustment An adjustment that holds the current value of the GtkRange as well as bound... use-size gboolean If set to TRUE, the font button’s label will use the selected size when drawn 499 793 1.book Page 500 Thursday, March 8, 2007 7:02 PM 500 APPENDIX A ■ GTK+ PROPERTIES Table A-37 GtkFontSelection Properties Property Type Description font GdkFont The font that is currently selected in the GtkFontSelection font-name gchararray A string that represents the currently selected font preview-text... guint The total number of columns in the GtkTable n-rows guint The total number of rows in the GtkTable row-spacing guint The number of pixels of spacing to add between a row and each of its neighbors 515 793 1.book Page 516 Thursday, March 8, 2007 7:02 PM 516 APPENDIX A ■ GTK+ PROPERTIES Table A-75 GtkTextBuffer Properties Property Type Description copy-target-list GtkTargetList A target list for the buffer . Description 793 1.book Page 499 Thursday, March 8, 2007 7:02 PM 500 APPENDIX A ■ GTK+ PROPERTIES Table A-37. GtkFontSelection Properties Table A-38. GtkFrame Properties Table A- 39. GtkHandleBox. inactive. 793 1.book Page 492 Thursday, March 8, 2007 7:02 PM APPENDIX A ■ GTK+ PROPERTIES 493 Table A-21. GtkCellView Properties Table A-22. GtkCheckMenuItem Properties Table A-23. GtkColorButton. values. Property Type Description 793 1.book Page 495 Thursday, March 8, 2007 7:02 PM 496 APPENDIX A ■ GTK+ PROPERTIES Table A- 29. GtkDialog Properties Table A-30. GtkEntry Properties Property Type

Ngày đăng: 05/08/2014, 10:20

TỪ KHÓA LIÊN QUAN