Commit Graph

20 Commits

Author SHA1 Message Date
Thilo Graf
53cf57876c CComponents: inherit COSDFader class
Allows a simplified implementation without prior declaration and
initialisation
2014-06-23 18:43:47 +02:00
Thilo Graf
dc007e810a CComponents: use paintBoxRel() only in kill()
paintBackgroundBoxRel() ignores rounded corners. This avoids painting of
undesirable parts on corners.
2014-05-22 21:50:55 +02:00
Thilo Graf
7096e701b6 CComponents/CComponentsItem: use correct background color
color "0" was wrong
2014-05-22 21:50:54 +02:00
Thilo Graf
b6c781f7e4 CComponents: cc_base.h: expand override of is_painted variable
Value of is_painted is modified temporarily till next paint
of item

Not sure whether this is sufficiently or has bad side effects?
2014-05-22 21:50:53 +02:00
Thilo Graf
6a2e701a7a CComponents/CComponentsItem: add advanced version of kill()
kill() allows now paint with defined colors over rendered objects
without restore of background. It's similar to paintBackgroundBoxRel()
known from CFrameBuffer, but with possiblity to define color,
default color is 0 like before (empty background).
Items with parent bindings use the background color of its parent
as default, but can also be ignored.

This function can be useful before repaint of items and/or,
if required, to have a clean background inside item containers.
2014-05-16 09:08:25 +02:00
M. Liebmann
d1b8246316 CComponents: More precise error message (commit f813b9e) 2014-03-03 20:20:57 +01:00
Thilo Graf
23d7b62cf0 CComponents: add new parameter 'parent'
Use strictly CComponentsForm as parent parameter in constructors.
Some parts have been cleaned up (Constructors, init methodes removed)

New parameter makes it possible already add current item in constructor.
So in mostly situations is it not necessary to use explicit addCCItem(),
but addCCItem()is still valid and necessary in certain situations.

Affected are all cc-classes and their derivates.
Some classes must or can be adapted later. The function is
not currently restricted, because usage of parent parameter is not explicit
defined in constructors, see CImageInfo, here yet are used addCCItem()
methodes.

Generally this parameter is located in the constructors before bool has_shadow,
but it is not sure whether it would be better to use this parameter as the first.
That remains to be clarified.
2014-03-03 09:43:39 +01:00
Thilo Graf
a33cad448a CComponentsItem: add methodes to set width and height via percent value
Percent value is related to current screen or parent size
2014-03-03 08:54:10 +01:00
Thilo Graf
9b18d0cf5b CComponentsItem: comments corrected 2014-03-03 08:54:10 +01:00
Thilo Graf
8a897103ac CComponentsItem: move/rename doCenter()to base class CComponentsItem
So it's possible to use this method for all cc-items.
setCenterPos() comes now with parameter 'along_mode' (CC_ALONG_X, CC_ALONG_Y).
So it's possible to center in x or y direction. As default are
both directions predefined.
2014-03-03 08:54:10 +01:00
Thilo Graf
38dffb8456 CComponentsItem: add members to set item position via percent value 2014-03-03 08:54:10 +01:00
Thilo Graf
f813b9ea98 CComponents: add member CheckFbData() for fbdata check
This check happens several times, therefore it is senseful, to move into own member.
Function returns false on error and is used here to show an error message if
something was wrong.
Such errors can happen on position or dimension errors e.g. out of screen or
too large display values.

Note:  this is only an emergency helper for debugging on
fatal errors during developing of window stuff. Mostly errors
of this kind causing crashes and must be fixed.
2014-03-03 08:54:09 +01:00
Thilo Graf
f6d7352dca CComponents: add member to set color for selected items 2014-01-12 13:57:11 +01:00
Thilo Graf
ed7a2fd625 CComponents: replace clear() with clearFbData(), remove cleanCCForm()
clear() replaces now clearCCItems() and cleanCCForm() is superfluous.
2014-01-07 09:41:06 +01:00
[CST] Focus
5f80ab6450 cc_base.h: make private initVarBasic and initVarItem, they are is called from constructors 2013-11-29 17:27:10 +04:00
Thilo Graf
b8bd8c3704 CComponents: move debug enable switch to cc_types.h 2013-11-17 15:19:43 +01:00
Thilo Graf
8ae491a994 CComponents: add property to allow/disallow paint of items
This causes initialization of all properties, but
affects the behavior of item paint.
This can be understood as a counterpart to isPainted().
2013-11-11 00:19:48 +01:00
Thilo Graf
6dd1da0628 revert 6ee7fac1a5
Was bad idea to rename. Other Classes can also inherit this. See CMenuTarget
2013-10-26 23:25:59 +02:00
Thilo Graf
6ee7fac1a5 CComponents: rename hide() to hideCC()
There are too many name conflicts with hide-members in other classes.
2013-10-24 21:39:04 +02:00
Thilo Graf
f7798affc6 CComponents: add unfied header file for general include of cc classes
Provides a unified header file, so it is not required to select a
certain header file.
2013-10-24 21:19:07 +02:00