Commit Graph

444 Commits

Author SHA1 Message Date
svenhoefer
8b91cda918 - change getRenderWidth() default to UTF8 2014-06-11 23:07:00 +02:00
Thilo Graf
f74a000929 CComponents: fix screen rests
Frame of painted box was incomplete removed, eg hint box see also:
http://www.dbox2world.net/board293-cst-coolstream/board314-cst-coolstream-development/12230-r%C3%BCckst%C3%A4nde-auf-bildschirm-bei-apollo/
2014-06-01 23:12:29 +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
336ddf75b6 CComponents/CComponentsItem: simplify statement 2014-05-22 21:50:55 +02:00
Thilo Graf
df4151936b CComponentsFooter: use same corner properties like parent object
This avoids paint of unnecessary edges inside parent object.
2014-05-22 21:50:54 +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
6aecdf3b5a CComponentsFooter: use dynamic font on too small footer width
If required width of evaluated buttons larger than footer width,
then use dynamic font for caption, and try to fit buttons into chain
container. Dynamic font is used if ccf_btn_font==NULL

NOTE: user should not use too small window size and not select too large
fontsize. At some point this possibility will be depleted and it's no
more space for readable caption.
2014-05-22 21:50:54 +02:00
Thilo Graf
a0492bc530 CComponentsButton: use darker color for Button
COL_LIGHT_GRAY is too garish related to background
2014-05-22 21:50:53 +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
bed36eab33 CComponentsHeader: add member getContextBtnObject()
Allow access directly to methods and properties of context button object.
2014-05-22 21:50:53 +02:00
Thilo Graf
9937c0fae8 CComponentsFooter: ignore item, if no text and icon are defined
Empty buttons with defined width are causing gaps...looks not nice!
2014-05-22 21:50:52 +02:00
Thilo Graf
18f13b0062 CComponentsFooter: add member paintButtons()
This is a nearly methode similar with the older button handler find
in gui/widget/buttons.h, some parameters are different,
but require minimalized input.
This member sets some basic parameters and will paint
concurrently on execute, explicit call of paint() is not required.
This should simplify the implementation of the footer class.
2014-05-22 21:50:52 +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
745f7b70f1 CComponentsText: add parameter for text color in member function setText() 2014-05-22 21:50:51 +02:00
Thilo Graf
0a3101728a CComponentsFooter: simplified dimensions init for default height 2014-05-22 21:50:50 +02:00
Thilo Graf
9c4aadd2bf CComponentsButton: use y position 0 for general alignment 2014-05-22 21:50:50 +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
9d014d2039 CComponentsButton: ensure matching icons inside button
Some icons can be too large for defined button height, so it's required to
scale icons. Scaling happens inside cc_btn_icon_obj during its init.
2014-05-22 21:50:49 +02:00
Thilo Graf
75bf3aa276 CComponentsButton: remove additonal y offset
Any other offset could have bad side effects for centered text,
it must be centered here. Other font sizes can make problems here.
2014-05-22 21:50:49 +02:00
Thilo Graf
7cbd4e3469 CComponentsFooter: add member to get pointer to button container 2014-05-22 21:50:48 +02:00
Thilo Graf
995eff8ffe CComponentsFooter: set color of button frames to button type, default=gray 2014-05-22 21:50:48 +02:00
Thilo Graf
f7860fed35 CComponentsFooter: apply showButtonContour() after init of labels
Function was without effect after adding of button objects,
showButtonContour() now changes property explicit for all items, also
after their addition to chain.
2014-05-22 21:50:47 +02:00
Thilo Graf
bd03327cb4 CComponentsFooter: use chain object in global scope of class 2014-05-22 21:50:47 +02:00
Thilo Graf
2c87bb750a CComponentsButton: add class with const char* parameters for icon names 2014-05-22 21:50:47 +02:00
Thilo Graf
14ea1de789 CComponentsFooter: fix missing types for log output 2014-05-22 21:50:47 +02:00
Thilo Graf
95c7e44eb1 CComponentsButton: ignonre objects if no inititalized
This makes it possible to use buttons with or without icons or text
2014-05-22 21:50:46 +02:00
Thilo Graf
9ffdb1cb98 CComponentsButton, CComponentsFooter: rework bestfit of buttons inside chain 2014-05-22 21:50:45 +02:00
Thilo Graf
2256c83b98 CComponentsButton: reinit button items after changed font type 2014-05-22 21:50:45 +02:00
Thilo Graf
41c01cedad CComponentsFooter: add possibility to change font type 2014-05-22 21:50:44 +02:00
Thilo Graf
419fc12f2e CComponentsButton: add possibility to change font type, whitespace fixes 2014-05-22 21:50:44 +02:00
Thilo Graf
7b279ddd33 CComponentsButton: simplify handling of init of buttons with chain class 2014-05-22 21:50:43 +02:00
Thilo Graf
8797872d47 CComponentsFooter: add functionality to add button labels via struct
This function uses struct label like old button label function
see /gui/widget/buttons.cpp, but can also use strings in structs

also possible: add single button with text or locale
2014-05-22 21:50:43 +02:00
Thilo Graf
40cfc7533d CComponentsFrmChain: add possibility to use individual positions for items 2014-05-22 21:50:43 +02:00
Thilo Graf
9955fa9203 CComponentsHeader: add icons to button collection for use in headers or footers 2014-05-22 21:50:42 +02:00
Thilo Graf
1c39d08c60 CComponentsHeader: add missing init of icon 2014-05-22 21:50:42 +02:00
Thilo Graf
e06d835396 CComponentsHeader: remove superfluous semicolon 2014-05-22 20:38:22 +02:00
Thilo Graf
f4447b38e0 CComponentsText: fix fit of textbox object inside cc text object dimensions
Position related to parent container was wrong. Some variables were
unused and removed.
2014-05-16 09:08:26 +02:00
Thilo Graf
6ba757bd9d CComponentsItem: don't increase x/y position if frame width already defined 2014-05-16 09:08:25 +02:00
Thilo Graf
b038d1b6c1 CComponentsIconForm: consider relevant paint direction, don't use 0 values
Value 0 can not be used without problems here, because explicit values
are required since a9a6a925240675c44243754e82dbee79f2d84698
2014-05-16 09:08:25 +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
Thilo Graf
2997b5eea2 CComponentsFrmClock: add missing init of items 2014-04-02 08:40:22 +02:00
Thilo Graf
d21df99ed4 CComponentsText: rework constructor
allows usage of parent parameter without another parameter
2014-04-02 08:40:22 +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
a573b02b85 CComponentsPIP: use a default frame with thickness 2 and small corner radius 2014-04-02 08:40:21 +02:00
Thilo Graf
7cc66fea93 CComponentsFrmChain: add missing parameter 'parent'
supplement to 23d7b62cf0
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
e6a004be87 CComponents: remove error message.
Log output should be enough.
2014-03-05 12:10:17 +01: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