Commit Graph

45 Commits

Author SHA1 Message Date
Thilo Graf
97fc294d54 cc_frm_footer: add members to enable button allignment on top of footer 2019-10-27 16:24:47 +01:00
Thilo Graf
61e09c344c cc_frm_footer: remove inline for enableButtonFrameColor()
inline already default in header file
2019-10-27 16:24:47 +01:00
Thilo Graf
83dfe855b0 cc-classes: add missing virtual destructors 2019-10-27 16:24:47 +01:00
Thilo Graf
d86dcd36a7 components: use const bool& parameter in paint methodes 2019-10-27 16:24:47 +01:00
Thilo Graf
1c574e4a07 header/footer: add overloaded versions of header class with size mode option
Size mode didn't really work. It is easier to implement
headers with with separate class constructor and other size mode
Footer works also with this  additional parameter but without additional
overloaded constructors.
2019-04-02 16:34:56 +02:00
Thilo Graf
5d212fc401 src/gui/components/cc_frm_footer.cpp: add member getButtonLabel()
Allows to get button label object from button collection.
2018-08-18 11:22:23 +02:00
Stefan Seyfried
b982458d2d reduce dependencies on driver/rcinput.h
* add new header that only contains neutrino_msg_t and friends, often this
  is all that's needed instead of full rcinput.h
* directly include rcinput.h in some cpp files instead of relying on
  accidental inclusion in some header
* add class forward declarations to avoid dragging in rcinput indirectly
This could use more work to further reduce the impact; maybe separating
the CRCinput::key_* constants from the rcinput class would be good.
2018-01-13 20:08:20 +01:00
Thilo Graf
4d753d7437 CCButtonSelect: outsource button select handling into own class 2017-06-15 01:01:54 +02:00
Thilo Graf
4eb6a315fc CComponentsButton: simplify assignment of button message values
Count of alternate message values was limited to 1 value. Now it is
possible to add any count of message values.

directKey and directKeyAlt were removed from struct type 'button_label_cc'
and directKeys was added as container for possible message values.

Some methods of CComponentsFooter had to be adapted for that.
2017-03-20 22:55:05 +01:00
Thilo Graf
e777ecdfdb cc_types: move struct button_label_cc into cc_types.h 2017-03-13 09:45:38 +01:00
Thilo Graf
e2ca965ee9 CComponentsFooter: add bg_image to button_label_cc type 2017-03-13 09:45:38 +01:00
Thilo Graf
c766a970dc CComponentsFooter: simplify implementation of button labels
button_label_l and button_label_s are now
merged to button_label_cc with prepared default values for text and locales.This type contains all possible
button label properties. Values for locales and string
are evaluated in setButtonLabels(), so it's possible to remove some
overloaded methodes.
2017-03-11 00:45:25 +01:00
Thilo Graf
60a77d38b3 CComponentsFooter: fix default button font type
Deafult buttonfont is FONT_TYPE_BUTTON_TEXT not FONT_TYPE_MENU_FOOT
2017-01-05 22:19:18 +01:00
Thilo Graf
b98319cb91 CComponentsHeader/CComponentsFooter: prevent crash on changed font settings
Default fonts for header and footer must be handled too.
After font settings changes these objects could be invalid.
Default fonts have invalid pointers after font changes too. Extra reset is required.
2016-12-30 20:33:26 +01:00
Thilo Graf
4b88a244da CComponentsFooter: use select/unselect colors from menues as default 2016-11-20 16:33:53 +01:00
Thilo Graf
7567f7de00 CComponentsFooter: use minimal frame width as default for buttons 2016-11-20 16:33:32 +01:00
Thilo Graf
696989dcf1 CComponentsFooter: add parameter for frame width for selected buttons
Frame width was hard coded.
2016-11-20 01:33:57 +01:00
Thilo Graf
55ac581523 CComponentsFooter: optimize select buttons, try to assign better contrast
Now it's possible to set parameters for frames and text.
Parameters are prdefined for better contrasts in select or default mode.

TODO: background modes have no effects at the moment. Here are other things need to be done.
2016-10-24 10:31:28 +02:00
Thilo Graf
2e631fd0ce Try to rework footer
* try to fix enableButtonShadow(), seems an init is missing
* shadow fixed
2016-10-24 10:31:25 +02:00
Thilo Graf
363cf101d1 CComponentsFooter: add member enableButtonShadow()
Possibility to pass button properties into button objects
2016-10-24 10:31:25 +02:00
Thilo Graf
be740c1552 CMsgBox: add option to enable/disable button background
replaces var name btn_contour for better plausibility
2016-10-24 10:31:24 +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
Thilo Graf
9b9a8d1a78 CComponentsFooter: don't use default parameters for privat member
Passed init values are better to see here.
This should fix wrong footer color too. See UPNP-Browser, color was not
applied here.
2016-08-23 16:00:48 +02:00
svenhoefer
1f60557e0b - ccomponents: use COL_SHADOW for shadows 2016-08-16 08:37:54 +02:00
svenhoefer
54f2ac510f - fonts: add and use own font for all footers 2016-08-15 19:02:42 +02:00
svenhoefer
cc5258e6d5 - colors: make footer background color configurable
TODO: footer text color and maybe footer font
2016-08-15 00:14:47 +02:00
svenhoefer
13966c519b - cc_frm_footer: overload font option with old familiar font 2016-08-14 22:17:59 +02:00
svenhoefer
bc39d1e14e - colors: some internal renamings
* INFOBAR_SHADOW to SHADOW because it's not only used in infoviewer
* INFOBAR_SHADOW_TEXT to MENUFOOT_TEXT because it's the proper name

This is in preparation to make footer colors configurable
2016-08-14 21:55:18 +02: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
svenhoefer
5599784642 - cc_frm_footer: prepare for c2c gradient 2015-05-04 09:41:41 +02:00
Thilo Graf
56ea6c140f CComponentsFooter: Function setButtonLabels() change parameter
Performance: parameter 'v_content' should be passed by reference
2015-03-29 22:40:06 +02:00
Thilo Graf
7ec096fa3d CComponentsFooter: add optional possibility to switch colored button frame 2015-03-29 22:39:55 +02:00
Thilo Graf
5ae495716e CComponentsFooter: expand button label structs
Allows assigning of result, msg and alias values with label struct.

NOTE: Old button label struct are compatible but limited only and
not recommended for usage!
Old parameters 'struct button_label' doesn't provide newer parameters.
Missing parameters are filled with default values and must be assigned
afterward, if required.
2014-09-25 11:02:27 +04:00
Thilo Graf
cc5b17a620 CComponentsFooter: add members to set or get select a defined button 2014-09-25 11:01:49 +04:00
Thilo Graf
9f902af587 CComponentsFooter: add member to add button labels via vector 2014-09-25 11:01:39 +04: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
7cbd4e3469 CComponentsFooter: add member to get pointer to button container 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
9ffdb1cb98 CComponentsButton, CComponentsFooter: rework bestfit of buttons inside chain 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
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
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
7151608c8b CComponentsHeader/CComponentsFooter: move footer class into its own file 2014-02-05 11:56:46 +01:00