123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- deferred class IUP_WIDGET_SHOW
- inherit
- IUP_WIDGET_INTERNALS
-
- feature {ANY}
- show : STRING
-
-
- local
- r: INTEGER
- do
- r := int_show(widget)
- if r.is_equal(0) then
- Result := "IUP_NOERROR"
- else
- Result := "IUP_ERROR"
- end
- end
- show_predefined_xy (x, y: STRING): STRING
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- require
- is_valid_position(x, y)
- do
- Result := show_xy(iup_open.position_to_integer(x),
- iup_open.position_to_integer(y))
- end
- show_xy (x, y: INTEGER): STRING
-
-
-
-
-
-
-
-
- require
- x >= 0
- y >= 0
- local
- r: INTEGER
- do
- r := int_show_xy(widget, x, y)
-
- if r.is_equal(-1) then
- Result := "IUP_INVALID"
- elseif r.is_equal(0) then
- Result := "IUP_NOERROR"
- else
- Result := "IUP_ERROR"
- end
- end
-
- is_valid_position (x, y: STRING): BOOLEAN
- local
- xs, ys: BOOLEAN
- do
- if x.is_equal("IUP_LEFT") or
- x.is_equal("IUP_CENTER") or
- x.is_equal("IUP_RIGHT") or
- x.is_equal("IUP_MOUSEPOS") or
- x.is_equal("IUP_CENTERPARENT") or
- x.is_equal("IUP_CURRENT") then
- xs := True
- elseif x.is_integer and x.to_integer >= 0 then
- xs := True
- else
- xs := False
- end
- if y.is_equal("IUP_TOP") or
- y.is_equal("IUP_CENTER") or
- y.is_equal("IUP_BOTTOM") or
- y.is_equal("IUP_MOUSEPOS") or
- y.is_equal("IUP_CENTERPARENT") or
- y.is_equal("IUP_CURRENT") then
- ys := True
- elseif y.is_integer and y.to_integer >= 0 then
- ys := True
- else
- ys := False
- end
- if xs and ys then
- Result := True
- else
- Result := False
- end
- end
- feature {NONE}
-
- int_show (dlg: POINTER): INTEGER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupShow ($dlg);"
- end
- int_show_xy (wgt: POINTER; x, y: INTEGER): INTEGER
- external
- "C inline use %"eiffel-iup.h%""
- alias
- "return IupShowXY ($wgt, $x, $y);"
- end
- end
|