20 #ifndef EQFABRIC_WINDOW_H 21 #define EQFABRIC_WINDOW_H 23 #include <eq/fabric/object.h> 25 #include <eq/fabric/drawableConfig.h> 26 #include <eq/fabric/paths.h> 27 #include <eq/fabric/pixelViewport.h> 28 #include <eq/fabric/viewport.h> 29 #include <eq/fabric/windowSettings.h> 36 template <
class P,
class W,
class C,
class Settings = WindowSettings>
37 class Window :
public Object
51 const P*
getPipe()
const {
return _pipe; }
59 return _data.drawableConfig;
73 EQFABRIC_INL
void setName(
const std::string& name)
final;
100 virtual void notifyViewportChanged();
109 EQFABRIC_INL VisitorResult
accept(Visitor& visitor);
112 EQFABRIC_INL VisitorResult
accept(Visitor& visitor)
const;
119 EQFABRIC_INL
void setSettings(
const Settings& settings);
126 const int32_t value);
133 EQFABRIC_INL
static const std::string& getIAttributeString(
138 EQFABRIC_INL WindowPath getPath()
const;
142 EQFABRIC_INL
virtual void backup();
143 EQFABRIC_INL
virtual void restore();
144 void create(C** channel);
145 void release(C* channel);
146 virtual void output(std::ostream&)
const {}
148 EQFABRIC_INL
virtual uint128_t commit(
149 const uint32_t incarnation = CO_COMMIT_NEXT);
154 explicit Window(P* parent);
156 EQFABRIC_INL
virtual ~
Window();
158 virtual void attach(
const uint128_t&
id,
const uint32_t instanceID);
161 EQFABRIC_INL
virtual void serialize(co::DataOStream& os,
162 const uint64_t dirtyBits);
164 EQFABRIC_INL
virtual void deserialize(co::DataIStream& is,
165 const uint64_t dirtyBits);
167 EQFABRIC_INL
virtual void notifyDetach();
170 EQFABRIC_INL
virtual void setDirty(
const uint64_t bits);
176 virtual ChangeType getChangeType()
const {
return UNBUFFERED; }
177 C* _findChannel(
const uint128_t&
id);
182 DIRTY_SETTINGS = Object::DIRTY_CUSTOM << 0,
183 DIRTY_CHANNELS = Object::DIRTY_CUSTOM << 1,
184 DIRTY_VIEWPORT = Object::DIRTY_CUSTOM << 2,
185 DIRTY_DRAWABLECONFIG = Object::DIRTY_CUSTOM << 3,
186 DIRTY_WINDOW_BITS = DIRTY_SETTINGS | DIRTY_CHANNELS | DIRTY_VIEWPORT |
187 DIRTY_DRAWABLECONFIG | DIRTY_OBJECT_BITS
191 virtual uint64_t getRedistributableBits()
const 193 return DIRTY_WINDOW_BITS;
208 Settings windowSettings;
229 void _addChannel(C* channel);
232 EQFABRIC_INL
bool _removeChannel(C* channel);
235 bool _mapNodeObjects() {
return _pipe->_mapNodeObjects(); }
236 typedef co::CommandFunc<Window<P, W, C, Settings>> CmdFunc;
237 bool _cmdNewChannel(co::ICommand& command);
238 bool _cmdNewChannelReply(co::ICommand& command);
241 template <
class P,
class W,
class C,
class Settings>
242 EQFABRIC_INL std::ostream&
operator<<(std::ostream& os,
247 #endif // EQFABRIC_WINDOW_H IAttribute
Window attributes.
A fractional viewport with methods for manipulation.
virtual EQFABRIC_INL void setDirty(const uint64_t bits)
const Viewport & getViewport() const
const Channels & getChannels() const
DirtyBits
The changed parts of the object since the last pack().
EQFABRIC_INL VisitorResult accept(Visitor &visitor)
Perform a depth-first traversal of this window.
A visitor to traverse non-leaf elements and their children in a tree.
EQFABRIC_INL const Settings & getSettings() const
EQFABRIC_INL const PixelViewport & getPixelViewport() const
EQFABRIC_INL void setSettings(const Settings &settings)
Set the settings of this window.
EQFABRIC_INL void setIAttribute(const WindowSettings::IAttribute attr, const int32_t value)
Set a window attribute.
bool hasFixedViewport() const
std::vector< C * > Channels
A vector of pointers to channels.
virtual EQFABRIC_INL void setPixelViewport(const PixelViewport &pvp)
Set the window's pixel viewport wrt its parent pipe.
The Equalizer client library.
std::ostream & operator<<(std::ostream &os, const AxisEvent &event)
Print the axis event to the given output stream.
ElementVisitor< W, LeafVisitor< C > > Visitor
The Window visitor type.
Base data transport class for windows.
Base data transport class for channels.
const P * getPipe() const
const DrawableConfig & getDrawableConfig() const
EQFABRIC_INL int32_t getIAttribute(const WindowSettings::IAttribute attr) const
Stores the characteristics of a window's frame buffer configuration.
EQFABRIC_INL void setName(const std::string &name) final
Set the window's name/caption.
EQFABRIC_INL void setViewport(const Viewport &vp)
Set the window's viewport wrt its parent pipe.
Holds a 2D pixel viewport with methods for manipulation.