Commit Graph

58 Commits

Author SHA1 Message Date
Thilo Graf
06fa3f2488 CComponentsForm: move slots into base classes
Usable for all form classes
2017-02-07 17:12:25 +01:00
Thilo Graf
1c217b404f Forms/header/clock: implement slot into OnBeforeRePaint 2017-02-02 11:18:27 +01:00
Thilo Graf
5c8aa90e01 CComponentsForm: add some usefull slots/signal to help paint backgrounds
Requried to paint form items only on changed contents and on repaint
2017-01-31 16:36:41 +01:00
Thilo Graf
375451f0a6 CComponentsForm: add parameters to setSelectedItem() methode
Were not passed to items
2016-10-24 10:31:25 +02:00
Thilo Graf
dde298b1b7 CMsgBox: rework msgbox classes with Window class implementation
Replacing messagebox, hintbox_ext and some derivated parts with
basic class hintbox and derivated class CMsgBox. This should unify
window handling and avoids maintain of multiple classes with quasi
same purpose and adds more functionality.

TODO: fix and optimize details
2016-10-24 10:31:24 +02:00
svenhoefer
75fe6e407d - colors: add COL_FRAME wrapper 2016-10-10 14:19:54 +02:00
svenhoefer
1f60557e0b - ccomponents: use COL_SHADOW for shadows 2016-08-16 08:37:54 +02:00
Thilo Graf
888c575ef4 CComponentsForm: add return value to addCCItem()
return value = current id of added item
2015-12-28 17:58:46 +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
Jacek Jendrzej
051fb7c008 some enum warrnings compil fixes 2015-02-15 22:16:47 +01:00
Thilo Graf
88ce62ea84 CComponentsForm/CComponentsWindow: add page scroll handling
This provides page scroll with up/down, left/right or combined.
Usage of exec() methods with implemented signals allows a
generic implematation of button or other message handling with
signal/slot solutions.

still to do: page cache
2014-09-25 11:02:55 +04:00
Thilo Graf
e1b9f0a184 CComponentsForm: add member to get pointer to selected items 2014-09-25 11:02:17 +04:00
Thilo Graf
0ab881b338 CComponentsForm: avoid segfault, if id is out of range 2014-09-25 11:02:13 +04:00
Thilo Graf
ec7d5772f0 CComponentsForm: add members to set or get selected items 2014-09-25 11:01:54 +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
c2bc275d5d CComponentsForm: add functions to get first and last item 2014-06-27 20:38:59 +02:00
Thilo Graf
eee10df7bb CComponentsForm: add comment 2014-06-23 18:43:47 +02:00
Thilo Graf
581b9c7701 CComponentsForm: add methode killCCItems()
This methode is an equivalent version of CComponentsItem::kill() and
allows to erase all items inside of a container at once.
2014-06-23 18:43:47 +02: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
c2c79060b8 CComponentsForm, CSignalBar: rename offset vars 2014-02-13 16:26:16 +01:00
Thilo Graf
2191fded38 CComponentsForm: add members to get count of items 2014-01-08 08:42:16 +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
Thilo Graf
04574fc6eb CComponents: split some header files
Should bring more overview and less susceptibility to conflicts (merge etc)

License texts updated.
2014-01-06 22:27:59 +01:00
Thilo Graf
d2991b49c8 CComponentsForm: update license text 2014-01-06 14:47:13 +01:00
Thilo Graf
a08a418d88 CComponentsExtTextForm: use inherited class for localized version
Removed simple constructor and used default values in constructor has same
effect, this reduces some code parts. Usage is unchanged.
2014-01-06 14:47:12 +01:00
Thilo Graf
abe1de16b0 CComponentsForm: use passed by reference in addCCItem()
Function parameter 'cc_Items' should be passed by reference (performance).
2013-12-25 19:50:31 +01:00
Thilo Graf
eb16ea3ac6 CComponents: add new class CComponentsFrmChain
CComponentsFrmChain provides a form for chained cc-items with
optional dynamic arrangement or direction parameters
2013-12-23 23:55:43 +01:00
M. Liebmann
c2c5b931cd CComponentsHeader: Fix height calculation 2013-12-11 15:55:14 +01:00
[CST] Focus
90c76a2985 components: remove initVarHeader calls in classes derived from CComponentsHeader 2013-11-29 17:27:10 +04:00
[CST] Focus
062b10be2a components: remove initVarForm calls in classes derived from CComponentsForm 2013-11-29 17:27:10 +04:00
Thilo Graf
0ae3d34ceb CComponentsWindow: add missing member paint()
This is a partial revert of cbeb9f3ac6
2013-11-17 20:53:45 +01:00
Thilo Graf
74d25a6089 CComponentsExtTextForm: fix assign of width with percent value
Assigning of value before width was set, had no effect
2013-11-11 00:19:48 +01:00
Thilo Graf
cbeb9f3ac6 CComponentsWindow: remove paint() member
The derived member of ComponentsForm() should be sufficiently
and should serve its purpose.
2013-11-11 00:19:48 +01:00
Thilo Graf
a0e00387b6 CComponentsExtTextForm: add member setLabelAndTextFont() 2013-11-11 00:19:47 +01:00
Thilo Graf
d8514b19ee CComponentsExtTextForm: add new class CComponentsExtTextForm
this provides a combining form, that contains a text object with label
2013-11-11 00:19:46 +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
Thilo Graf
64c6eb5945 CComponentsHeader: add possibility to modify text alignment
usable in header and its derived classes and in class CComponentsWindow
2013-10-24 21:19:07 +02:00
Thilo Graf
5323e92a6f CComponentsWindow: add member showHeader()
Provides show or hide window header
2013-10-24 21:19:06 +02:00
Thilo Graf
1b0d4fdd05 CComponentsHeader: add member to get header text 2013-10-24 21:19:05 +02:00
Thilo Graf
3438b23f68 CComponentsItem: move function isAdded() to CComponentsItem class 2013-10-19 01:25:23 +02:00
Thilo Graf
78cdee08a8 CComponentsHeader: add member that allows switching to small size 2013-09-19 08:24:39 +02:00
Thilo Graf
4eb26988e9 CComponentsForm/CComponentsWindow: add new members
CComponentsForm: Overload member removeCCItem so we can use
cc_item as parameter.
CComponentsWindow: add member bool showFooter().
This allows to hide a footer in window.
2013-09-19 08:24:38 +02:00
Thilo Graf
d750b8e27b CComponentsWindow: use members as protected
Sub classes need these members.
2013-09-19 08:24:38 +02:00
Thilo Graf
5521a3b341 CComponentsWindow: add member Refresh() to reinit dimensions and positions 2013-06-25 11:36:03 +02:00
Thilo Graf
4a2a55e3dd CComponentsWindow: fix wrong type for ccw_footer 2013-06-23 23:28:26 +02:00
Thilo Graf
a8721fa72a CComponentsForm: add new member genIndex() 2013-06-23 22:54:30 +02:00
Thilo Graf
04300f1874 CComponents: rework position handling
The real position already used here, if item is bound to a parent.
(bound or embedded means: added with addCCItem() to a form)
This causes no separate calculation in paint methodes of embedded
sub items or sub forms and more nested sub forms.

CComponentsForm have also some new members
- exchangeCCItem() to exchange the order items
- setAppendOffset() to set an offset for auto append mode
  Autoappend is enabled if x or y have value -1 (defined also in CC_APPEND)
  x=horizontal, y=vertical
  Is this activated, no separate calculation of incremental offset
  is required.

However items with independent rendered parts, needs
a separate calculation. In some subclasses was this necessary.
2013-06-16 00:34:06 +02:00
Thilo Graf
f968abe6c5 CComponentsForm: add new member isAdded() 2013-06-16 00:34:04 +02:00