| Did you know ... | Search Documentation: |
| Send methods |
Defaults:
label untitled kind toplevel display @display
->free.->busy_cursor
and restore the normal cursor.show slot into frame<-status.background)
when loading older saved instances..g. when the host
moves the frame to another monitor). Applications normally do not call
this.
:- pce_begin_class(mail, frame, "Simple mail tool").
initialise(M) :->
"Create mail tool"::
send(M, send_super, initialise, mail),
/* append the various parts to the tool */
send(M, append, new(B, browser)),
send(M, append, new(V, view)),
send(M, append, new(D, dialog)),
/* specify the layout of the parts in the tool */
send(V, below, B),
send(D, below, V),
...
->above->append,
window->left, window->above,
...
->enforce
on the root tile;->_compute_desired_size
on each sub-window (currently only dialog implements this);->enforce
on the root tile;->set
to the root-tile's ideal width/height. Normally called from frame->create;
user code calls it after runtime layout changes (e.g.
after graphical->size
or after modifying a dialog window).
->create ->set ->_compute_desired_size ->enforce<-tile
hierarchy and create a tile_adjuster object for each tile
whose frame<-can_resize
is @on; free
adjusters of non-resizable tiles. Called from frame->create.
When the frame is already shown, the request is sent asynchronously
to the OS; the slots are updated when the OS confirms. A successful size
change triggers frame->resize.
->size ->position ->geometry->set.->set
that change one axis.->set
with the point's x and y.->position.->set
from the four fields of the argument area.->create).
The syntax is
<width>x<height>[+-]<X>[+-]<Y>[@<monitor>]
All five components are optional. A negative X / Y is measured from the right / bottom edge of the screen. Example:
400x200+0-0
means a 400x200 frame anchored at the bottom-left. The size applies to the client area; the position to the frame including borders.
The @<monitor> suffix, where <monitor>
is a value from
display_manager<-members,
picks the monitor used as the origin. This syntax follows the FVWM
convention. If the
display argument is given explicitly, @<monitor>
is ignored.
->set .geometry
<-display
if needed.<-frames.->fit
to lay out sub-windows.->create
each member window.-geometry if set. 10. frame->update_tile_adjusters.
->open <-frames ->fit
->create
if not yet created.->set
the position if supplied.->status.
If grab is @on
the frame grabs the pointer (see
window->grab_pointer).
->open_centered ->set ->create ->open|frame],
display=[display], grab=[bool]->open
but centres the frame on the given point (or the centre of frame<-display
if omitted).->open
and frame->status.->show
on transients to follow the main frame.->flush
and frame->synchronise.<-status). open
is a synonym for window.->closed
opens the frame (frame->status), frame->closed
iconifies it.
<-closed ->status->closed
(in case the frame was iconic) and then asks SDL to raise the OS window.
On success frame->exposed
is invoked via the resulting OS event.
<-postscript ->closed->expose
to each transient frame.
->hidden <-transients->hide to each transient frame.
->exposed ->transient_for.volume ->bell.busy_cursor)
on every sub-window of the frame. When block_input is @on,
all pointer and keyboard events are blocked while the cursor is active. frame->busy_cursor
restores the normal cursor and re-enables input.
->busy_cursor.e.
when the pointer is on the area between sub-windows). Used by frame->event
while resizing tiles.<-keyboard_focus
or the window currently under the pointer.
<-input_focus
window: forward to that window;|event_id<-confirm
call on this frame return with the given value. Stores it in -return_value.
<-confirm -return_value->report
that walks a frame's report chain:
<-report_to;
if it returns a value other than
frame<-display,
forward frame->report
there.->report
on each frame<-members
window until one succeeds. Windows by default delegate back to their
frame, so the loop detects and breaks this cycle.<-transient_for.->report.Historically these names matched X11's WM_PROTOCOLS messages, notably WM_DELETE_WINDOW (close request) and WM_SAVE_YOURSELF (session save). On SDL3 only the close-request path remains; the others are accepted but never triggered.
->wm_protocol.->wm_protocol.
Default: message(@receiver, wm_delete).
->wm_delete ->wm_protocol->wm_protocol.
Kept for completeness; SDL3 does not emit this event.
<-can_delete
is @off.<-confirm_done
is @on, pop up
display->confirm.
Fail if the user cancels.->destroy
the frame. @see frame->done_message
@see frame<-can_delete
@see frame<-confirm_done->kind,
@off to frame->kind.
New code should use frame->kind..g.
dialog or inspector) for the argument frame. Effects:
->unlink <-transient_for <-transients<-transients
chain. Called by frame->transient_for
and frame->unlink;
user code rarely invokes them directly.