19 #ifndef EQFABRIC_WINDOW_H
20 #define EQFABRIC_WINDOW_H
22 #include <eq/fabric/object.h>
24 #include <eq/fabric/drawableConfig.h>
25 #include <eq/fabric/paths.h>
26 #include <eq/fabric/pixelViewport.h>
27 #include <eq/fabric/viewport.h>
39 template<
class P,
class W,
class C >
class Window :
public Object
53 const P*
getPipe()
const {
return _pipe; }
62 {
return _data.drawableConfig; }
101 virtual void notifyViewportChanged();
148 IATTR_ALL = IATTR_LAST + 5
153 { _data.iAttributes[attr] = value; }
157 {
return _data.iAttributes[attr]; }
161 const std::string& getIAttributeString(
const IAttribute attr );
165 EQFABRIC_INL WindowPath getPath()
const;
169 EQFABRIC_INL
virtual void backup();
170 EQFABRIC_INL
virtual void restore();
171 void create( C** channel );
172 void release( C* channel );
173 virtual void output( std::ostream& )
const {}
175 EQFABRIC_INL
virtual uint128_t commit(
const uint32_t incarnation =
183 EQFABRIC_INL
virtual ~
Window();
185 virtual void attach(
const UUID&
id,
186 const uint32_t instanceID );
189 EQFABRIC_INL
virtual void serialize( co::DataOStream& os,
190 const uint64_t dirtyBits );
192 EQFABRIC_INL
virtual void deserialize( co::DataIStream& is,
193 const uint64_t dirtyBits );
195 EQFABRIC_INL
virtual void notifyDetach();
198 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits );
201 void _setDrawableConfig(
const DrawableConfig& drawableConfig );
204 virtual ChangeType getChangeType()
const {
return UNBUFFERED; }
206 C* _findChannel(
const UUID&
id );
211 DIRTY_ATTRIBUTES = Object::DIRTY_CUSTOM << 0,
212 DIRTY_CHANNELS = Object::DIRTY_CUSTOM << 1,
213 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 2,
214 DIRTY_DRAWABLECONFIG = Object::DIRTY_CUSTOM << 3,
216 DIRTY_ATTRIBUTES | DIRTY_CHANNELS | DIRTY_VIEWPORT |
217 DIRTY_DRAWABLECONFIG | DIRTY_OBJECT_BITS
221 virtual uint64_t getRedistributableBits()
const
222 {
return DIRTY_WINDOW_BITS; }
236 int32_t iAttributes[ IATTR_ALL ];
239 DrawableConfig drawableConfig;
256 friend class Channel< W, C >;
258 void _addChannel( C* channel );
261 EQFABRIC_INL
bool _removeChannel( C* channel );
264 bool _mapNodeObjects() {
return _pipe->_mapNodeObjects(); }
266 typedef co::CommandFunc< Window< P, W, C > > CmdFunc;
267 bool _cmdNewChannel( co::ICommand& command );
268 bool _cmdNewChannelReply( co::ICommand& command );
271 template<
class P,
class W,
class C > EQFABRIC_INL
272 std::ostream& operator << ( std::ostream& os,
273 const Window< P, W, C >& window );
277 #endif // EQFABRIC_WINDOW_H
const Viewport & getViewport() const
IAttribute
Possible values for integer attributes.
EQFABRIC_INL void setViewport(const Viewport &vp)
Set the window's viewport wrt its parent pipe.
std::vector< C * > Channels
A vector of pointers to channels.
const PixelViewport & getPixelViewport() const
const DrawableConfig & getDrawableConfig() const
A Window represents an on-screen or off-screen drawable.
virtual EQFABRIC_INL void setDirty(const uint64_t bits)
A visitor to traverse non-leaf elements and their children in a tree.
No of per-component color planes.
No of multisample (AA) planes.
Capture mouse outside window.
const P * getPipe() const
Statistics gathering hint.
Holds a 2D pixel viewport with methods for manipulation.
IAttribute
Window attributes.
Stores the characteristics of a window's frame buffer configuration.
bool hasFixedViewport() const
const Channels & getChannels() const
void setIAttribute(const IAttribute attr, const int32_t value)
Set a window attribute.
No of accumulation buffer planes.
No of alpha accum buffer planes.
int32_t getIAttribute(const IAttribute attr) const
virtual EQFABRIC_INL void setPixelViewport(const PixelViewport &pvp)
Set the window's pixel viewport wrt its parent pipe.
Screensaver (de)activation (WGL)
Window, pbuffer, FBO or OFF.
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Perform a depth-first traversal of this window.
A fractional viewport with methods for manipulation.
Swap sync on vertical retrace.
ElementVisitor< W, LeafVisitor< C > > Visitor
The Window visitor type.