Commit Graph

40 Commits

Author SHA1 Message Date
Thilo Graf
6952d85ae9 CCDraw: add signals into paintFbItems() 2015-12-27 14:42:32 +01:00
Thilo Graf
0146511f38 components: rework classes
- outsourced some classes cc_item.cpp/h, cc_draw.cpp/h
- added extra methodes for simple use of some basic components extra.cpp/h
- rework clock handling: use timer class, reworked members for
  enable/disable clock with external timer events,
  tryed to fix some display issues related with infoclock and
  time osd clock in moviebrowser, channellist, menuus
- reworked hide/kill handling, removed parameter for hide(), try to use
  cached backgrounds for other constallations, paint cache, image cache (all beta)
- reworked shadow/frame handling, add shadow modes for left/right
  arrangement, TODO: repaint for existant instances required
- reworked color gradient assignment (beta)

... Note: I had a data crash in my local git tree
and i tryed to restore my historie, but most was lost. Therefore here
the commit is large
2015-12-27 14:42:27 +01:00
[CST] Focus
62a9621cb0 gui/components/cc_item.cpp: use theme option for one/two color gradient 2015-05-07 16:39:28 +03:00
TangoCash
a8be4f6365 enable color-to-color gradient 2015-05-04 09:41:41 +02:00
[CST] Focus
53ce471af8 gradient: try to fix delete gradient data only on color change
Signed-off-by: Thilo Graf <dbt@novatux.de>
2015-04-27 09:25:34 +02:00
Thilo Graf
8ebb5f98ca CComponentsItem: add setXPos/setYPos(), that consider real position 2015-03-29 22:39:58 +02:00
[CST] Focus
ab1b3b9008 gui/components/cc_base.cpp: add flag to control CTextBox screen saving, default is false 2015-03-06 14:13:59 +03:00
M. Liebmann
58224099fd CColorGradient::gradientOneColor: Adjustment for min/max brightness...
...and color saturation added
- Use only the hue of base color for gradient
2014-09-25 11:08:22 +04:00
Thilo Graf
f9147d185a CComponents: add setColBodyGradient() to set gradient properties
This provides possibility to set relevant gradiant properties in cc sub classes
2014-09-25 11:08:08 +04:00
Thilo Graf
581405e076 CComponentsItem: move initBodyGradient() into base class
This provides functinality for all sub classes too
2014-09-25 11:08:04 +04:00
Thilo Graf
83070da483 CComponents: rename gradient variables
Use convention for cc classes.
paintGradient probaly too general and
is related to body, other fb types can be also handled with gradient.
2014-09-25 11:07:55 +04:00
Thilo Graf
64c84fb490 CComponents: move variable cc_gradientData, paintGradient into base class
Variable now usable via g_settings in all subclasses. enable/disable.
TODO: gradient type handling
2014-09-25 11:07:45 +04:00
M. Liebmann
db6fd8480d CComponents: Add color gradient for CC_FBDATA_TYPE_BOX 2014-09-25 11:06:01 +04:00
M. Liebmann
d25fe1438c Change CComponents::clearSavedScreen() from protected to public
Signed-off-by: Thilo Graf <dbt@novatux.de>

Conflicts:
	src/gui/components/cc_base.h
2014-09-25 11:03:34 +04:00
Thilo Graf
0c0e0e85ff CComponentsItem/CComponentsForm: add property focus
Specifies that some certain operations especially eg. exec events for
that item are possible.
2014-09-25 11:02:32 +04:00
Thilo Graf
67a42c3e96 CComponents: add members to handle object tags
This can help to handle some useful values for any functions
2014-09-25 11:02:00 +04:00
Thilo Graf
4731521070 CComponents: add new header file cc_signals.h with some basic members 2014-09-25 10:58:22 +04:00
martii
be29f644f0 gui/components: use COL_BACKGROUND_PLUS_0 instead of COL_BACKGROUND 2014-09-11 18:12:51 +04:00
Thilo Graf
672757606c CComponents: implement scroll functionality into CComponentsForm
CComponentsForm provides page scroll if found more
than one pre defined page and is working with all derivated sub classes from CComponentsForm .

Pages are defined with setPageNumber(0...n) in items (1st page = 0). The item page number property is
defined in variable cc_page_number. The highest page number sets the
count of pages inside container to required value. Thats compellingly!

To show a page, we can use setCurrentPage(0...n ) and paintCurPage() or use directly paintPage(0...n).
Note: global paint() will show the current page. Default page is 0 (as first).
Use setCurrentPage(0...n) to change this before first call of paint().
Note: In CComponentsWindow class, these methods are applied to window body.

For examples, take a look into CTestMenu
2014-06-27 20:49:41 +02:00
Thilo Graf
8bbd7024d9 CComponents: epand method setFrameThickness() to change selected frame 2014-06-23 18:43:47 +02:00
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