root/OpenSceneGraph/trunk/src/osgWidget/Canvas.cpp @ 13041

Revision 13041, 0.7 kB (checked in by robert, 3 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
Line 
1// -*-c++-*- osgWidget - Code by: Jeremy Moles (cubicool) 2007-2008
2
3#include <osgWidget/Canvas>
4
5namespace osgWidget {
6
7Canvas::Canvas(const std::string& name):
8Window(name) {
9}
10
11Canvas::Canvas(const Canvas& canvas, const osg::CopyOp& co):
12Window(canvas, co) {
13}
14
15void Canvas::_resizeImplementation(point_type w, point_type h) {
16    // A Canvas has no layout, so it doesn't really know how to honor a resize
17    // request. :) The best I could do here is store the differences and add them
18    // later to the calls to getWidth/getHeight.
19}
20
21bool Canvas::addWidget(Widget* widget, point_type x, point_type y) {
22    if(!widget) return false;
23
24    widget->setOrigin(x, y);
25
26    return Window::addWidget(widget);
27}
28
29}
Note: See TracBrowser for help on using the browser.