123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- class IUP_FONT_DIALOG
- inherit
- IUP_WIDGET
- redefine
- execute_help
- end
- IUP_WIDGET_INTERNALS
- IUP_WIDGET_TITLE
- IUP_WIDGET_POPUP
- IUP_WIDGET_ICON
- IUP_WIDGET_PARENT_DIALOG
- create {ANY}
- font_dialog
-
- feature {ANY}
- font_dialog
- local
- a_font_dialog: POINTER
- do
- a_font_dialog := int_font_dialog
- set_widget(a_font_dialog)
- end
-
- set_preview_text (text: STRING)
-
-
- do
- iup_open.set_attribute(Current, "PREVIEWTEXT", text)
- end
- set_color (red, green, blue: INTEGER)
-
-
-
-
- do
- iup_open.set_attribute(Current, "COLOR", rgb_to_string(red,
- green,
- blue))
- end
- get_color: TUPLE[INTEGER, INTEGER, INTEGER]
-
-
- do
- Result := iup_open.get_rgb(Current, "COLOR")
- end
- set_show_color (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "SHOWCOLOR", boolean_to_yesno(state))
- end
- get_status: INTEGER
-
-
- local
- value: STRING
- do
- value := iup_open.get_attribute(Current, "STATUS")
-
- if value.is_integer then
- Result := value.to_integer
- else
- Result := 0
- end
- end
- set_value (value: STRING)
-
-
- do
- iup_open.set_attribute(Current, "VALUE", value)
- end
- get_value: STRING
-
- do
- Result := iup_open.get_attribute(Current, "VALUE")
- end
-
- set_cb_help (act: detachable PROCEDURE[TUPLE[IUP_FONT_DIALOG]])
-
-
-
-
- local
- operation: INTEGER
- do
- cb_help := act
- if cb_help /= Void then
- operation := 1
- else
- operation := 0
- end
-
- iup_open.set_callback (Current, "HELP_CB", "NONEEDED", operation)
- end
- feature {IUP}
- execute_help
- do
- if attached cb_help as int_cb then
- int_cb.call([Current])
- end
- end
- feature {NONE}
-
- cb_help: detachable PROCEDURE[TUPLE[IUP_FONT_DIALOG]]
-
- int_font_dialog: POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupFontDlg ();"
- end
- end
|