123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- class IUP_FLAT_FRAME
- inherit
- IUP_BACKGROUND_BOX
- rename
- background_box_empty as flat_frame_empty,
- background_box as flat_frame
- redefine
- flat_frame_empty,
- flat_frame,
- set_rgb_background_color,
- set_decoration
- end
- IUP_WIDGET_TITLE
- IUP_WIDGET_FLAT_TEXT
- create {ANY}
- flat_frame_empty,
- flat_frame
- feature {ANY}
- flat_frame_empty
-
- local
- a_flat_frame, p: POINTER
- do
- a_flat_frame := int_flat_frame (p)
- set_widget(a_flat_frame)
- end
- flat_frame (child: IUP_WIDGET)
-
-
-
-
- local
- a_flat_frame: POINTER
- do
- a_flat_frame := int_flat_frame (child.widget)
- set_widget(a_flat_frame)
- end
-
- set_decoration (state: BOOLEAN)
-
- do
- end
- set_rgb_background_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
-
- do
- Precursor (red, green, blue)
- end
- disable_frame
-
- do
- iup_open.set_attribute(Current, "FRAME", "NO")
- end
- set_frame_line
-
- do
- iup_open.set_attribute(Current, "FRAME", "YES")
- end
- set_frame_cross_title
-
- do
- iup_open.set_attribute(Current, "FRAME", "CROSSTITLE")
- end
- get_frame_value: STRING
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "FRAME")
- Result := str
- end
- set_rgb_frame_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
- do
- iup_open.set_attribute(Current, "FRAMECOLOR", rgb_to_string(red, green, blue))
- end
- get_rgb_frame_color: TUPLE[INTEGER, INTEGER, INTEGER]
- do
- Result := iup_open.get_rgb(Current, "FRAMECOLOR")
- end
- set_frame_width (value: INTEGER)
-
- require
- value > 0
- do
- iup_open.set_attribute(Current, "FRAMEWIDTH", value.out)
- end
- get_frame_width: INTEGER
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "FRAMEWIDTH")
- Result := str.to_integer
- end
- set_frame_space (value: INTEGER)
-
-
- require
- value >= 0
- do
- iup_open.set_attribute(Current, "FRAMESPACE", value.out)
- end
- get_frame_space: INTEGER
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "FRAMESPACE")
- Result := str.to_integer
- end
- set_rgb_title_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
-
- do
- iup_open.set_attribute(Current, "TITLECOLOR", rgb_to_string(red, green, blue))
- end
- get_rgb_title_color: TUPLE[INTEGER, INTEGER, INTEGER]
- do
- Result := iup_open.get_rgb(Current, "TITLECOLOR")
- end
- set_rgb_title_background_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
-
- do
- iup_open.set_attribute(Current, "TITLEBGCOLOR", rgb_to_string(red, green, blue))
- end
- get_rgb_title_background_color: TUPLE[INTEGER, INTEGER, INTEGER]
- do
- Result := iup_open.get_rgb(Current, "TITLEBGCOLOR")
- end
- set_title_line (state: BOOLEAN)
-
-
- do
- iup_open.set_attribute(Current, "TITLELINE", boolean_to_yesno(state))
- end
- has_title_line: BOOLEAN
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "TITLELINE")
- Result := yesno_to_boolean(str)
- end
- set_rgb_title_line_color (red: INTEGER; green: INTEGER; blue: INTEGER)
-
-
- do
- iup_open.set_attribute(Current, "TITLELINECOLOR", rgb_to_string(red, green, blue))
- end
- get_rgb_title_line_color: TUPLE[INTEGER, INTEGER, INTEGER]
- do
- Result := iup_open.get_rgb(Current, "TITLELINECOLOR")
- end
- set_title_line_width (value: INTEGER)
-
- require
- value > 0
- do
- iup_open.set_attribute(Current, "TITLELINEWIDTH", value.out)
- end
- get_title_line_width: INTEGER
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "TITLELINEWIDTH")
- Result := str.to_integer
- end
- set_title_image (imagename: STRING)
-
-
-
- do
- iup_open.set_attribute(Current, "TITLEIMAGE", imagename)
- end
- get_title_image: STRING
- do
- Result := iup_open.get_attribute(Current, "TITLEIMAGE")
- end
- set_title_image_inactive (imagename: STRING)
-
-
-
- do
- iup_open.set_attribute(Current, "TITLEIMAGEINACTIVE", imagename)
- end
- get_title_image_inactive: STRING
- do
- Result := iup_open.get_attribute(Current, "TITLEIMAGEINACTIVE")
- end
- set_title_image_position (position: STRING)
-
-
- require
- is_valid_position(position)
- do
- iup_open.set_attribute(Current, "TITLEIMAGEPOSITION", position)
- end
- get_title_image_position: STRING
- do
- Result := iup_open.get_attribute(Current, "TITLEIMAGEPOSITION")
- end
- set_title_image_spacing (value: INTEGER)
-
-
- require
- value >= 0
- do
- iup_open.set_attribute(Current, "TITLEIMAGESPACING", value.out)
- end
- get_title_image_spacing: INTEGER
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "TITLEIMAGESPACING")
- Result := str.to_integer
- end
- set_title_alignment (value: STRING)
-
-
- require
- is_valid_horizontal_alignment(value)
- do
- iup_open.set_attribute(Current, "TITLEALIGNMENT", value)
- end
- get_title_alignment: STRING
- do
- Result := iup_open.get_attribute(Current, "TITLEALIGNMENT")
- end
- set_title_text_alignment (value: STRING)
-
-
- require
- is_valid_horizontal_alignment(value)
- do
- iup_open.set_attribute(Current, "TITLETEXTALIGNMENT", value)
- end
- get_title_text_alignment: STRING
- do
- Result := iup_open.get_attribute(Current, "TITLETEXTALIGNMENT")
- end
- set_title_padding (horizontal, vertical: INTEGER)
-
- local
- str: STRING
- do
- create str.make_from_string(horizontal.out)
- str.append_string("x")
- str.append_string(vertical.out)
-
- iup_open.set_attribute(Current, "TITLEPADDING", str)
- end
- get_title_padding: TUPLE[INTEGER, INTEGER]
- local
- str: STRING
- do
- str := iup_open.get_attribute(Current, "TITLEPADDING")
- Result := components_of (str, 'x')
- end
-
- is_valid_position (value: STRING): BOOLEAN
- do
- if value.is_equal("LEFT") or
- value.is_equal("RIGHT") or
- value.is_equal("TOP") or
- value.is_equal("BOTTON") then
- Result := True
- else
- Result := False
- end
- end
- feature {NONE}
-
-
- int_flat_frame (arguments: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupFlatFrame ($arguments);"
- end
- end
|