Commit Graph

114 Commits

Author SHA1 Message Date
Jacek Jendrzej
ddb3c15d4b some gcc5 compil fixes 2015-12-26 17:03:42 +01:00
Stefan Seyfried
eeee5bacab Merge remote-tracking branch 'uncool/cst-next'
This need buildfixes and some functional updates...
2015-12-13 17:41:55 +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
Stefan Seyfried
daeefa9757 components: fix format strings 2014-12-26 20:00:42 +01: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
Thilo Graf
c66c778326 CComponentsForm: fix position of replaced item
If cc-item is bound on a parent form, it's not enough
to replace the item object only, also properties like
parent and index must be moved to new item to ensure that positions are calculated correctly.
But it's matter for unbound cc-items.
2013-06-23 20:34:19 +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