#include <CSLayoutManager.h>
Inheritance diagram for CSLayoutManagerXY:
Public Member Functions | |
virtual std::string | getType () |
CSLayoutManagerXY () | |
virtual | ~CSLayoutManagerXY () |
virtual int | getMinimumWidth (CSGrafikElement *element) |
virtual int | getMinimumHeight (CSGrafikElement *element) |
void | setComponentSizeOnly (bool b) |
Static Public Attributes | |
const char * | CLASS = "CSLayoutManagerXY" |
Protected Member Functions | |
virtual void | layoutElements () |
Protected Attributes | |
bool | mComponentSizeOnly |
|
Definition at line 152 of file CSLayoutManager.h. References mComponentSizeOnly.
00152 {mComponentSizeOnly = false;} |
|
Definition at line 153 of file CSLayoutManager.h.
00153 {} |
|
cannot be stretched or centered! horizontal/vertical spacing don't make sense with XY Layout -> settings are ignored! Reimplemented from CSLayoutManager. Definition at line 278 of file CSLayoutManager.cpp. References CSGrafikElements, CSLayoutManager::getElements(), CSLayoutManager::getHostingElement(), CSLayoutManager::getLayoutData(), CSGrafikElement::getLayoutManager(), CSLayoutManager::getMinimumHeight(), CSLayoutManager::getMinimumWidth(), CSLayoutData::getPackedHorizontal(), CSLayoutData::getPackedVertical(), CSGrafikElement::getVisible(), CSLayoutData::getX(), CSLayoutData::getY(), and CSLayoutManager::setLayout().
00279 { 00280 CSGrafikElement *host = getHostingElement(); 00281 if (host == 0) 00282 { 00283 return; 00284 } 00285 00286 CSLayoutData *layoutData = getLayoutData(host); 00287 00288 CSGrafikElements *elements = getElements(host); 00289 if (elements != 0) 00290 { 00291 CSGrafikElements::iterator iter = elements->begin(); 00292 while (iter != elements->end()) 00293 { 00294 CSGrafikElement *visitor = *iter; 00295 if (!visitor->getVisible()) 00296 { 00297 iter++; 00298 continue; 00299 } 00300 CSLayoutData *visitorLayoutData = getLayoutData(visitor); 00301 int x = visitorLayoutData->getX(); 00302 int y = visitorLayoutData->getY(); 00303 int w = -1; 00304 int h = -1; 00305 00306 if (visitorLayoutData->getPackedVertical()) 00307 { 00308 h = visitor->getLayoutManager()->getMinimumHeight(visitor); 00309 } 00310 if (visitorLayoutData->getPackedHorizontal()) 00311 { 00312 w = visitor->getLayoutManager()->getMinimumWidth(visitor); 00313 } 00314 setLayout(visitor, x , y, w, h); 00315 iter++; 00316 } 00317 } 00318 } |
Here is the call graph for this function:
|
Reimplemented from CSLayoutManager. Definition at line 151 of file CSLayoutManager.h. References CLASS.
00151 {return (std::string) CLASS;} |
|
Implements CSLayoutManager. Definition at line 1509 of file CSLayoutManager.cpp. References CSGrafikElements, CSLayoutManager::getBorderWidth(), CSLayoutManager::getElements(), CSLayoutManager::getInsetWidth(), CSGrafikElement::getLayoutData(), CSLayoutManager::getLayoutData(), CSGrafikElement::getLayoutManager(), CSLayoutManager::getMinimumWidth(), CSLayoutManager::getMinWidth(), CSGrafikElement::getVisible(), CSLayoutData::getX(), and mComponentSizeOnly.
01510 { 01511 if (element == 0) 01512 { 01513 return 0; 01514 } 01515 if (!element->getVisible()) 01516 { 01517 return 0; 01518 } 01519 int width = getMinWidth(element); 01520 CSGrafikElements *elements = getElements(element); 01521 01522 CSLayoutData *layoutData = getLayoutData(element); 01523 01524 if (elements != 0) 01525 { 01526 CSGrafikElements::iterator iter = elements->begin(); 01527 while (iter != elements->end()) 01528 { 01529 CSGrafikElement *visitor = *iter; 01530 if (!visitor->getVisible()) 01531 { 01532 iter++; 01533 continue; 01534 } 01535 CSLayoutData visitorLayoutData = visitor->getLayoutData(); 01536 int w = visitor->getLayoutManager()->getMinimumWidth(visitor); 01537 if (!mComponentSizeOnly) 01538 { 01539 w += visitorLayoutData.getX(); 01540 } 01541 if ( w > width) 01542 { 01543 width = w; 01544 } 01545 iter++; 01546 } 01547 } 01548 width += getInsetWidth(element) + getBorderWidth(element); 01549 return width; 01550 } |
Here is the call graph for this function:
|
Implements CSLayoutManager. Definition at line 1219 of file CSLayoutManager.cpp. References CSGrafikElements, CSLayoutManager::getBorderHeight(), CSLayoutManager::getElements(), CSLayoutManager::getInsetHeight(), CSGrafikElement::getLayoutData(), CSLayoutManager::getLayoutData(), CSGrafikElement::getLayoutManager(), CSLayoutManager::getMinHeight(), CSLayoutManager::getMinimumHeight(), CSGrafikElement::getVisible(), CSLayoutData::getY(), and mComponentSizeOnly.
01220 { 01221 if (element == 0) 01222 { 01223 return 0; 01224 } 01225 if (!element->getVisible()) 01226 { 01227 return 0; 01228 } 01229 int height = getMinHeight(element); 01230 CSGrafikElements *elements = getElements(element); 01231 01232 CSLayoutData *layoutData = getLayoutData(element); 01233 01234 if (elements != 0) 01235 { 01236 CSGrafikElements::iterator iter = elements->begin(); 01237 while (iter != elements->end()) 01238 { 01239 CSGrafikElement *visitor = *iter; 01240 if (!visitor->getVisible()) 01241 { 01242 iter++; 01243 continue; 01244 } 01245 CSLayoutData visitorLayoutData = visitor->getLayoutData(); 01246 int h = visitor->getLayoutManager()->getMinimumHeight(visitor); 01247 if (!mComponentSizeOnly) 01248 { 01249 h += visitorLayoutData.getY(); 01250 } 01251 01252 01253 if ( h > height) 01254 { 01255 height = h; 01256 } 01257 iter++; 01258 } 01259 } 01260 height += getInsetHeight(element) + getBorderHeight(element); 01261 return height; 01262 } |
Here is the call graph for this function:
|
Definition at line 163 of file CSLayoutManager.h. References mComponentSizeOnly. Referenced by CSScrollbar::CSScrollbar().
00163 {mComponentSizeOnly = b;} |
|
Definition at line 148 of file CSLayoutManager.h. Referenced by CSLayoutManagerXY(), getMinimumHeight(), getMinimumWidth(), and setComponentSizeOnly(). |
|
Reimplemented from CSLayoutManager. Definition at line 10 of file CSLayoutManager.cpp. Referenced by getType(). |