1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- class IUP_FLAT_LABEL
- -- Creates an interface element that is a label, but it does not have native
- -- decorations. Its visual presentation can contain a text and/or an image.
- --
- -- It behaves just like an IUP_LABEL, but since it is not a native control it
- -- has more flexibility for additional options.
- --
- -- It inherits from IUP_CANVAS.
- --
- -- Notes:
- --
- -- The IUP_FLAT_LABEL can contain text and image simultaneously.
- --
- -- The natural size will be a combination of the size of the image and the
- -- title, if any, plus PADDING and SPACING (if both image and title are
- -- present).
- --
- -- The IUP_LABEL SEPARATOR attribute to configure a separator (horizontal or
- -- vertical lines) is not supported. ELLIPSIS, MARKUP and WORDWRAP IUP_LABEL
- -- attributes are also not supported. Mnemonics are not supported.
- inherit
- IUP_CANVAS
- redefine
- set_border
- end
- IUP_WIDGET_FGCOLOR
- IUP_WIDGET_SPACING
- IUP_WIDGET_TITLE
- IUP_WIDGET_PADDING
- IUP_WIDGET_FLAT_TEXT
- IUP_WIDGET_BACK_IMAGE_1
- IUP_WIDGET_FRONT_IMAGE_1
- IUP_WIDGET_IMAGE_1
-
- create {ANY}
- flat_label
-
- feature {ANY}
-
- flat_label (text: STRING)
- -- Create a new flat label with the provided text.
- local
- a_flat_label: POINTER
- do
- a_flat_label := int_flat_label (get_pointer(text.to_c))
- set_widget(a_flat_label)
- end
- -- Attributes
- set_border (state: BOOLEAN)
- -- (creation only): Shows a border around the canvas. Default: "False".
- do
- Precursor (state)
- end
- feature {NONE}
- -- Internals
- int_flat_label (text: POINTER): POINTER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupFlatLabel ($text);"
- end
- end -- class IUP_FLAT_LABEL
- -- The MIT License (MIT)
- -- Copyright (c) 2018, 2019 by German A. Arias
- -- Permission is hereby granted, free of charge, to any person obtaining a copy
- -- of this software and associated documentation files (the "Software"), to deal
- -- in the Software without restriction, including without limitation the rights
- -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- -- copies of the Software, and to permit persons to whom the Software is
- -- furnished to do so, subject to the following conditions:
- --
- -- The above copyright notice and this permission notice shall be included in
- -- all copies or substantial portions of the Software.
- --
- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- -- SOFTWARE.
|