Commit Graph

67 Commits

Author SHA1 Message Date
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
5d450c60d3 - rename SHADOW_OFFSET -> OFFSET_SHADOW 2016-10-10 14:19:55 +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
322b58a598 fix compil fix change 64 to 32 2015-12-27 13:58:32 +01:00
Jacek Jendrzej
ddb3c15d4b some gcc5 compil fixes 2015-12-26 17:03:42 +01:00
Thilo Graf
674f2f983a CComponentsForm: reduce log spam in info mode 2015-03-29 22:40:04 +02:00
Thilo Graf
d72603665c CComponentsForm: prevent wrong id parameter if item size out of range 2015-03-29 22:39:57 +02:00
Thilo Graf
52f7c79db8 CComponentsForm: fix init value of getPageCount()
value is always 1
2015-03-29 22:39:56 +02:00
Thilo Graf
23c708b787 CComponentsForm: fix unnecessary try for scroll
This avoids unnecessary flicker effects, because no paint is required,
if page count = 1 and also ensures, that this page is defined as current page.
2015-03-29 22:39:51 +02:00
Thilo Graf
09851f3b9f CComponentsForm: reduce corner radius on frame border
If we have a frame around parent item, ensure matching corners
inside of embedded item, this avoids ugly unpainted spaces
between frame and item border.

TODO: other constellations are not considered at the moment!
2015-03-29 22:39:51 +02:00
Thilo Graf
f7faf07ab1 CComponentsForm: fix item offset with enabled frame
frame width was not considered
2015-03-29 22:39:50 +02:00
M. Liebmann
4c2704fb2f CComponentsForm: Fix compiler warning (-Wsign-compare) 2014-09-25 11:05:18 +04: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
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
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
dce25e94b3 CComponentsForm: don't consider frame for position calculation
This should be done in the arrangement of the container contents
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
f073c74a40 CComponentsForm: paint log on debug level 2 if dimensions too large 2014-05-22 21:50:52 +02:00
Thilo Graf
2f889b9563 CComponentsForm: fix centering of items inside form 2014-05-22 21:50:49 +02:00
Thilo Graf
421296932e CComponentsForm: use variable instead function 2014-05-22 21:50:49 +02:00
Thilo Graf
6fe7b452c1 CComponentsHeader: rework context button handling
CComponentsHeader uses now CComponentsIconForm, which is now derived
from CComponentsFrmChain. Some methods should be now simplified and
allow to handle some modifications easier.
2014-04-02 08:40:21 +02:00
Thilo Graf
750691fbbf CComponents: use neutrino debug mode for debug output 2014-04-02 08:40:21 +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
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
d2991b49c8 CComponentsForm: update license text 2014-01-06 14:47:13 +01:00
Thilo Graf
a0a4cc1355 CComponentsForm: avoid of height or width error due to odd values
Some calculations can resulting odd values and can provocate
unnecessary debug spam, but more lines should be repaired.
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
Stefan Seyfried
9eddaedfdd CComponents: fix compiler warnings with DEBUG_CC 2013-12-18 21:10:17 +01:00
Thilo Graf
8442b39c28 CComponents: replace __FUNCTION__ with __func__
__func__ is more suitable for portability
2013-12-18 15:13:19 +01:00
Thilo Graf
ad80daea96 CComponentsForm/CComponentsHeader: use start pos x=1 instead 0
0 could make problems on fit items into container
2013-12-10 09:30:52 +01:00
[CST] Focus
dd7c7fc7ae components: cleanup destructors - remove calls to functions,
already called inside base classes destructors
2013-11-29 17:27:10 +04:00
[CST] Focus
93a326e9eb components: remove initVarBasic and initVarItem calls from derived classes 2013-11-29 17:27:10 +04: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
3438b23f68 CComponentsItem: move function isAdded() to CComponentsItem class 2013-10-19 01:25:23 +02:00
Thilo Graf
3ff09c88bd CComponentsForm: add predefine CC_CENTERED for auto positions
This saves explicit position calculations to arrange items centered
2013-10-16 11:54:05 +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
5cb7d66993 CComponentsForm: fix fitting of item on the right and bottom edges
Frame of form was overpainted by item,
small whitespace fixes
2013-08-30 22:14:35 +02:00
Thilo Graf
f3cb2bc41c CComponentsForm: add more debug details 2013-06-25 11:36:04 +02:00
Thilo Graf
7fd870a063 CComponentsForm: fix possible segfault 2013-06-25 11:36:04 +02:00
Thilo Graf
75fe48043e CComponentsForm: fix position of inserted item
It's not enough to insert an item object only. Also properties like
parent and index must be defined to inserted item to ensure that
positions are calculated correctly.
2013-06-23 22:54:40 +02:00
Thilo Graf
460c8bbff3 CComponentsForm: use addCCItem() instead push_back
push_back doesn't make all necessary steps to add an item
2013-06-23 22:54:35 +02:00
Thilo Graf
a8721fa72a CComponentsForm: add new member genIndex() 2013-06-23 22:54:30 +02:00