Browser
Go to the documentation of this file.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGWIDGET_BROWSER
#define OSGWIDGET_BROWSER
#include <osgWidget/PdfReader>
namespace osgWidget {
class BrowserImage;
class OSGWIDGET_EXPORT BrowserManager : public osg::Object
{
public:
static osg::ref_ptr<BrowserManager>& instance();
virtual void init(const std::string& application);
void setApplication(const std::string& application) { _application = application; }
const std::string& getApplication() const { return _application; }
virtual BrowserImage* createBrowserImage(const std::string& url, int width, int height);
protected:
BrowserManager();
BrowserManager(const BrowserManager& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(rhs,copyop) {}
virtual ~BrowserManager();
META_Object(osgWidget,BrowserManager);
std::string _application;
};
class BrowserImage : public osg::Image
{
public:
BrowserImage() {}
virtual void navigateTo(const std::string& url) = 0;
protected:
virtual ~BrowserImage() {}
};
class OSGWIDGET_EXPORT Browser : public osg::Geode
{
public:
Browser() {}
Browser(const std::string& url, const GeometryHints& hints = GeometryHints());
bool assign(BrowserImage* browserImage, const GeometryHints& hints = GeometryHints());
bool open(const std::string& url, const GeometryHints& hints = GeometryHints());
void navigateTo(const std::string& url);
protected:
osg::ref_ptr<BrowserImage> _browserImage;
};
}
#endif
PdfReader
osgWidget::BrowserImage
Definition Browser:54
osgWidget::BrowserImage::BrowserImage
BrowserImage()
Definition Browser:57
osgWidget::BrowserImage::navigateTo
virtual void navigateTo(const std::string &url)=0
osgWidget::BrowserImage::~BrowserImage
virtual ~BrowserImage()
Definition Browser:63
osgWidget::BrowserManager::BrowserManager
BrowserManager()
osgWidget::BrowserManager::setApplication
void setApplication(const std::string &application)
Definition Browser:32
osgWidget::BrowserManager::META_Object
META_Object(osgWidget, BrowserManager)
osgWidget::BrowserManager::getApplication
const std::string & getApplication() const
Definition Browser:33
osgWidget::BrowserManager::instance
static osg::ref_ptr< BrowserManager > & instance()
osgWidget::BrowserManager::_application
std::string _application
Definition Browser:47
osgWidget::BrowserManager::~BrowserManager
virtual ~BrowserManager()
osgWidget::BrowserManager::BrowserManager
BrowserManager(const BrowserManager &rhs, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
Definition Browser:40
osgWidget::BrowserManager::createBrowserImage
virtual BrowserImage * createBrowserImage(const std::string &url, int width, int height)
osgWidget::BrowserManager::init
virtual void init(const std::string &application)
osgWidget::Browser::open
bool open(const std::string &url, const GeometryHints &hints=GeometryHints())
osgWidget::Browser::navigateTo
void navigateTo(const std::string &url)
osgWidget::Browser::_browserImage
osg::ref_ptr< BrowserImage > _browserImage
Definition Browser:85
osgWidget::Browser::Browser
Browser(const std::string &url, const GeometryHints &hints=GeometryHints())
osgWidget::Browser::Browser
Browser()
Definition Browser:73
osgWidget::Browser::assign
bool assign(BrowserImage *browserImage, const GeometryHints &hints=GeometryHints())
osg::CopyOp
Definition CopyOp:41
osg::CopyOp::SHALLOW_COPY
@ SHALLOW_COPY
Definition CopyOp:47
osg::Geode
Definition Geode:29
osg::Image
Definition Image:179
osg::Object
Definition Object:61
osg::Object::Object
Object()
Definition Object:69
osg::ref_ptr
Definition ref_ptr:32
osgWidget
Definition Box:21
osg
Definition AlphaFunc:19
OSGWIDGET_EXPORT
#define OSGWIDGET_EXPORT
Definition osgWidget/Export:42
osgWidget::GeometryHints
Definition PdfReader:27