Dillo v3.1.1-95-g3af05307
|
The central class for managing and drawing a widget tree. More...
#include <layout.hh>
Classes | |
class | Anchor |
class | Emitter |
class | LayoutImgRenderer |
class | LinkEmitter |
class | LinkReceiver |
class | Receiver |
Receiver interface different signals. More... | |
Public Member Functions | |
Layout (Platform *platform) | |
~Layout () | |
void | connectLink (LinkReceiver *receiver) |
bool | emitLinkEnter (Widget *w, int link, int img, int x, int y) |
bool | emitLinkPress (Widget *w, int link, int img, int x, int y, EventButton *event) |
bool | emitLinkRelease (Widget *w, int link, int img, int x, int y, EventButton *event) |
bool | emitLinkClick (Widget *w, int link, int img, int x, int y, EventButton *event) |
void | addWidget (Widget *widget) |
void | setWidget (Widget *widget) |
void | attachView (View *view) |
Attach a view to the layout. | |
void | detachView (View *view) |
bool | getUsesViewport () |
int | getWidthViewport () |
int | getHeightViewport () |
int | getScrollPosX () |
int | getScrollPosY () |
void | scrollTo (HPosition hpos, VPosition vpos, int x, int y, int width, int height) |
Scrolls all viewports, so that the region [x, y, width, height] is seen, according to hpos and vpos. | |
void | scroll (ScrollCommand) |
void | setAnchor (const char *anchor) |
Sets the anchor to scroll to. | |
void | expose (View *view, Rectangle *area) |
bool | buttonPress (View *view, int numPressed, int x, int y, ButtonState state, int button) |
This function is called by a view, to delegate a button press event. | |
void | containerSizeChanged () |
bool | buttonRelease (View *view, int numPressed, int x, int y, ButtonState state, int button) |
This function is called by a view, to delegate a button press event. | |
bool | motionNotify (View *view, int x, int y, ButtonState state) |
This function is called by a view, to delegate a motion notify event. | |
void | enterNotify (View *view, int x, int y, ButtonState state) |
This function is called by a view, to delegate a enter notify event. | |
void | leaveNotify (View *view, ButtonState state) |
This function is called by a view, to delegate a leave notify event. | |
void | scrollPosChanged (View *view, int x, int y) |
void | viewportSizeChanged (View *view, int width, int height) |
Platform * | getPlatform () |
int | textWidth (style::Font *font, const char *text, int len) |
char * | textToUpper (const char *text, int len) |
char * | textToLower (const char *text, int len) |
int | nextGlyph (const char *text, int idx) |
int | prevGlyph (const char *text, int idx) |
float | dpiX () |
float | dpiY () |
style::Font * | createFont (style::FontAttrs *attrs, bool tryEverything) |
bool | fontExists (const char *name) |
style::Color * | createColor (int color) |
style::Tooltip * | createTooltip (const char *text) |
void | cancelTooltip () |
Imgbuf * | createImgbuf (Imgbuf::Type type, int width, int height, double gamma) |
void | copySelection (const char *text) |
ui::ResourceFactory * | getResourceFactory () |
void | connect (Receiver *receiver) |
FindtextState::Result | search (const char *str, bool caseSens, int backwards) |
See dw::core::FindtextState::search. | |
void | resetSearch () |
See dw::core::FindtextState::resetSearch. | |
void | setBgColor (style::Color *color) |
void | setBgImage (style::StyleImage *bgImage, style::BackgroundRepeat bgRepeat, style::BackgroundAttachment bgAttachment, style::Length bgPositionX, style::Length bgPositionY) |
style::Color * | getBgColor () |
style::StyleImage * | getBgImage () |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual bool | equals (Object *other) |
Returns, whether two objects are equal. | |
virtual int | hashValue () |
Return a hash value for the object. | |
virtual Object * | clone () |
Return an exact copy of the object. | |
virtual void | intoStringBuffer (misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
Public Attributes | |
LinkEmitter | linkEmitter |
lout::misc::ZoneAllocator * | textZone |
Private Types | |
enum | ButtonEventType { BUTTON_PRESS , BUTTON_RELEASE , MOTION_NOTIFY } |
Private Member Functions | |
void | detachWidget (Widget *widget) |
Widget * | getWidgetAtPoint (int x, int y) |
void | moveToWidget (Widget *newWidgetAtPoint, ButtonState state) |
void | moveToWidgetAtPoint (int x, int y, ButtonState state) |
Emit the necessary crossing events, when the mouse pointer has moved to position (x, );. | |
void | moveOutOfView (ButtonState state) |
Emit the necessary crossing events, when the mouse pointer has moved out of the view. | |
bool | processMouseEvent (MousePositionEvent *event, ButtonEventType type) |
Common processing of press, release and motion events. | |
bool | buttonEvent (ButtonEventType type, View *view, int numPressed, int x, int y, ButtonState state, int button) |
void | resizeIdle () |
void | setSizeHints () |
void | draw (View *view, Rectangle *area) |
void | scrollTo0 (HPosition hpos, VPosition vpos, int x, int y, int width, int height, bool scrollingInterrupted) |
void | scrollIdle () |
void | adjustScrollPos () |
int | currHScrollbarThickness () |
int | currVScrollbarThickness () |
void | updateAnchor () |
char * | addAnchor (Widget *widget, const char *name) |
Used, when the widget is not allocated yet. | |
char * | addAnchor (Widget *widget, const char *name, int y) |
void | changeAnchor (Widget *widget, char *name, int y) |
void | removeAnchor (Widget *widget, char *name) |
void | setCursor (style::Cursor cursor) |
void | updateCursor () |
void | queueDraw (int x, int y, int width, int height) |
void | queueDrawExcept (int x, int y, int width, int height, int ex, int ey, int ewidth, int eheight) |
void | queueResize (bool extremesChanged) |
void | removeWidget () |
void | enterResizeIdle () |
void | leaveResizeIdle () |
Static Private Member Functions | |
static bool | calcScrollInto (int targetValue, int requestedSize, int *value, int viewportSize) |
Friends | |
class | Widget |
The central class for managing and drawing a widget tree.
|
private |
dw::core::Layout::Layout | ( | Platform * | platform | ) |
Definition at line 258 of file layout.cc.
References anchorsTable, bgColor, bgImage, canvasAscent, canvasDescent, canvasWidth, cursor, dw::core::style::CURSOR_DEFAULT, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_CREATE, DBG_OBJ_SET_NUM, drawAfterScrollReq, findtextState, getExtremesCounter, hScrollbarThickness, layoutImgRenderer, platform, queueResizeCounter, queueResizeList, requestedAnchor, resizeCounter, resizeIdleCounter, resizeIdleId, scrollIdleId, scrollIdleNotInterrupted, scrollX, scrollY, selectionState, dw::core::SelectionState::setLayout(), dw::core::Platform::setLayout(), sizeAllocateCounter, sizeRequestCounter, textZone, topLevel, usesViewport, view, viewportHeight, viewportWidth, vScrollbarThickness, and widgetAtPoint.
dw::core::Layout::~Layout | ( | ) |
Definition at line 313 of file layout.cc.
References anchorsTable, bgColor, bgImage, DBG_OBJ_DELETE, detachWidget(), layoutImgRenderer, platform, queueResizeList, dw::core::style::StyleImage::removeExternalImgRenderer(), dw::core::Platform::removeIdle(), requestedAnchor, resizeIdleId, scrollIdleId, textZone, topLevel, dw::core::style::Color::unref(), dw::core::style::StyleImage::unref(), view, and widgetAtPoint.
|
private |
Used, when the widget is not allocated yet.
Definition at line 750 of file layout.cc.
References addAnchor().
Referenced by dw::core::Widget::addAnchor(), dw::core::Widget::addAnchor(), and addAnchor().
|
private |
Definition at line 755 of file layout.cc.
References anchorsTable, dStrdup(), dw::core::Layout::Anchor::name, updateAnchor(), dw::core::Layout::Anchor::widget, and dw::core::Layout::Anchor::y.
void dw::core::Layout::addWidget | ( | Widget * | widget | ) |
Definition at line 370 of file layout.cc.
References canvasHeightGreater, dw::core::Widget::container, DBG_OBJ_ASSOC, DBG_OBJ_SET_PTR_O, DBG_OBJ_SET_SYM, findtextState, dw::IMPL_POS, dw::core::Widget::layout, MSG_WARN, dw::core::Widget::notifySetAsTopLevel(), dw::core::Widget::queueResize(), queueResizeList, dw::core::FindtextState::setWidget(), dw::core::Widget::stackingContextMgr, dw::core::Widget::stackingContextWidget, and topLevel.
Referenced by setWidget().
|
private |
Definition at line 631 of file layout.cc.
References _MSG, canvasAscent, canvasDescent, canvasWidth, hScrollbarThickness, lout::misc::max(), lout::misc::min(), scrollX, scrollY, viewportHeight, viewportWidth, and vScrollbarThickness.
Referenced by scrollIdle().
void dw::core::Layout::attachView | ( | View * | view | ) |
Attach a view to the layout.
It will become a child of the layout, and so it will be destroyed, when the layout will be destroyed.
Definition at line 458 of file layout.cc.
References dw::core::Platform::attachView(), bgColor, canvasAscent, canvasDescent, canvasWidth, cursor, DBG_OBJ_ASSOC_CHILD, DBG_OBJ_SET_NUM, dw::core::View::getHScrollbarThickness(), dw::core::View::getVScrollbarThickness(), hScrollbarThickness, lout::misc::max(), MSG_ERR, platform, dw::core::View::scrollTo(), scrollX, scrollY, dw::core::View::setBgColor(), dw::core::View::setCanvasSize(), dw::core::View::setCursor(), dw::core::View::setLayout(), dw::core::View::setViewportSize(), usesViewport, dw::core::View::usesViewport(), view, viewportHeight, viewportWidth, and vScrollbarThickness.
Referenced by dw::fltk::ui::FltkComplexButtonResource::createNewWidget(), main(), dw::fltk::ui::FltkComplexButtonResource::setLayout(), and UIcmd_tab_new().
|
private |
Definition at line 1046 of file layout.cc.
References moveToWidgetAtPoint(), and processMouseEvent().
Referenced by buttonPress(), and buttonRelease().
|
inline |
This function is called by a view, to delegate a button press event.
numPressed is 1 for simple presses, 2 for double presses etc. (more that 2 is never needed), x and y the world coordinates, and button the number of the button pressed.
Definition at line 314 of file layout.hh.
References BUTTON_PRESS, buttonEvent(), and view.
Referenced by dw::fltk::FltkViewBase::handle().
|
inline |
This function is called by a view, to delegate a button press event.
Arguments are similar to dw::core::Layout::buttonPress.
Definition at line 328 of file layout.hh.
References BUTTON_RELEASE, buttonEvent(), and view.
Referenced by dw::fltk::FltkViewBase::handle().
|
staticprivate |
Definition at line 644 of file layout.cc.
Referenced by scrollIdle().
|
inline |
Definition at line 404 of file layout.hh.
References dw::core::Platform::cancelTooltip(), and platform.
Referenced by dw::fltk::FltkViewBase::handle().
|
private |
Definition at line 773 of file layout.cc.
References anchorsTable, updateAnchor(), dw::core::Layout::Anchor::widget, and dw::core::Layout::Anchor::y.
Referenced by dw::core::Widget::changeAnchor().
|
inline |
Definition at line 425 of file layout.hh.
References dw::core::Layout::Emitter::connectLayout(), and emitter.
|
inline |
Definition at line 258 of file layout.hh.
References dw::core::Layout::LinkEmitter::connectLink(), and linkEmitter.
Referenced by main().
void dw::core::Layout::containerSizeChanged | ( | ) |
Definition at line 1342 of file layout.cc.
References dw::core::Widget::containerSizeChanged(), DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, queueResize(), and topLevel.
Referenced by resizeIdle(), and viewportSizeChanged().
|
inline |
Definition at line 415 of file layout.hh.
References dw::core::Platform::copySelection(), and platform.
Referenced by a_UIcmd_copy_urlstr(), and dw::core::SelectionState::copy().
|
inline |
Definition at line 394 of file layout.hh.
References dw::core::Platform::createColor(), and platform.
|
inline |
Definition at line 384 of file layout.hh.
References dw::core::Platform::createFont(), and platform.
|
inline |
Definition at line 409 of file layout.hh.
References dw::core::Platform::createImgbuf(), and platform.
Referenced by imageInitTimeout(), imageInitTimeout(), imageInitTimeout(), imageInitTimeout(), solution1(), solution2(), and solution3().
|
inline |
Definition at line 399 of file layout.hh.
References dw::core::Platform::createTooltip(), and platform.
|
private |
Definition at line 723 of file layout.cc.
References canvasWidth, hScrollbarThickness, and viewportWidth.
Referenced by processMouseEvent(), resizeIdle(), and scrollIdle().
|
private |
Definition at line 728 of file layout.cc.
References canvasAscent, canvasDescent, viewportHeight, and vScrollbarThickness.
Referenced by processMouseEvent(), resizeIdle(), and scrollIdle().
void dw::core::Layout::detachView | ( | View * | view | ) |
Definition at line 510 of file layout.cc.
References dw::core::Platform::detachView(), MSG_ERR, platform, dw::core::View::setLayout(), and view.
|
private |
Definition at line 350 of file layout.cc.
References detachWidget(), dw::core::Iterator::getContent(), dw::core::Widget::iterator(), dw::core::Widget::layout, dw::core::Iterator::next(), dw::core::Iterator::unref(), dw::core::Content::widget, dw::core::Content::WIDGET_IN_FLOW, and dw::core::Content::WIDGET_OOF_CONT.
Referenced by detachWidget(), and ~Layout().
|
inline |
Definition at line 374 of file layout.hh.
References dw::core::Platform::dpiX(), and platform.
Referenced by StyleEngine::StyleEngine().
|
inline |
Definition at line 379 of file layout.hh.
References dw::core::Platform::dpiY(), and platform.
Definition at line 669 of file layout.cc.
References dw::core::Widget::allocation, bgAttachment, bgImage, bgPositionX, bgPositionY, bgRepeat, canvasAscent, canvasDescent, canvasHeightGreater, canvasWidth, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, dw::core::Widget::draw(), drawAfterScrollReq, dw::core::style::drawBackgroundImage(), dw::core::View::finishDrawing(), dw::core::Widget::getHeight(), dw::core::style::StyleImage::getImgbufSrc(), dw::core::Rectangle::height, hScrollbarThickness, dw::core::Rectangle::intersectsWith(), lout::misc::max(), scrollIdleId, dw::core::View::startDrawing(), topLevel, view, viewportHeight, viewportWidth, vScrollbarThickness, dw::core::Rectangle::width, dw::core::Allocation::width, dw::core::Rectangle::x, dw::core::Allocation::x, dw::core::Rectangle::y, and dw::core::Allocation::y.
Referenced by expose().
|
inline |
Definition at line 272 of file layout.hh.
References dw::core::Layout::LinkEmitter::emitClick(), and linkEmitter.
Referenced by dw::core::SelectionState::buttonRelease().
|
inline |
Definition at line 261 of file layout.hh.
References dw::core::Layout::LinkEmitter::emitEnter(), and linkEmitter.
Referenced by dw::Textblock::leaveNotifyImpl(), and dw::Textblock::motionNotifyImpl().
|
inline |
Definition at line 264 of file layout.hh.
References dw::core::Layout::LinkEmitter::emitPress(), and linkEmitter.
Referenced by dw::core::SelectionState::buttonPress(), and processMouseEvent().
|
inline |
Definition at line 268 of file layout.hh.
References dw::core::Layout::LinkEmitter::emitRelease(), and linkEmitter.
Referenced by dw::core::SelectionState::buttonRelease(), and processMouseEvent().
void dw::core::Layout::enterNotify | ( | View * | view, |
int | x, | ||
int | y, | ||
ButtonState | state | ||
) |
This function is called by a view, to delegate a enter notify event.
Arguments are similar to dw::core::Layout::buttonPress.
Definition at line 1087 of file layout.cc.
References dw::core::Widget::enterNotify(), moveToWidgetAtPoint(), and widgetAtPoint.
Referenced by dw::fltk::FltkViewBase::handle().
|
inlineprivate |
Definition at line 299 of file layout.hh.
References DBG_OBJ_ENTER, DBG_OBJ_LEAVE, draw(), dw::core::Rectangle::height, view, dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.
Referenced by dw::fltk::FltkViewBase::draw().
|
inline |
Definition at line 389 of file layout.hh.
References dw::core::Platform::fontExists(), and platform.
|
inline |
Definition at line 442 of file layout.hh.
References bgColor.
Referenced by dw::core::Widget::drawWidgetBox(), and dw::core::Widget::getBgColor().
|
inline |
|
inline |
Definition at line 286 of file layout.hh.
References viewportHeight.
Referenced by StyleEngine::computeValue(), and dw::core::Iterator::scrollTo().
|
inline |
Definition at line 342 of file layout.hh.
References platform.
Referenced by dw::Textblock::hyphenateWord().
|
inline |
Definition at line 420 of file layout.hh.
References dw::core::Platform::getResourceFactory(), and platform.
Referenced by main().
|
inline |
Definition at line 287 of file layout.hh.
References scrollX.
Referenced by a_UIcmd_get_scroll_xy().
|
inline |
Definition at line 288 of file layout.hh.
References scrollY.
Referenced by a_UIcmd_get_scroll_xy().
|
inline |
Definition at line 284 of file layout.hh.
References usesViewport.
Referenced by dw::Textblock::calcLineBreakWidth(), and dw::core::Iterator::scrollTo().
|
private |
Definition at line 1131 of file layout.cc.
References DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, dw::core::Widget::getWidgetAtPoint(), topLevel, and dw::core::Widget::wasAllocated().
Referenced by moveToWidgetAtPoint(), and processMouseEvent().
|
inline |
Definition at line 285 of file layout.hh.
References viewportWidth.
Referenced by dw::Textblock::calcLineBreakWidth(), StyleEngine::computeValue(), and dw::core::Iterator::scrollTo().
void dw::core::Layout::leaveNotify | ( | View * | view, |
ButtonState | state | ||
) |
This function is called by a view, to delegate a leave notify event.
Arguments are similar to dw::core::Layout::buttonPress.
Definition at line 1108 of file layout.cc.
References dw::core::Widget::leaveNotify(), moveOutOfView(), and widgetAtPoint.
Referenced by dw::fltk::FltkViewBase::handle().
|
inlineprivate |
bool dw::core::Layout::motionNotify | ( | View * | view, |
int | x, | ||
int | y, | ||
ButtonState | state | ||
) |
This function is called by a view, to delegate a motion notify event.
Arguments are similar to dw::core::Layout::buttonPress.
Definition at line 1069 of file layout.cc.
References MOTION_NOTIFY, moveToWidgetAtPoint(), and processMouseEvent().
Referenced by dw::fltk::FltkViewBase::handle(), and dw::fltk::FltkViewport::positionChanged().
|
inlineprivate |
Emit the necessary crossing events, when the mouse pointer has moved out of the view.
Definition at line 208 of file layout.hh.
References moveToWidget().
Referenced by leaveNotify().
|
private |
Definition at line 1152 of file layout.cc.
References dw::core::EventCrossing::currentWidget, DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, dw::core::Widget::enterNotify(), dw::core::Widget::getNearestCommonAncestor(), dw::core::Widget::getParent(), dw::core::Widget::getTopLevel(), dw::core::EventCrossing::lastWidget, dw::core::Widget::leaveNotify(), MSG, dw::core::MouseEvent::state, updateCursor(), and widgetAtPoint.
Referenced by moveOutOfView(), and moveToWidgetAtPoint().
|
inlineprivate |
Emit the necessary crossing events, when the mouse pointer has moved to position (x, );.
Definition at line 201 of file layout.hh.
References getWidgetAtPoint(), and moveToWidget().
Referenced by buttonEvent(), enterNotify(), and motionNotify().
|
inline |
Definition at line 364 of file layout.hh.
References dw::core::Platform::nextGlyph(), and platform.
Referenced by dw::fltk::FltkWidgetView::drawText(), dw::Textblock::drawText(), dw::Textblock::sendSelectionEvent(), and dw::Textblock::textWidth().
|
inline |
Definition at line 369 of file layout.hh.
References platform, and dw::core::Platform::prevGlyph().
|
private |
Common processing of press, release and motion events.
This function depends on that move_to_widget_at_point() has been called before.
Definition at line 1243 of file layout.cc.
References lout::misc::assertNotReached(), BUTTON_PRESS, BUTTON_RELEASE, dw::core::Widget::buttonPress(), dw::core::Widget::buttonRelease(), canvasAscent, canvasDescent, currHScrollbarThickness(), currVScrollbarThickness(), emitLinkPress(), emitLinkRelease(), dw::core::Widget::getAllocation(), dw::core::Widget::getParent(), getWidgetAtPoint(), dw::core::Widget::isButtonSensitive(), lout::misc::min(), MOTION_NOTIFY, dw::core::Widget::motionNotify(), scrollX, scrollY, viewportHeight, viewportWidth, dw::core::Allocation::x, dw::core::MousePositionEvent::xCanvas, dw::core::Allocation::y, and dw::core::MousePositionEvent::yCanvas.
Referenced by buttonEvent(), and motionNotify().
|
private |
Definition at line 990 of file layout.cc.
References dw::core::Rectangle::height, dw::core::Rectangle::isEmpty(), dw::core::View::queueDraw(), view, dw::core::Rectangle::width, dw::core::Rectangle::x, and dw::core::Rectangle::y.
Referenced by dw::core::Widget::queueDrawArea(), and queueDrawExcept().
|
private |
Definition at line 1003 of file layout.cc.
References lout::misc::max(), lout::misc::min(), and queueDraw().
Referenced by dw::core::Widget::sizeAllocate().
|
private |
Definition at line 1026 of file layout.cc.
References dw::core::Platform::addIdle(), dw::core::View::cancelQueueDraw(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, dw::core::Layout::Emitter::emitResizeQueued(), emitter, platform, resizeIdle(), resizeIdleId, and view.
Referenced by containerSizeChanged(), and dw::core::Widget::queueResize().
|
private |
Definition at line 783 of file layout.cc.
References anchorsTable.
Referenced by dw::core::Widget::removeAnchor().
|
private |
Definition at line 405 of file layout.cc.
References canvasAscent, canvasDescent, canvasWidth, dw::core::Layout::Emitter::emitCanvasSizeChanged(), emitter, findtextState, dw::core::View::queueDrawTotal(), queueResizeList, dw::core::SelectionState::reset(), scrollX, scrollY, selectionState, setAnchor(), dw::core::View::setCanvasSize(), dw::core::View::setViewportSize(), dw::core::FindtextState::setWidget(), topLevel, updateAnchor(), updateCursor(), dw::core::View::usesViewport(), view, viewportHeight, viewportWidth, and widgetAtPoint.
Referenced by dw::core::Widget::~Widget().
|
inline |
See dw::core::FindtextState::resetSearch.
Definition at line 434 of file layout.hh.
References findtextState, and dw::core::FindtextState::resetSearch().
Referenced by a_UIcmd_findtext_reset(), and resetCallback().
|
private |
Definition at line 869 of file layout.cc.
References dw::core::Widget::ALLOCATE_QUEUED, dw::core::Widget::allocateQueued(), dw::core::Allocation::ascent, dw::core::Requisition::ascent, canvasAscent, canvasDescent, canvasHeightGreater, canvasWidth, containerSizeChanged(), currHScrollbarThickness(), currVScrollbarThickness(), DBG_OBJ_ENTER0, DBG_OBJ_LEAVE, DBG_OBJ_MSGF, DBG_OBJ_SET_SYM, dw::core::Allocation::descent, dw::core::Requisition::descent, dw::core::Layout::Emitter::emitCanvasSizeChanged(), emitter, enterResizeIdle(), dw::core::Widget::EXTREMES_CHANGED, dw::core::Widget::EXTREMES_QUEUED, dw::core::Widget::extremesQueued(), dw::core::View::getScrollbarOnLeft(), leaveResizeIdle(), MSG_ERR, MSG_WARN, dw::core::Widget::NEEDS_ALLOCATE, dw::core::Widget::NEEDS_RESIZE, dw::core::Widget::needsAllocate(), dw::core::Widget::needsResize(), queueResizeList, dw::core::Widget::RESIZE_QUEUED, resizeCounter, resizeIdleId, dw::core::Widget::resizeQueued(), dw::core::View::setCanvasSize(), dw::core::Widget::setFlags(), dw::core::View::setViewportSize(), dw::core::Widget::sizeAllocate(), dw::core::Widget::sizeRequest(), topLevel, dw::core::Widget::unsetFlags(), updateAnchor(), usesViewport, view, viewportHeight, viewportWidth, dw::core::Allocation::width, dw::core::Requisition::width, dw::core::Allocation::x, and dw::core::Allocation::y.
Referenced by queueResize().
void dw::core::Layout::scroll | ( | ScrollCommand | cmd | ) |
Definition at line 528 of file layout.cc.
References dw::core::View::scroll(), dw::core::View::usesViewport(), and view.
Referenced by a_UIcmd_scroll().
|
private |
Definition at line 569 of file layout.cc.
References adjustScrollPos(), calcScrollInto(), currHScrollbarThickness(), currVScrollbarThickness(), drawAfterScrollReq, dw::core::HPOS_CENTER, dw::core::HPOS_INTO_VIEW, dw::core::HPOS_LEFT, dw::core::HPOS_NO_CHANGE, dw::core::HPOS_RIGHT, dw::core::View::queueDrawTotal(), scrollIdleId, scrollTargetHeight, scrollTargetHpos, scrollTargetVpos, scrollTargetWidth, scrollTargetX, scrollTargetY, dw::core::View::scrollTo(), scrollX, scrollY, view, viewportHeight, viewportWidth, dw::core::VPOS_BOTTOM, dw::core::VPOS_CENTER, dw::core::VPOS_INTO_VIEW, dw::core::VPOS_NO_CHANGE, and dw::core::VPOS_TOP.
Referenced by scrollTo0().
void dw::core::Layout::scrollPosChanged | ( | View * | view, |
int | x, | ||
int | y | ||
) |
Definition at line 1306 of file layout.cc.
References scrollX, scrollY, setAnchor(), and updateAnchor().
Referenced by dw::fltk::FltkPreviewWindow::scrollTo(), and dw::fltk::FltkViewport::scrollTo().
void dw::core::Layout::scrollTo | ( | HPosition | hpos, |
VPosition | vpos, | ||
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
Scrolls all viewports, so that the region [x, y, width, height] is seen, according to hpos and vpos.
Definition at line 538 of file layout.cc.
References scrollTo0().
Referenced by a_UIcmd_set_scroll_xy(), dw::fltk::FltkViewBase::manageTabToFocus(), dw::core::Widget::scrollTo(), and dw::core::Iterator::scrollTo().
|
private |
Definition at line 544 of file layout.cc.
References _MSG, dw::core::Platform::addIdle(), platform, scrollIdle(), scrollIdleId, scrollIdleNotInterrupted, scrollTargetHeight, scrollTargetHpos, scrollTargetVpos, scrollTargetWidth, scrollTargetX, scrollTargetY, and usesViewport.
Referenced by scrollTo(), and updateAnchor().
|
inline |
See dw::core::FindtextState::search.
Definition at line 429 of file layout.hh.
References findtextState, and dw::core::FindtextState::search().
Referenced by a_UIcmd_findtext_search(), and findCallback().
void dw::core::Layout::setAnchor | ( | const char * | anchor | ) |
Sets the anchor to scroll to.
Definition at line 737 of file layout.cc.
References _MSG, dStrdup(), requestedAnchor, and updateAnchor().
Referenced by a_UIcmd_set_scroll_by_fragment(), anchorCallback(), removeWidget(), and scrollPosChanged().
void dw::core::Layout::setBgColor | ( | style::Color * | color | ) |
Definition at line 825 of file layout.cc.
References bgColor, dw::core::style::Color::ref(), dw::core::View::setBgColor(), dw::core::style::Color::unref(), and view.
Referenced by a_Web_dispatch_by_type(), and UIcmd_tab_new().
void dw::core::Layout::setBgImage | ( | style::StyleImage * | bgImage, |
style::BackgroundRepeat | bgRepeat, | ||
style::BackgroundAttachment | bgAttachment, | ||
style::Length | bgPositionX, | ||
style::Length | bgPositionY | ||
) |
Definition at line 838 of file layout.cc.
References bgAttachment, bgImage, bgPositionX, bgPositionY, bgRepeat, layoutImgRenderer, dw::core::style::StyleImage::putExternalImgRenderer(), dw::core::style::StyleImage::ref(), dw::core::style::StyleImage::removeExternalImgRenderer(), and dw::core::style::StyleImage::unref().
Referenced by a_Web_dispatch_by_type(), main(), and UIcmd_tab_new().
|
private |
Definition at line 809 of file layout.cc.
References cursor, dw::core::View::setCursor(), and view.
Referenced by dw::core::Widget::setCursor(), and updateCursor().
|
private |
void dw::core::Layout::setWidget | ( | Widget * | widget | ) |
Definition at line 432 of file layout.cc.
References addWidget(), DBG_OBJ_ASSOC_CHILD, resizeCounter, textZone, topLevel, updateCursor(), widgetAtPoint, and lout::misc::ZoneAllocator::zoneFree().
Referenced by a_Web_dispatch_by_type(), main(), and textTimeout().
|
inline |
Definition at line 359 of file layout.hh.
References platform, and dw::core::Platform::textToLower().
Referenced by dw::Textblock::drawText(), and dw::Textblock::textWidth().
|
inline |
Definition at line 354 of file layout.hh.
References platform, and dw::core::Platform::textToUpper().
Referenced by dw::Textblock::drawText(), and dw::Textblock::textWidth().
|
inline |
Definition at line 349 of file layout.hh.
References platform, and dw::core::Platform::textWidth().
Referenced by dw::Textblock::addText(), dw::Textblock::hyphenateWord(), and dw::Textblock::textWidth().
|
private |
Definition at line 789 of file layout.cc.
References anchorsTable, dw::core::HPOS_NO_CHANGE, platform, dw::core::Platform::removeIdle(), requestedAnchor, scrollIdleId, scrollIdleNotInterrupted, scrollTo0(), dw::core::VPOS_TOP, and dw::core::Layout::Anchor::y.
Referenced by addAnchor(), changeAnchor(), removeWidget(), resizeIdle(), scrollPosChanged(), and setAnchor().
|
private |
Definition at line 817 of file layout.cc.
References dw::core::style::StyleAttrs::cursor, dw::core::style::CURSOR_DEFAULT, setCursor(), dw::core::Widget::style, and widgetAtPoint.
Referenced by moveToWidget(), removeWidget(), dw::core::Widget::setStyle(), and setWidget().
void dw::core::Layout::viewportSizeChanged | ( | View * | view, |
int | width, | ||
int | height | ||
) |
Definition at line 1321 of file layout.cc.
References canvasHeightGreater, containerSizeChanged(), DBG_OBJ_ENTER, DBG_OBJ_LEAVE, DBG_OBJ_SET_NUM, DBG_OBJ_SET_SYM, view, viewportHeight, and viewportWidth.
Referenced by dw::fltk::FltkViewport::resize(), and dw::fltk::FltkViewBase::setLayout().
|
private |
Definition at line 185 of file layout.hh.
Referenced by addAnchor(), changeAnchor(), Layout(), removeAnchor(), updateAnchor(), and ~Layout().
|
private |
Definition at line 164 of file layout.hh.
Referenced by draw(), and setBgImage().
|
private |
Definition at line 161 of file layout.hh.
Referenced by attachView(), getBgColor(), Layout(), setBgColor(), and ~Layout().
|
private |
Definition at line 162 of file layout.hh.
Referenced by draw(), getBgImage(), Layout(), setBgImage(), and ~Layout().
|
private |
Definition at line 165 of file layout.hh.
Referenced by draw(), and setBgImage().
|
private |
Definition at line 165 of file layout.hh.
Referenced by draw(), and setBgImage().
|
private |
Definition at line 163 of file layout.hh.
Referenced by draw(), and setBgImage().
|
private |
Definition at line 168 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), currVScrollbarThickness(), draw(), Layout(), processMouseEvent(), removeWidget(), and resizeIdle().
|
private |
Definition at line 168 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), currVScrollbarThickness(), draw(), Layout(), processMouseEvent(), removeWidget(), and resizeIdle().
|
private |
Definition at line 172 of file layout.hh.
Referenced by addWidget(), dw::core::Widget::correctExtremes(), dw::core::Widget::correctRequisitionViewport(), draw(), dw::core::Widget::getAvailWidth(), resizeIdle(), and viewportSizeChanged().
|
private |
Definition at line 168 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), currHScrollbarThickness(), draw(), Layout(), removeWidget(), and resizeIdle().
|
private |
Definition at line 167 of file layout.hh.
Referenced by attachView(), Layout(), and setCursor().
|
private |
Definition at line 170 of file layout.hh.
Referenced by draw(), Layout(), and scrollIdle().
|
private |
Definition at line 143 of file layout.hh.
Referenced by connect(), queueResize(), removeWidget(), and resizeIdle().
|
private |
Definition at line 188 of file layout.hh.
Referenced by addWidget(), Layout(), removeWidget(), resetSearch(), and search().
|
private |
Definition at line 249 of file layout.hh.
Referenced by dw::core::Widget::enterGetExtremes(), dw::core::Widget::getExtremesEntered(), Layout(), and dw::core::Widget::leaveGetExtremes().
|
private |
Definition at line 173 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), currHScrollbarThickness(), draw(), and Layout().
|
private |
Definition at line 39 of file layout.hh.
Referenced by Layout(), setBgImage(), and ~Layout().
LinkEmitter dw::core::Layout::linkEmitter |
Definition at line 124 of file layout.hh.
Referenced by connectLink(), emitLinkClick(), emitLinkEnter(), emitLinkPress(), and emitLinkRelease().
|
private |
Definition at line 155 of file layout.hh.
Referenced by attachView(), cancelTooltip(), copySelection(), createColor(), createFont(), createImgbuf(), createTooltip(), detachView(), dpiX(), dpiY(), fontExists(), getPlatform(), getResourceFactory(), Layout(), nextGlyph(), prevGlyph(), queueResize(), scrollTo0(), textToLower(), textToUpper(), textWidth(), updateAnchor(), and ~Layout().
|
private |
Definition at line 248 of file layout.hh.
Referenced by dw::core::Widget::enterQueueResize(), Layout(), dw::core::Widget::leaveQueueResize(), and dw::core::Widget::queueResizeEntered().
|
private |
Definition at line 158 of file layout.hh.
Referenced by addWidget(), Layout(), dw::core::Widget::queueResize(), removeWidget(), resizeIdle(), and ~Layout().
|
private |
Definition at line 179 of file layout.hh.
Referenced by Layout(), setAnchor(), updateAnchor(), and ~Layout().
|
private |
Definition at line 249 of file layout.hh.
Referenced by Layout(), resizeIdle(), and setWidget().
|
private |
Definition at line 248 of file layout.hh.
Referenced by enterResizeIdle(), Layout(), leaveResizeIdle(), and dw::core::Widget::resizeIdleEntered().
|
private |
Definition at line 180 of file layout.hh.
Referenced by Layout(), queueResize(), resizeIdle(), and ~Layout().
|
private |
Definition at line 180 of file layout.hh.
Referenced by draw(), Layout(), scrollIdle(), scrollTo0(), updateAnchor(), and ~Layout().
|
private |
Definition at line 181 of file layout.hh.
Referenced by Layout(), scrollTo0(), and updateAnchor().
|
private |
Definition at line 177 of file layout.hh.
Referenced by scrollIdle(), and scrollTo0().
|
private |
Definition at line 175 of file layout.hh.
Referenced by scrollIdle(), and scrollTo0().
|
private |
Definition at line 176 of file layout.hh.
Referenced by scrollIdle(), and scrollTo0().
|
private |
Definition at line 177 of file layout.hh.
Referenced by scrollIdle(), and scrollTo0().
|
private |
Definition at line 177 of file layout.hh.
Referenced by scrollIdle(), and scrollTo0().
|
private |
Definition at line 177 of file layout.hh.
Referenced by scrollIdle(), and scrollTo0().
|
private |
Definition at line 171 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), getScrollPosX(), Layout(), processMouseEvent(), removeWidget(), scrollIdle(), and scrollPosChanged().
|
private |
Definition at line 171 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), getScrollPosY(), Layout(), processMouseEvent(), removeWidget(), scrollIdle(), and scrollPosChanged().
|
private |
Definition at line 187 of file layout.hh.
Referenced by Layout(), removeWidget(), and dw::core::Widget::selectionHandleEvent().
|
private |
Definition at line 248 of file layout.hh.
Referenced by dw::core::Widget::enterSizeAllocate(), Layout(), dw::core::Widget::leaveSizeAllocate(), and dw::core::Widget::sizeAllocateEntered().
|
private |
Definition at line 249 of file layout.hh.
Referenced by dw::core::Widget::enterSizeRequest(), Layout(), dw::core::Widget::leaveSizeRequest(), and dw::core::Widget::sizeRequestEntered().
lout::misc::ZoneAllocator* dw::core::Layout::textZone |
Definition at line 276 of file layout.hh.
Referenced by dw::Textblock::addText0(), dw::Textblock::hyphenateWord(), Layout(), setWidget(), and ~Layout().
|
private |
Definition at line 157 of file layout.hh.
Referenced by addWidget(), containerSizeChanged(), draw(), dw::core::Widget::drawInterruption(), getWidgetAtPoint(), Layout(), removeWidget(), resizeIdle(), setWidget(), and ~Layout().
|
private |
Definition at line 170 of file layout.hh.
Referenced by attachView(), getUsesViewport(), Layout(), resizeIdle(), and scrollTo0().
|
private |
Definition at line 156 of file layout.hh.
Referenced by attachView(), buttonPress(), buttonRelease(), detachView(), draw(), expose(), Layout(), queueDraw(), queueResize(), removeWidget(), resizeIdle(), scroll(), scrollIdle(), setBgColor(), setCursor(), viewportSizeChanged(), and ~Layout().
|
private |
Definition at line 171 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), dw::core::Widget::correctRequisitionViewport(), currVScrollbarThickness(), draw(), dw::core::Widget::getAvailHeight(), getHeightViewport(), Layout(), processMouseEvent(), removeWidget(), resizeIdle(), scrollIdle(), and viewportSizeChanged().
|
private |
Definition at line 171 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), dw::core::Widget::correctExtremes(), dw::core::Widget::correctRequisitionViewport(), currHScrollbarThickness(), draw(), dw::core::Widget::getAvailWidth(), getWidthViewport(), Layout(), processMouseEvent(), removeWidget(), resizeIdle(), scrollIdle(), and viewportSizeChanged().
|
private |
Definition at line 173 of file layout.hh.
Referenced by adjustScrollPos(), attachView(), dw::core::Widget::correctExtremes(), dw::core::Widget::correctRequisitionViewport(), currVScrollbarThickness(), draw(), dw::core::Widget::getAvailWidth(), and Layout().
|
private |
Definition at line 157 of file layout.hh.
Referenced by enterNotify(), Layout(), leaveNotify(), moveToWidget(), removeWidget(), setWidget(), updateCursor(), and ~Layout().