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!
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
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
CComponentsHeader uses now CComponentsIconForm, which is now derived
from CComponentsFrmChain. Some methods should be now simplified and
allow to handle some modifications easier.
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.
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.
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.
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.
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.