/src/wrappers/gtk/library/gtk_text_tag.e

http://github.com/tybor/Liberty · Specman e · 1084 lines · 246 code · 342 blank · 496 comment · 4 complexity · d3d79f1fe6da1409de556f99efa90136 MD5 · raw file

  1. indexing
  2. description: "GtkTextTag: A tag that can be applied to text in a GtkTextBuffer."
  3. copyright: "[
  4. Copyright (C) 2006 eiffel-libraries team, GTK+ team
  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. class GTK_TEXT_TAG
  19. -- A tag that can be applied to text in a GTK_TEXT_BUFFER.
  20. -- You may wish to begin by reading the text widget conceptual
  21. -- overview which gives an overview of all the objects and data
  22. -- types related to the text widget and how they work together.
  23. -- Tags should be in the GtkTextTagTable for a given GtkTextBuffer
  24. -- before using them with that buffer.
  25. -- GTK_TEXT_BUFFER's `create_tag' is the best way to create
  26. -- tags. (TODO: translate gtk-demo from C to Eiffel for numerous
  27. -- examples).
  28. -- The "invisible" property was not implemented for GTK+ 2.0; it's
  29. -- planned to be implemented in future releases.
  30. inherit G_OBJECT
  31. insert
  32. PANGO_WEIGHT
  33. PANGO_STYLE
  34. PANGO_UNDERLINE
  35. GTK
  36. creation make, with_name, from_external_pointer
  37. feature {} -- Creation
  38. make is
  39. -- Create a nameless GtkTextTag
  40. require gtk_initialized: gtk.is_initialized
  41. do
  42. from_external_pointer (gtk_text_tag_new (default_pointer))
  43. end
  44. with_name (a_name: STRING) is
  45. -- Creates a GtkTextTag. Configure the tag using object
  46. -- arguments, i.e. using G_OBJECT.set().
  47. require
  48. gtk_initialized: gtk.is_initialized
  49. name_not_void: a_name /= Void
  50. do
  51. from_external_pointer(gtk_text_tag_new (a_name.to_external))
  52. ensure
  53. name.is_equal (a_name)
  54. end
  55. feature
  56. priority: INTEGER is
  57. -- the tag priority.
  58. do
  59. Result := gtk_text_tag_get_priority (handle)
  60. end
  61. set_priority (a_priority: INTEGER) is
  62. -- Sets the priority of a GtkTextTag. Valid priorities are
  63. -- start at 0 and go to one less than
  64. -- gtk_text_tag_table_get_size(). Each tag in a table has a
  65. -- unique priority; setting the priority of one tag shifts
  66. -- the priorities of all the other tags in the table to
  67. -- maintain a unique priority for each tag. Higher priority
  68. -- tags "win" if two tags both set the same text
  69. -- attribute. When adding a tag to a tag table, it will be
  70. -- assigned the highest priority in the table by default; so
  71. -- normally the precedence of a set of tags is the order in
  72. -- which they were added to the table, or created with
  73. -- gtk_text_buffer_create_tag(), which adds the tag to the
  74. -- buffer's table automatically.
  75. do
  76. gtk_text_tag_set_priority (handle, a_priority)
  77. end
  78. -- TODO: wrap gtk_text_tag_event ()
  79. -- gboolean gtk_text_tag_event (GtkTextTag *tag, GObject
  80. -- *event_object, GdkEvent *event, const GtkTextIter *iter);
  81. -- Emits the "event" signal on the GtkTextTag.
  82. -- tag : a GtkTextTag
  83. -- event_object : object that received the event, such as a widget
  84. -- event : the event
  85. -- iter : location where the event was received
  86. -- Returns : result of signal emission (whether the event was handled)
  87. feature -- TODO: Properties. Meanwhile you can use G_OBJECT.get_property/set_property
  88. -- "background" gchararray : Write
  89. -- "background-full-height" gboolean : Read / Write
  90. -- "background-full-height-set" gboolean : Read / Write
  91. -- "background-gdk" GdkColor : Read / Write
  92. -- "background-set" gboolean : Read / Write
  93. -- "background-stipple" GdkPixmap : Read / Write
  94. -- "background-stipple-set" gboolean : Read / Write
  95. -- "direction" GtkTextDirection : Read / Write
  96. -- "editable" gboolean : Read / Write
  97. -- "editable-set" gboolean : Read / Write
  98. -- "family" gchararray : Read / Write
  99. -- "family-set" gboolean : Read / Write
  100. -- "font" gchararray : Read / Write
  101. -- "font-desc" PangoFontDescription : Read / Write
  102. -- "foreground" gchararray : Write
  103. -- "foreground-gdk" GdkColor : Read / Write
  104. -- "foreground-set" gboolean : Read / Write
  105. -- "foreground-stipple" GdkPixmap : Read / Write
  106. -- "foreground-stipple-set" gboolean : Read / Write
  107. -- "indent" gint : Read / Write
  108. -- "indent-set" gboolean : Read / Write
  109. -- "invisible" gboolean : Read / Write
  110. -- "invisible-set" gboolean : Read / Write
  111. -- "justification" GtkJustification : Read / Write
  112. -- "justification-set" gboolean : Read / Write
  113. -- "language" gchararray : Read / Write
  114. -- "language-set" gboolean : Read / Write
  115. -- "left-margin" gint : Read / Write
  116. -- "left-margin-set" gboolean : Read / Write
  117. -- "name" gchararray : Read / Write / Construct Only
  118. -- "paragraph-background" gchararray : Write
  119. -- "paragraph-background-gdk" GdkColor : Read / Write
  120. -- "paragraph-background-set" gboolean : Read / Write
  121. -- "pixels-above-lines" gint : Read / Write
  122. -- "pixels-above-lines-set" gboolean : Read / Write
  123. -- "pixels-below-lines" gint : Read / Write
  124. -- "pixels-below-lines-set" gboolean : Read / Write
  125. -- "pixels-inside-wrap" gint : Read / Write
  126. -- "pixels-inside-wrap-set" gboolean : Read / Write
  127. -- "right-margin" gint : Read / Write
  128. -- "right-margin-set" gboolean : Read / Write
  129. -- "rise" gint : Read / Write
  130. -- "rise-set" gboolean : Read / Write
  131. -- "scale" gdouble : Read / Write
  132. -- "scale-set" gboolean : Read / Write
  133. -- "size" gint : Read / Write
  134. -- "size-points" gdouble : Read / Write
  135. -- "size-set" gboolean : Read / Write
  136. -- "stretch" PangoStretch : Read / Write
  137. -- "stretch-set" gboolean : Read / Write
  138. -- "strikethrough" gboolean : Read / Write
  139. -- "strikethrough-set" gboolean : Read / Write
  140. -- "style" PangoStyle : Read / Write
  141. -- "style-set" gboolean : Read / Write
  142. -- "tabs" PangoTabArray : Read / Write
  143. -- "tabs-set" gboolean : Read / Write
  144. -- "underline" PangoUnderline : Read / Write
  145. -- "underline-set" gboolean : Read / Write
  146. -- "variant" PangoVariant : Read / Write
  147. -- "variant-set" gboolean : Read / Write
  148. -- "weight" gint : Read / Write
  149. -- "weight-set" gboolean : Read / Write
  150. -- "wrap-mode" GtkWrapMode : Read / Write
  151. -- "wrap-mode-set" gboolean : Read / Write
  152. -- Property Details
  153. -- The "background" property
  154. -- "background" gchararray : Write
  155. -- Background color as a string.
  156. -- Default value: NULL
  157. -- -------------------------------------------------------------------------------------
  158. -- The "background-full-height" property
  159. -- "background-full-height" gboolean : Read / Write
  160. -- Whether the background color fills the entire line height or only the height of the
  161. -- tagged characters.
  162. -- Default value: FALSE
  163. -- -------------------------------------------------------------------------------------
  164. -- The "background-full-height-set" property
  165. -- "background-full-height-set" gboolean : Read / Write
  166. -- Whether this tag affects background height.
  167. -- Default value: FALSE
  168. -- -------------------------------------------------------------------------------------
  169. -- The "background-gdk" property
  170. -- "background-gdk" GdkColor : Read / Write
  171. -- Background color as a (possibly unallocated) GdkColor.
  172. -- -------------------------------------------------------------------------------------
  173. -- The "background-set" property
  174. -- "background-set" gboolean : Read / Write
  175. -- Whether this tag affects the background color.
  176. -- Default value: FALSE
  177. -- -------------------------------------------------------------------------------------
  178. -- The "background-stipple" property
  179. -- "background-stipple" GdkPixmap : Read / Write
  180. -- Bitmap to use as a mask when drawing the text background.
  181. -- -------------------------------------------------------------------------------------
  182. -- The "background-stipple-set" property
  183. -- "background-stipple-set" gboolean : Read / Write
  184. -- Whether this tag affects the background stipple.
  185. -- Default value: FALSE
  186. -- -------------------------------------------------------------------------------------
  187. -- The "direction" property
  188. -- "direction" GtkTextDirection : Read / Write
  189. -- Text direction, e.g. right-to-left or left-to-right.
  190. -- Default value: GTK_TEXT_DIR_NONE
  191. -- -------------------------------------------------------------------------------------
  192. -- The "editable" property
  193. -- "editable" gboolean : Read / Write
  194. -- Whether the text can be modified by the user.
  195. -- Default value: TRUE
  196. -- -------------------------------------------------------------------------------------
  197. -- The "editable-set" property
  198. -- "editable-set" gboolean : Read / Write
  199. -- Whether this tag affects text editability.
  200. -- Default value: FALSE
  201. -- -------------------------------------------------------------------------------------
  202. -- The "family" property
  203. -- "family" gchararray : Read / Write
  204. -- Name of the font family, e.g. Sans, Helvetica, Times, Monospace.
  205. -- Default value: NULL
  206. -- -------------------------------------------------------------------------------------
  207. -- The "family-set" property
  208. -- "family-set" gboolean : Read / Write
  209. -- Whether this tag affects the font family.
  210. -- Default value: FALSE
  211. -- -------------------------------------------------------------------------------------
  212. feature -- The "font" property
  213. set_font (a_font: STRING) is
  214. require
  215. a_font /= Void
  216. do
  217. set_string_property (font_property_name, a_font)
  218. end
  219. font: STRING is
  220. -- Font description as string, e.g. "Sans Italic 12".
  221. -- Note that the initial value of this property depends on the
  222. -- internals of PangoFontDescription.
  223. -- Default value: Void
  224. local
  225. font_ptr: POINTER
  226. do
  227. g_object_get_one_property (handle, font_property_name.to_external, $font_ptr, default_pointer)
  228. if font_ptr.is_not_null then
  229. create Result.from_external (font_ptr)
  230. end
  231. end
  232. -- -------------------------------------------------------------------------------------
  233. -- The "font-desc" property
  234. -- "font-desc" PangoFontDescription : Read / Write
  235. -- Font description as a PangoFontDescription struct.
  236. -- -------------------------------------------------------------------------------------
  237. feature -- The "foreground" property gchararray : Write
  238. set_foreground (a_foreground: STRING) is
  239. -- Foreground color as a string.
  240. -- Default value: NULL
  241. require
  242. a_foreground /= Void
  243. do
  244. set_string_property (foreground_property_name, a_foreground)
  245. end
  246. -- -------------------------------------------------------------------------------------
  247. -- The "foreground-gdk" property
  248. -- "foreground-gdk" GdkColor : Read / Write
  249. -- Foreground color as a (possibly unallocated) GdkColor.
  250. -- -------------------------------------------------------------------------------------
  251. -- The "foreground-set" property
  252. -- "foreground-set" gboolean : Read / Write
  253. -- Whether this tag affects the foreground color.
  254. -- Default value: FALSE
  255. -- -------------------------------------------------------------------------------------
  256. -- The "foreground-stipple" property
  257. -- "foreground-stipple" GdkPixmap : Read / Write
  258. -- Bitmap to use as a mask when drawing the text foreground.
  259. -- -------------------------------------------------------------------------------------
  260. -- The "foreground-stipple-set" property
  261. -- "foreground-stipple-set" gboolean : Read / Write
  262. -- Whether this tag affects the foreground stipple.
  263. -- Default value: FALSE
  264. -- -------------------------------------------------------------------------------------
  265. -- The "indent" property
  266. -- "indent" gint : Read / Write
  267. -- Amount to indent the paragraph, in pixels.
  268. -- Default value: 0
  269. -- -------------------------------------------------------------------------------------
  270. -- The "indent-set" property
  271. -- "indent-set" gboolean : Read / Write
  272. -- Whether this tag affects indentation.
  273. -- Default value: FALSE
  274. -- -------------------------------------------------------------------------------------
  275. -- The "invisible" property
  276. -- "invisible" gboolean : Read / Write
  277. -- Whether this text is hidden.
  278. -- Note that there may still be problems with the support for invisible text, in
  279. -- particular when navigating programmatically inside a buffer containing invisible
  280. -- segments.
  281. -- Default value: FALSE
  282. -- Since 2.8
  283. -- -------------------------------------------------------------------------------------
  284. -- The "invisible-set" property
  285. -- "invisible-set" gboolean : Read / Write
  286. -- Whether this tag affects text visibility.
  287. -- Default value: FALSE
  288. -- -------------------------------------------------------------------------------------
  289. -- The "justification" property
  290. -- "justification" GtkJustification : Read / Write
  291. -- Left, right, or center justification.
  292. -- Default value: GTK_JUSTIFY_LEFT
  293. -- -------------------------------------------------------------------------------------
  294. -- The "justification-set" property
  295. -- "justification-set" gboolean : Read / Write
  296. -- Whether this tag affects paragraph justification.
  297. -- Default value: FALSE
  298. -- -------------------------------------------------------------------------------------
  299. -- The "language" property
  300. -- "language" gchararray : Read / Write
  301. -- The language this text is in, as an ISO code. Pango can use this as a hint when
  302. -- rendering the text. If not set, an appropriate default will be used.
  303. -- Note that the initial value of this property depends on the current locale, see also
  304. -- gtk_get_default_language().
  305. -- Default value: NULL
  306. -- -------------------------------------------------------------------------------------
  307. -- The "language-set" property
  308. -- "language-set" gboolean : Read / Write
  309. -- Whether this tag affects the language the text is rendered as.
  310. -- Default value: FALSE
  311. -- -------------------------------------------------------------------------------------
  312. -- The "left-margin" property
  313. -- "left-margin" gint : Read / Write
  314. -- Width of the left margin in pixels.
  315. -- Allowed values: >= 0
  316. -- Default value: 0
  317. -- -------------------------------------------------------------------------------------
  318. -- The "left-margin-set" property
  319. -- "left-margin-set" gboolean : Read / Write
  320. -- Whether this tag affects the left margin.
  321. -- Default value: FALSE
  322. -- -------------------------------------------------------------------------------------
  323. feature -- The "name" property
  324. name: STRING is
  325. -- Name used to refer to the text tag. Void for anonymous tags.
  326. -- Default value: Void
  327. local
  328. name_ptr: POINTER
  329. do
  330. g_object_get_one_property (handle, name_property_name.to_external, $name_ptr, default_pointer)
  331. if name_ptr.is_not_null then
  332. create Result.from_external (name_ptr)
  333. end
  334. end
  335. -- -------------------------------------------------------------------------------------
  336. -- The "paragraph-background" property
  337. -- "paragraph-background" gchararray : Write
  338. -- The paragraph background color as a string.
  339. -- Default value: NULL
  340. -- Since 2.8
  341. -- -------------------------------------------------------------------------------------
  342. -- The "paragraph-background-gdk" property
  343. -- "paragraph-background-gdk" GdkColor : Read / Write
  344. -- The paragraph background color as a as a (possibly unallocated) GdkColor.
  345. -- Since 2.8
  346. -- -------------------------------------------------------------------------------------
  347. -- The "paragraph-background-set" property
  348. -- "paragraph-background-set" gboolean : Read / Write
  349. -- Whether this tag affects the paragraph background color.
  350. -- Default value: FALSE
  351. -- -------------------------------------------------------------------------------------
  352. -- The "pixels-above-lines" property
  353. -- "pixels-above-lines" gint : Read / Write
  354. -- Pixels of blank space above paragraphs.
  355. -- Allowed values: >= 0
  356. -- Default value: 0
  357. -- -------------------------------------------------------------------------------------
  358. -- The "pixels-above-lines-set" property
  359. -- "pixels-above-lines-set" gboolean : Read / Write
  360. -- Whether this tag affects the number of pixels above lines.
  361. -- Default value: FALSE
  362. -- -------------------------------------------------------------------------------------
  363. -- The "pixels-below-lines" property
  364. -- "pixels-below-lines" gint : Read / Write
  365. -- Pixels of blank space below paragraphs.
  366. -- Allowed values: >= 0
  367. -- Default value: 0
  368. -- -------------------------------------------------------------------------------------
  369. -- The "pixels-below-lines-set" property
  370. -- "pixels-below-lines-set" gboolean : Read / Write
  371. -- Whether this tag affects the number of pixels above lines.
  372. -- Default value: FALSE
  373. -- -------------------------------------------------------------------------------------
  374. -- The "pixels-inside-wrap" property
  375. -- "pixels-inside-wrap" gint : Read / Write
  376. -- Pixels of blank space between wrapped lines in a paragraph.
  377. -- Allowed values: >= 0
  378. -- Default value: 0
  379. -- -------------------------------------------------------------------------------------
  380. -- The "pixels-inside-wrap-set" property
  381. -- "pixels-inside-wrap-set" gboolean : Read / Write
  382. -- Whether this tag affects the number of pixels between wrapped lines.
  383. -- Default value: FALSE
  384. -- -------------------------------------------------------------------------------------
  385. -- The "right-margin" property
  386. -- "right-margin" gint : Read / Write
  387. -- Width of the right margin in pixels.
  388. -- Allowed values: >= 0
  389. -- Default value: 0
  390. -- -------------------------------------------------------------------------------------
  391. -- The "right-margin-set" property
  392. -- "right-margin-set" gboolean : Read / Write
  393. -- Whether this tag affects the right margin.
  394. -- Default value: FALSE
  395. -- -------------------------------------------------------------------------------------
  396. feature -- The "rise" property
  397. -- "rise" gint : Read / Write
  398. rise: INTEGER is
  399. -- Offset of text above the baseline (below the baseline
  400. -- if rise is negative) in Pango units. Default value: 0
  401. do
  402. Result := integer_property (rise_property_name)
  403. end
  404. set_rise (a_rise: INTEGER) is
  405. -- The "rise" property
  406. do
  407. set_integer_property (rise_property_name, a_rise)
  408. end
  409. -- -------------------------------------------------------------------------------------
  410. -- The "rise-set" property
  411. -- "rise-set" gboolean : Read / Write
  412. -- Whether this tag affects the rise.
  413. -- Default value: FALSE
  414. -- -------------------------------------------------------------------------------------
  415. feature -- The "scale" property
  416. -- "scale" gdouble : Read / Write
  417. scale: REAL is
  418. -- Font size as a scale factor relative to the default font
  419. -- size. This properly adapts to theme changes etc. so is
  420. -- recommended. Pango predefines some scales such as
  421. -- PANGO_SCALE_X_LARGE. Default value: 1
  422. do
  423. ensure valid: Result >= 0
  424. end
  425. set_scale (a_scale: REAL) is
  426. require valid_scale: a_scale >= 0
  427. do
  428. end
  429. -- -------------------------------------------------------------------------------------
  430. -- The "scale-set" property
  431. -- "scale-set" gboolean : Read / Write
  432. -- Whether this tag scales the font size by a factor.
  433. -- Default value: FALSE
  434. -- -------------------------------------------------------------------------------------
  435. feature -- The "size" property
  436. -- "size" gint : Read / Write
  437. set_size (a_size: INTEGER) is
  438. -- Set "size" property
  439. require valid_size: a_size >= 0
  440. do
  441. set_integer_property (size_property_name, a_size)
  442. end
  443. size: INTEGER is
  444. -- Font size in Pango units.
  445. do
  446. g_object_get_one_property (handle, size_property_name.to_external, $Result, default_pointer)
  447. end
  448. -- The "size-points" property
  449. -- "size-points" gdouble : Read / Write
  450. -- Font size in points.
  451. -- Allowed values: >= 0
  452. -- Default value: 0
  453. -- -------------------------------------------------------------------------------------
  454. -- The "size-set" property
  455. -- "size-set" gboolean : Read / Write
  456. -- Whether this tag affects the font size.
  457. -- Default value: FALSE
  458. -- -------------------------------------------------------------------------------------
  459. -- The "stretch" property
  460. -- "stretch" PangoStretch : Read / Write
  461. -- Font stretch as a PangoStretch, e.g. PANGO_STRETCH_CONDENSED.
  462. -- Default value: PANGO_STRETCH_NORMAL
  463. -- -------------------------------------------------------------------------------------
  464. -- The "stretch-set" property
  465. -- "stretch-set" gboolean : Read / Write
  466. -- Whether this tag affects the font stretch.
  467. -- Default value: FALSE
  468. -- -------------------------------------------------------------------------------------
  469. -- The "strikethrough" property
  470. -- "strikethrough" gboolean : Read / Write
  471. -- Whether to strike through the text.
  472. -- Default value: FALSE
  473. -- -------------------------------------------------------------------------------------
  474. -- The "strikethrough-set" property
  475. -- "strikethrough-set" gboolean : Read / Write
  476. -- Whether this tag affects strikethrough.
  477. -- Default value: FALSE
  478. -- -------------------------------------------------------------------------------------
  479. feature -- The "style" property
  480. set_style (a_style: INTEGER) is
  481. require
  482. valid: is_valid_pango_style (a_style)
  483. do
  484. set_enum_property (style_property_name, a_style)
  485. end
  486. style: INTEGER is
  487. -- Font style as a PANGO_STYLE, see predefined values in
  488. -- PANGO_WEIGHT; for example, pango_style_normal.
  489. -- Default value: PANGO_STYLE_NORMAL
  490. do
  491. g_object_get_one_property (handle, style_property_name.to_external, $Result, default_pointer)
  492. ensure
  493. valid: is_valid_pango_style (Result)
  494. end
  495. -- -------------------------------------------------------------------------------------
  496. -- The "style-set" property
  497. -- "style-set" gboolean : Read / Write
  498. -- Whether this tag affects the font style.
  499. -- Default value: FALSE
  500. -- -------------------------------------------------------------------------------------
  501. -- The "tabs" property
  502. -- "tabs" PangoTabArray : Read / Write
  503. -- Custom tabs for this text.
  504. -- -------------------------------------------------------------------------------------
  505. -- The "tabs-set" property
  506. -- "tabs-set" gboolean : Read / Write
  507. -- Whether this tag affects tabs.
  508. -- Default value: FALSE
  509. -- -------------------------------------------------------------------------------------
  510. set_underline (an_underline: INTEGER) is
  511. require
  512. valid: is_valid_pango_underline (an_underline)
  513. do
  514. set_enum_property (underline_property_name, an_underline)
  515. end
  516. underline: INTEGER is
  517. -- Style of underline for this text.
  518. -- Default value: pango_underline_none
  519. do
  520. g_object_get_one_property (handle, underline_property_name.to_external, $Result, default_pointer)
  521. ensure
  522. valid: is_valid_pango_underline (Result)
  523. end
  524. -- -------------------------------------------------------------------------------------
  525. -- The "underline-set" property
  526. -- "underline-set" gboolean : Read / Write
  527. -- Whether this tag affects underlining.
  528. -- Default value: FALSE
  529. -- -------------------------------------------------------------------------------------
  530. -- The "variant" property
  531. -- "variant" PangoVariant : Read / Write
  532. -- Font variant as a PangoVariant, e.g. PANGO_VARIANT_SMALL_CAPS.
  533. -- Default value: PANGO_VARIANT_NORMAL
  534. -- -------------------------------------------------------------------------------------
  535. -- The "variant-set" property
  536. -- "variant-set" gboolean : Read / Write
  537. -- Whether this tag affects the font variant.
  538. -- Default value: FALSE
  539. -- -------------------------------------------------------------------------------------
  540. set_weight (a_weight: INTEGER) is
  541. require
  542. valid: is_valid_pango_weight (a_weight)
  543. do
  544. set_integer_property (weight_property_name, a_weight)
  545. end
  546. weight: INTEGER is
  547. -- Font weight as an integer, see predefined values in
  548. -- PANGO_WEIGHT; for example, pango_weight_bold.
  549. -- Default value: 400
  550. do
  551. g_object_get_one_property (handle, weight_property_name.to_external, $Result, default_pointer)
  552. ensure
  553. valid: is_valid_pango_weight (Result)
  554. end
  555. -- -------------------------------------------------------------------------------------
  556. feature -- The "wrap-mode" property
  557. -- "wrap-mode" GtkWrapMode : Read / Write
  558. wrap_mode: INTEGER is
  559. -- Whether to wrap lines never, at word boundaries, or at
  560. -- character boundaries. Default value: `gtk_wrap_none'
  561. obsolete "integer_property should be enum"
  562. do
  563. Result := integer_property (wrap_mode_property_name)
  564. ensure valid: is_valid_gtk_wrap_mode (Result)
  565. end
  566. set_wrap_mode (a_mode: INTEGER) is
  567. -- Set `wrap-mode' property.
  568. require valid_mode: is_valid_gtk_wrap_mode (a_mode)
  569. do
  570. set_integer_property (wrap_mode_property_name, a_mode)
  571. end
  572. feature -- The "wrap-mode-set" property
  573. -- "wrap-mode-set" gboolean : Read / Write
  574. -- Whether this tag affects line wrap mode.
  575. -- Default value: FALSE
  576. feature -- TODO: Signals
  577. -- "event" gboolean user_function (GtkTextTag *texttag,
  578. -- GObject *arg1,
  579. -- GdkEvent *event,
  580. -- GtkTextIter *arg2,
  581. -- gpointer user_data) : Run last
  582. -- Signal Details
  583. -- The "event" signal
  584. -- gboolean user_function (GtkTextTag *texttag,
  585. -- GObject *arg1,
  586. -- GdkEvent *event,
  587. -- GtkTextIter *arg2,
  588. -- gpointer user_data) : Run last
  589. -- texttag : the object which received the signal.
  590. -- arg1 :
  591. -- event :
  592. -- arg2 :
  593. -- user_data : user data set when the signal handler was connected.
  594. -- Returns :
  595. feature {} -- Properties names
  596. background_property_name: STRING is "background"
  597. -- gchararray : Write
  598. background_full_height_property_name: STRING is "background-full-height"
  599. -- gboolean : Read / Write
  600. background_full_height_set_property_name: STRING is "background-full-height-set"
  601. -- gboolean : Read / Write
  602. background_gdk_property_name: STRING is "background-gdk"
  603. -- GdkColor : Read / Write
  604. background_set_property_name: STRING is "background-set"
  605. -- gboolean : Read / Write
  606. background_stipple_property_name: STRING is "background-stipple"
  607. -- GdkPixmap : Read / Write
  608. background_stipple_set_property_name: STRING is "background-stipple-set"
  609. -- gboolean : Read / Write
  610. direction_property_name: STRING is "direction"
  611. -- GtkTextDirection : Read / Write
  612. editable_property_name: STRING is "editable"
  613. -- gboolean : Read / Write
  614. editable_set_property_name: STRING is "editable-set"
  615. -- gboolean : Read / Write
  616. family_property_name: STRING is "family"
  617. -- gchararray : Read / Write
  618. family_set_property_name: STRING is "family-set"
  619. -- gboolean : Read / Write
  620. font_property_name: STRING is "font"
  621. -- gchararray : Read / Write
  622. font_desc_property_name: STRING is "font-desc"
  623. -- PangoFontDescription : Read / Write
  624. foreground_property_name: STRING is "foreground"
  625. -- gchararray : Write
  626. foreground_gdk_property_name: STRING is "foreground-gdk"
  627. -- GdkColor : Read / Write
  628. foreground_set_property_name: STRING is "foreground-set"
  629. -- gboolean : Read / Write
  630. foreground_stipple_property_name: STRING is "foreground-stipple"
  631. -- GdkPixmap : Read / Write
  632. foreground_stipple_set_property_name: STRING is "foreground-stipple-set"
  633. -- gboolean : Read / Write
  634. indent_property_name: STRING is "indent"
  635. -- gint : Read / Write
  636. indent_set_property_name: STRING is "indent-set"
  637. -- gboolean : Read / Write
  638. invisible_property_name: STRING is "invisible"
  639. -- gboolean : Read / Write
  640. invisible_set_property_name: STRING is "invisible-set"
  641. -- gboolean : Read / Write
  642. justification_property_name: STRING is "justification"
  643. -- GtkJustification : Read / Write
  644. justification_set_property_name: STRING is "justification-set"
  645. -- gboolean : Read / Write
  646. language_property_name: STRING is "language"
  647. -- gchararray : Read / Write
  648. language_set_property_name: STRING is "language-set"
  649. -- gboolean : Read / Write
  650. left_margin_property_name: STRING is "left-margin"
  651. -- gint : Read / Write
  652. left_margin_set_property_name: STRING is "left-margin-set"
  653. -- gboolean : Read / Write
  654. name_property_name: STRING is "name"
  655. -- gchararray : Read / Write / Construct Only
  656. paragraph_background_property_name: STRING is "paragraph-background"
  657. -- gchararray : Write
  658. paragraph_background_gdk_property_name: STRING is "paragraph-background-gdk"
  659. -- GdkColor : Read / Write
  660. paragraph_background_set_property_name: STRING is "paragraph-background-set"
  661. -- gboolean : Read / Write
  662. pixels_above_lines_property_name: STRING is "pixels-above-lines"
  663. -- gint : Read / Write
  664. pixels_above_lines_set_property_name: STRING is "pixels-above-lines-set"
  665. -- gboolean : Read / Write
  666. pixels_below_lines_property_name: STRING is "pixels-below-lines"
  667. -- gint : Read / Write
  668. pixels_below_lines_set_property_name: STRING is "pixels-below-lines-set"
  669. -- gboolean : Read / Write
  670. pixels_inside_wrap_property_name: STRING is "pixels-inside-wrap"
  671. -- gint : Read / Write
  672. pixels_inside_wrap_set_property_name: STRING is "pixels-inside-wrap-set"
  673. -- gboolean : Read / Write
  674. right_margin_property_name: STRING is "right-margin"
  675. -- gint : Read / Write
  676. right_margin_set_property_name: STRING is "right-margin-set"
  677. -- gboolean : Read / Write
  678. rise_property_name: STRING is "rise"
  679. -- gint : Read / Write
  680. rise_set_property_name: STRING is "rise-set"
  681. -- gboolean : Read / Write
  682. scale_property_name: STRING is "scale"
  683. -- gdouble : Read / Write
  684. scale_set_property_name: STRING is "scale-set"
  685. -- gboolean : Read / Write
  686. size_property_name: STRING is "size"
  687. -- gint : Read / Write
  688. size_points_property_name: STRING is "size-points"
  689. -- gdouble : Read / Write
  690. size_set_property_name: STRING is "size-set"
  691. -- gboolean : Read / Write
  692. stretch_property_name: STRING is "stretch"
  693. -- PangoStretch : Read / Write
  694. stretch_set_property_name: STRING is "stretch-set"
  695. -- gboolean : Read / Write
  696. strikethrough_property_name: STRING is "strikethrough"
  697. -- gboolean : Read / Write
  698. strikethrough_set_property_name: STRING is "strikethrough-set"
  699. -- gboolean : Read / Write
  700. style_property_name: STRING is "style"
  701. -- PangoStyle : Read / Write
  702. style_set_property_name: STRING is "style-set"
  703. -- gboolean : Read / Write
  704. tabs_property_name: STRING is "tabs"
  705. -- PangoTabArray : Read / Write
  706. tabs_set_property_name: STRING is "tabs-set"
  707. -- gboolean : Read / Write
  708. underline_property_name: STRING is "underline"
  709. -- PangoUnderline : Read / Write
  710. underline_set_property_name: STRING is "underline-set"
  711. -- gboolean : Read / Write
  712. variant_property_name: STRING is "variant"
  713. -- PangoVariant : Read / Write
  714. variant_set_property_name: STRING is "variant-set"
  715. -- gboolean : Read / Write
  716. weight_property_name: STRING is "weight"
  717. -- gint : Read / Write
  718. weight_set_property_name: STRING is "weight-set"
  719. -- gboolean : Read / Write
  720. wrap_mode_property_name: STRING is "wrap-mode"
  721. -- GtkWrapMode : Read / Write
  722. wrap_mode_set_property_name: STRING is "wrap-mode-set"
  723. -- gboolean : Read / Write
  724. feature -- size
  725. struct_size: INTEGER is
  726. external "C inline use <gtk/gtk.h>"
  727. alias "sizeof(GtkTextTag)"
  728. end
  729. feature {} -- External calls
  730. gtk_text_tag_new (a_const_name: POINTER): POINTER is -- GtkTextTag*
  731. external "C use <gtk/gtk.h>"
  732. end
  733. gtk_text_tag_get_priority (a_gtktexttag: POINTER): INTEGER is
  734. external "C use <gtk/gtk.h>"
  735. end
  736. gtk_text_tag_set_priority (a_gtktexttag: POINTER; a_priority: INTEGER) is
  737. external "C use <gtk/gtk.h>"
  738. end
  739. gtk_text_tag_event (a_gtktexttag, an_event_object, a_gdkevent, a_const_gtktextiter: POINTER): INTEGER is -- gboolean
  740. external "C use <gtk/gtk.h>"
  741. end
  742. end