| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The children container of a container have to be notified if the
window coordinates of the parent changed. The children have to
recalculate their own window coordinates.
|
| |
|
| |
|
|
|
|
| |
Add possibility to check whether a Point is inside the rectangle.
|
|
|
|
|
| |
Points could be added to rectangles and moves the rectangle by this
amount.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The Time class does not have any state so the get_time method could be
static. Because the Time class now has only static methods, deny
creation by making the ctor protected.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The size of the parent component is cached by the backgrounds and the
vertices to draw the backgrounds are only calculated again, if the
size of the parent component changed.
|
| |
|
|
|
|
|
| |
Textures are now initialized during their first use, destroyed after
their last used and could be use with the Activator.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
opengl allocation could not be done in the constructor of the opengl
objects. The opengl calls only have effect when called form the opengl
thread, but the objects could be constructed from other threads. The
analogous applies to the destruction. This helper handles the
allocation on first use from the opengl thread and frees the resources
while calling dispose before real destruction (see Disposable). If
dispose is called from the opengl thread, it frees the resources
immediately, but if dispose is called from another thread it
waits (blocks) until the next use from the opengl thread is complete.
|
|
|
|
|
|
|
|
|
| |
The disposer helper should be used to encapsulate disposable
objects. This objects have to cleanup something before deconstruction
and so you need to help dispose before destruction of the object. The
disposer takes care for you. On destruction of the disposer, it calls
dispose of the encapsulated object and then destroy it, too. So you do
not need to remember to call dispose manually.
|
|
|
|
|
|
|
|
|
| |
The activator should be used to encapsulate activatable objects. It
calls enable on construction and disable on deconstruction. It should
be used for example to enable some opengl settings, while the
activator object is used in local scope. It ensures, that the opengl
setting get disabled, if the scope is left even when throwing an
exception.
|
| |
|
| |
|
|
|
|
|
|
|
| |
opengl calls should only executed in the thread, that created the
opengl context. To query whether the current thread is the opengl
thread, the application class stores the current thread id of the
opengl thread after initializing opengl.
|
| |
|
|
|
|
|
|
|
|
|
| |
If auto_size is false the control is setup clipping, so that the
outside parts of the control gets discarded. If auto_size enable, the
drawn parts outside the component rectangle are drawn.
TODO: currently the component dost not really change its size. This
could be necessary for sensible regions.
|
| |
|
| |
|
|
|
|
|
| |
if debug.boxes is true in configuration file, a red border is drawn
around all controls
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The resolution could controlled by the appropriate config option. The
value from the config file is parsed/serialized with the
DimensionTranslator.
|
| |
|
|
|
|
|
|
| |
Some controls modify the modelview matrix during drawing their
contents. Restore it afterwards, so that other parts could be drawn
easily on top.
|
|
|
|
|
| |
Use the new ModelviewMatrixCache to cache the current state of the
opengl MODELVIEW_MATRIX.
|
|
|
|
|
| |
Use everywhere a mutable boost::shared_mutex to enable locking during
const getter and the multiple reader and single writer pattern.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Backgrounds now know the parent control, they are painted in, to query
the size.
Backgrounds are not allowed to use glClear anymore, should only draw
something during the extend of the parent control and should take care
to do not modify the opengl cursor position.
|
|
|
|
|
|
|
|
|
| |
background could now be a background for all DrawableControl instances
each subclass should call the parents draw() during executing the
draw() method for background painting
TODO: background should know the size of the control to only draw the
background there
|
| |
|
|
|
|
|
|
| |
container should provide each of the containing elements' draw
functions with its own position as base (store before drawing the
first element and restore it after each drawing)
|
|
|
|
|
|
| |
the container have to keep the current window coordinates of its left,
bottom corner, therefor they have to be recalculated on every
size/position change (need virtual functions in DrawableControl)
|
| |
|