Class Visual

Visuals establish a mapping to the underlying mural layer. Upon insertion in a MilleFeuille the MilleFeuille register them to the dispatcher. Subsequent post_redisplay will be sent to the underlying mural layer instead of beind propagated upward. Because of this property additional Visual can be used inside the hierarchy to limit the scope of certain redraw. By default a MilleFeuille tree contained at the root level. Subclass of visual can also be use to access special purpose mural layer like the mpeg player layer. Note that a MilleFeuille tree can have several Visaul mapped to several mural. In particular duplicating a specific subtree on several mural just involved introducing several Visual at the root of the subtree (Of course Feuilles in the subtree should able to render on several mural simultaneously).

Public type

enum LayerStatus {Mapped, UnMapped, UnSet};
LayerStatus is used to described the state of the underlying mural layer. Unset means that the layer was not created yet, Mapped means that the layer is visible on the screen and dispatchs graphical events, UnMapped means that the layer is created but not visible on the screen.

Constructor and destructor

Visual(Mural *new_mural,
       MuralLayer stacking_order = MURAL_IN_FRONT,
       MuralU8 type = MURAL_DYNAMIC_LAYER,
       Mural32 new_x = 0, Mural32 new_y = 0,
       MuralU32 new_widht = DEFAULT_WIDTH,
       MuralU32 new_height = DEFAULT_HEIGHT,
       ObjectType new_type = TypeVisual,
       const char *new_name = "");

new_mural the mural on which the layer should be created
staking_order
is how the mural layer should be staked in respect to other layer (see the mural documentation)
type
is the type of mural layer to create (see the mural documentation)
new_x, new_y
provide the initial position for the feuille,
new_width, new_height
provide the initial width and height of a the feuille (160X120 by default),
new_type provide the type of the object being created
new_name provide an optional name.

virtual ~Visual();

Public methods

void map();
map map the uderlying mural layer on the screen.
void unmap();
unmap unmap the underlying layer from the screen.
virtual void post_redisplay();
post_redisplay stop the upward propagation and post_redisplay to the underlying mural layer.
inline Mural *get_mural();
get_mural returns the mural on which the underlying mural layer was created.
inline MuralLayer get_layer();
get_layer returns the ID of the underlying mural layer.
inline LayerStatus get_status();
get_status returns the current status of the underlying mural layer. Unset means that the layer was not created yet, Mapped means that the layer is visible on the screen and dispatchs graphical events, UnMapped means that the layer is created but not visible on the screen.

Protected Methods

None

Public fields

None

Protected fields

None