40#ifndef GLS_RSO_LOADER_H_INCLUDED
41#define GLS_RSO_LOADER_H_INCLUDED
51class LiveComponentLibRef;
57 unsigned int _rsoVersion;
58 LiveComponentLibRef* _liveComponentLibRef;
85 inline void SetResource(
const char* resourceName,
const char* resourceVal ) { _rso->
SetResource( resourceName, resourceVal ); }
154 void SetProjection(
int controlWidth,
int controlHeight,
float depthFactor = 4.0f,
float fov = 90.0f,
bool perspective =
false );
237 bool SetResource( disti::RSOInterface2::ResourceHandle resourceHandle,
const char* resourceVal );
244 bool GetResource( disti::RSOInterface2::ResourceHandle resourceHandle,
const char*& resourceValue );
257 bool SetIntResource( disti::RSOInterface2::ResourceHandle resourceHandle,
long resourceVal );
270 bool GetIntResource( disti::RSOInterface2::ResourceHandle resourceHandle,
long& resourceVal );
283 bool SetFloatResource( disti::RSOInterface2::ResourceHandle resourceHandle,
double resourceVal );
296 bool GetFloatResource( disti::RSOInterface2::ResourceHandle resourceHandle,
double& resourceVal );
390 int _groupLevelsDown;
391 std::vector<std::string> _excludeList;
392 std::vector<std::string> _includeList;
414 inline void LevelsUp(
int value ) { _levelsUp = value; }
438 inline void NamesOnly(
bool value ) { _namesOnly = value; }
502 typedef void ( T::*Callback )( disti::RSOInterface2::ResourceHandle );
510 virtual void Call( disti::RSOInterface2::ResourceHandle handle )
512 ( _object->*( _method ) )( handle );
515 virtual void Destroy()
Definition: gls_rso_loader.h:371
void ExtractFrustum(disti::RSOInterface1::OpenGLMatrices ¤tMatrices)
Culler(bool enabled=true)
Definition: gls_rso_loader.h:387
int LevelsUp() const
Definition: gls_rso_loader.h:413
const char * GetExclude(int index) const
GlsResourceFilter & operator=(const GlsResourceFilter &rhs)
assignment operator
const char * GetInclude(int index) const
void ClearExcludes()
Removes all entries from the exclude list.
void RemoveExclude(unsigned int index)
GlsResourceFilter(GlsResourceFilter &source)
Copy constructor.
void ClearIncludes()
Removes all entries from the include list.
bool NamesOnly() const
Definition: gls_rso_loader.h:437
int IncludeCount() const
Returns the number of includes in the filter.
virtual bool PassFilter(const char *name) const
Test a resource name against the filter.
int GroupLevelsDown() const
Definition: gls_rso_loader.h:430
void AddInclude(const char *name)
void AddExclude(const char *name)
void RemoveInclude(unsigned int index)
int ExcludeCount() const
Returns the number of exclude entries in the filter.
Definition: gls_rso_loader.h:354
Definition: gls_rso_loader.h:55
RSOReference(disti::RSOInterface1 *, LiveComponentLibRef *, unsigned int)
bool HandleMouseWheelPlus(int x, int y, int buttonMask)
bool GetFloatResource(disti::RSOInterface2::ResourceHandle resourceHandle, double &resourceVal)
disti::RSOInterface1 * GetRSOInterface1()
Definition: gls_rso_loader.h:74
bool SetIntResource(disti::RSOInterface2::ResourceHandle resourceHandle, long resourceVal)
bool HandleKeyUp(int key, int x, int y)
bool HandleMouseUp(int x, int y, int button)
void SetResources(const char *buf)
bool CreateResourceHandle(const char *resourceName, disti::RSOInterface2::ResourceHandle &resourceHandle)
bool GetBoundingBox(disti::RSOInterface1::Vector *min, disti::RSOInterface1::Vector *max, disti::RSOInterface1::MatrixD *transform=0)
bool SetFloatResource(disti::RSOInterface2::ResourceHandle resourceHandle, double resourceVal)
void Draw()
Definition: gls_rso_loader.h:111
bool IsResourceHandleValid(disti::RSOInterface2::ResourceHandle resourceHandle)
const char * GetResource(const char *resourceName)
Definition: gls_rso_loader.h:97
bool SetResource(disti::RSOInterface2::ResourceHandle resourceHandle, const char *resourceVal)
bool ReleaseResourceHandle(disti::RSOInterface2::ResourceHandle resourceHandle)
void SetRedraw(bool redraw)
Definition: gls_rso_loader.h:319
bool GetRedraw()
Definition: gls_rso_loader.h:324
bool HandleKeyDown(int key, int x, int y)
bool UnregisterResourceObserver(disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::CallbackID id)
bool SetFloatResource(const char *resourceName, double resourceVal)
bool HandleMouseDown(int x, int y, int button)
void AbsolutePlacement(bool value)
bool HandleInput(disti::RSOInterface1::Event *ev)
Definition: gls_rso_loader.h:117
void PreDraw(const disti::RSOInterface1::OpenGLMatrices ¤t, disti::RSOInterface1::Culler &culler)
Definition: gls_rso_loader.h:108
void SetProjection(int controlWidth, int controlHeight, float depthFactor=4.0f, float fov=90.0f, bool perspective=false)
unsigned int GetRSOVersion()
Definition: gls_rso_loader.h:79
bool SetEmittedEventHandler(disti::RSOInterface1::EmittedEventHandler *handler)
Definition: gls_rso_loader.h:124
bool RegisterResourceObserver(disti::RSOInterface2::ResourceHandle resourceHandle, disti::RSOInterface4::ResourceObserver *obs, disti::RSOInterface4::CallbackID &id)
bool GetIntResource(disti::RSOInterface2::ResourceHandle resourceHandle, long &resourceVal)
void Invalidate()
Definition: gls_rso_loader.h:314
bool GetIntResource(const char *resourceName, long &resourceVal)
bool GetResource(disti::RSOInterface2::ResourceHandle resourceHandle, const char *&resourceValue)
bool GetFloatResource(const char *resourceName, double &resourceVal)
void GetBackgroundColor(unsigned char &r, unsigned char &g, unsigned char &b, unsigned char &a)
bool SetIntResource(const char *resourceName, long resourceVal)
bool HandleMouseMove(int x, int y, int buttonMask)
bool HandleMouseWheelMinus(int x, int y, int buttonMask)
void SetResource(const char *resourceName, const char *resourceVal)
Definition: gls_rso_loader.h:85
void Calculate(double time)
Definition: gls_rso_loader.h:500
Definition: rso_interface_1.h:291
Definition: rso_interface_1.h:579
Definition: rso_interface_1.h:303
Definition: rso_interface_1.h:210
Definition: rso_interface_1.h:243
Definition: rso_interface_1.h:593
Definition: rso_interface_1.h:186
Definition: rso_interface_1.h:61
virtual bool SetEmittedEventHandler(EmittedEventHandler *handler)=0
virtual void SetResource(const char *resourceName, const char *resourceVal)=0
Set the string value for a given named resource.
virtual bool HandleInput(Event *ev)=0
virtual const char * GetResource(const char *resourceName)=0
Get the string value for the given resource.
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)=0
Definition: rso_interface_4.h:64
unsigned int CallbackID
Type for unique identifiers.
Definition: rso_interface_4.h:79
Definition: rso_interface_5.h:65
Namespace for loading RSOs.
Definition: gls_rso_loader.h:50
RSOReference * LoadRSO(const char *fileName, const char *className=0, bool absolutePlacement=true)
void DestroyRSO(RSOReference *)
void SetOpenGLDefaultState(bool pushState)
disti::RSOInterface4::ResourceObserver * CreateResourceMethodCallback(Class *const obj, const typename ResourceMethodCallback< Class >::Callback method)
Definition: gls_rso_loader.h:530
void RestoreOpenGLState()
Defines the RSO interface v5, which extends v4 to add conditional rendering support.