dlangui.widgets.popup
DLANGUI library.
This module contains popup widgets implementation.
Popups appear above other widgets inside window.
Useful for popup menus, notification popups, etc.
Synopsis:
import dlangui.widgets.popup;
License:
Boost License 1.0
Authors:
Vadim Lopatin, coolreader.org@gmail.com
- enum PopupAlign: uint;
- popup alignment option flags
- Center
- center popup around anchor widget center
- Below
- place popup below anchor widget close to lower bound
- Right
- place popup below anchor widget close to right bound (when no space enough, align near left bound)
- Point
- align to specified point
- enum PopupFlags: uint;
- popup behavior flags - for PopupWidget.flags property
- CloseOnClickOutside
- close popup when mouse button clicked outside of its bounds
- class PopupWidget: dlangui.widgets.layouts.LinearLayout;
- popup widget container
- @property void delegate(PopupWidget popup) onPopupCloseListener();
- popup close listener (called right before closing)
- @property PopupWidget onPopupCloseListener(void delegate(PopupWidget popup) listener);
- set popup close listener (to call right before closing)
- @property uint flags();
- returns popup behavior flags (combination of PopupFlags)
- @property PopupWidget flags(uint flags);
- set popup behavior flags (combination of PopupFlags)
- @property ref PopupAnchor anchor();
- access to popup anchor
- bool modal();
- returns true if popup is modal
- PopupWidget modal(bool modal);
- set modality flag
- void measure(int parentWidth, int parentHeight);
- Measure widget according to desired width and height constraints. (Step 1 of two phase layout).
- void close();
- close and destroy popup
- void onClose();
- just call on close listener
- void layout(Rect rc);
- Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).
- bool onMouseEventOutside(MouseEvent event);
- called for mouse activity outside shown popup bounds
Page generated by Ddoc. Vadim Lopatin, 2014