/src/wrappers/gtk/library/gtk_file_chooser_button.e

http://github.com/tybor/Liberty · Specman e · 190 lines · 46 code · 13 blank · 131 comment · 2 complexity · f2dfb7da6cf1e4608caf81b795e671f4 MD5 · raw file

  1. indexing
  2. description: "GtkFileChooserButton — A button to launch a file selection dialog"
  3. copyright: "[
  4. Copyright (C) 2006 eiffel-libraries team, GTK+ team and others
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful, but
  10. 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. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. date: "$Date:$"
  19. revision "$REvision:$"
  20. class GTK_FILE_CHOOSER_BUTTON
  21. inherit
  22. GTK_HBOX
  23. undefine
  24. struct_size
  25. end
  26. GTK_FILE_CHOOSER
  27. insert
  28. GTK_FILE_CHOOSER_ACTION
  29. GTK_FILE_CHOOSER_BUTTON_EXTERNALS
  30. -- Implemented Interfaces
  31. -- GtkFileChooserButton implements GtkFileChooser and AtkImplementorIface.
  32. creation
  33. from_title,
  34. from_external_pointer
  35. feature {} -- Creation
  36. from_title (a_title: STRING; an_action: INTEGER) is
  37. -- Creates a new file-selecting button widget.
  38. -- a_title : the title of the browse dialog.
  39. -- an_action : the open mode for the widget.
  40. require
  41. valid_title: a_title /= Void
  42. is_valid_gtk_file_chooser_action (an_action)
  43. do
  44. from_external_pointer (gtk_file_chooser_button_new (a_title.to_external, an_action))
  45. end
  46. -- gtk_file_chooser_button_new_with_backend ()
  47. --
  48. -- GtkWidget* gtk_file_chooser_button_new_with_backend
  49. -- (const gchar *title,
  50. -- GtkFileChooserAction action,
  51. -- const gchar *backend);
  52. --
  53. -- Creates a new file-selecting button widget using backend.
  54. --
  55. -- title : the title of the browse dialog.
  56. -- action : the open mode for the widget.
  57. -- backend : the name of the GtkFileSystem backend to use.
  58. -- Returns : a new button widget.
  59. --
  60. -- Since 2.6
  61. -- gtk_file_chooser_button_new_with_dialog ()
  62. --
  63. -- GtkWidget* gtk_file_chooser_button_new_with_dialog
  64. -- (GtkWidget *dialog);
  65. --
  66. -- Creates a GtkFileChooserButton widget which uses dialog as it's file-picking window. Note that dialog must be a GtkFileChooserDialog (or subclass) and must not have GTK_DIALOG_DESTROY_WITH_PARENT set.
  67. --
  68. -- dialog : the GtkFileChooserDialog widget to use.
  69. -- Returns : a new button widget.
  70. --
  71. -- Since 2.6
  72. feature
  73. title: STRING is
  74. -- Retrieves the title of the browse dialog used by button.
  75. -- The returned value should not be modified or freed.
  76. do
  77. create Result.from_external (gtk_file_chooser_button_get_title (handle))
  78. end
  79. -- gtk_file_chooser_button_set_title ()
  80. --
  81. -- void gtk_file_chooser_button_set_title
  82. -- (GtkFileChooserButton *button,
  83. -- const gchar *title);
  84. --
  85. -- Modifies the title of the browse dialog used by button.
  86. --
  87. -- button : the button widget to modify.
  88. -- title : the new browse dialog title.
  89. --
  90. -- Since 2.6
  91. -- gtk_file_chooser_button_get_width_chars ()
  92. --
  93. -- gint gtk_file_chooser_button_get_width_chars
  94. -- (GtkFileChooserButton *button);
  95. --
  96. -- Retrieves the width in characters of the button widget's entry and/or label.
  97. --
  98. -- button : the button widget to examine.
  99. -- Returns : an integer width (in characters) that the button will use to size itself.
  100. --
  101. -- Since 2.6
  102. -- gtk_file_chooser_button_set_width_chars ()
  103. --
  104. -- void gtk_file_chooser_button_set_width_chars
  105. -- (GtkFileChooserButton *button,
  106. -- gint n_chars);
  107. --
  108. -- Sets the width (in characters) that button will use to n_chars.
  109. --
  110. -- button : the button widget to examine.
  111. -- n_chars : the new width, in characters.
  112. --
  113. -- Since 2.6
  114. -- gtk_file_chooser_button_get_focus_on_click ()
  115. --
  116. -- gboolean gtk_file_chooser_button_get_focus_on_click
  117. -- (GtkFileChooserButton *button);
  118. --
  119. -- Returns whether the button grabs focus when it is clicked with the mouse. See gtk_file_chooser_button_set_focus_on_click().
  120. --
  121. -- button : a GtkFileChooserButton
  122. -- Returns : TRUE if the button grabs focus when it is clicked with the mouse.
  123. --
  124. -- Since 2.10
  125. -- gtk_file_chooser_button_set_focus_on_click ()
  126. --
  127. -- void gtk_file_chooser_button_set_focus_on_click
  128. -- (GtkFileChooserButton *button,
  129. -- gboolean focus_on_click);
  130. --
  131. -- Sets whether the button will grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don't want the keyboard focus removed from the main area of the application.
  132. --
  133. -- button : a GtkFileChooserButton
  134. -- focus_on_click : whether the button grabs focus when clicked with the mouse
  135. --
  136. -- Since 2.10
  137. -- Property Details
  138. -- The "dialog" property
  139. --
  140. -- "dialog" GtkFileChooserDialog : Write / Construct Only
  141. --
  142. -- Instance of the GtkFileChooserDialog associated with the button.
  143. --
  144. -- Since 2.6
  145. -- The "focus-on-click" property
  146. --
  147. -- "focus-on-click" gboolean : Read / Write
  148. --
  149. -- Whether the GtkFileChooserButton button grabs focus when it is clicked with the mouse.
  150. --
  151. -- Default value: TRUE
  152. --
  153. -- Since 2.10
  154. -- The "title" property
  155. --
  156. -- "title" gchararray : Read / Write
  157. --
  158. -- Title to put on the GtkFileChooserDialog associated with the button.
  159. --
  160. -- Default value: "Select A File"
  161. --
  162. -- Since 2.6
  163. -- The "width-chars" property
  164. --
  165. -- "width-chars" gint : Read / Write
  166. --
  167. -- The width of the entry and label inside the button, in characters.
  168. --
  169. -- Allowed values: >= -1
  170. --
  171. -- Default value: -1
  172. --
  173. -- Since 2.6
  174. -- See Also
  175. --
  176. -- GtkFileChooserDialog
  177. end -- GTK_FILE_CHOOSER_BUTTON