| Did you know ... | Search Documentation: |
| Get methods |
<-display.<-members.window_decorator wrappers automatically.<window_name>_member to the corresponding member
window:
?- new(@f, frame), send(@f, append, new(V, view)), send(new(D, dialog), below, V), send(V, open). ?- send(@f?view_member, format, 'Hello World\n').
<-area.<-area
on the display.->geometry.<-status
is open; @off
otherwise.<-image
for the pixels of a single window..e.
when it is closed or hidden. This is the most recently used other frame
of frame<-application,
whose frame<-members
are kept in that order by application->first;
a frame outside an application falls back on the frames of its frame<-display.
Only a frame whose frame<-kind
is toplevel and that is currently open qualifies. Fails if
there is no such frame.
This answers a question; it does not move the focus. Normally nothing
has to: which window is activated when one closes is decided by the
window system, which knows its own focus policy -- under X11 that policy
may well be "whatever the pointer is now over", and an application that
raises a window of its own on top of it is fighting the user. XPCE uses frame<-next_focus
only where a platform leaves the question unanswered, which on MacOS it
does for the windows SDL creates.
<-keyboard_focus
for the window inside a frame. ->first, which is what makes
the order an order of use.->return
is invoked. Used to implement modal prompts.
When grab is @on
the frame grabs the pointer. If the frame is freed while the confirmer
is blocking, the call fails.
Typical use:
ask_name(Name) :-
new(D, dialog('Name Prompter')),
send(D, append, new(N, text_item(name, ''))),
send(D, append,
button(ok, message(D, return, N?selection))),
send(D, append,
button(cancel, message(D, return, @nil))),
send(D, default_button, ok),
get(D, confirm, Answer),
send(D, destroy),
Answer \== @nil,
Name = Answer.
->return -return_value <-confirm_centered <-confirm|frame],
display=[display], grab=[bool] -> return_value=any<-confirm
but centres on center (or on the screen if omitted) rather
than placing the top-left there.|chain
filters — chain of tuple objects, each tuple(Name, Extensions)
where Extensions is a ;-separated list or a
chain of char_array. Example:
chain(tuple('Prolog', chain(pl,prolog))).
default — absolute file name used as initial
selection.allow_many — if @on,
allow multi-select and return a chain of file names; otherwise return a
single name.<-open_file
minus allow_many.