Commit Graph

77 Commits

Author SHA1 Message Date
Thilo Graf
014f0f3da7 cc_frm_window.cpp: fix possible oversize render with maximum screen settings 2018-11-20 09:17:02 +01:00
Thilo Graf
64d5101be0 data types: use unified type name uint8_t instead u_int8_t 2018-01-20 17:42:31 +01:00
Thilo Graf
fb5c943db4 cc: expand cc-type with name
Required for internal operations where it is useful to have object
names and for better debugging.
2017-12-30 22:58:15 +01:00
Thilo Graf
51fc78c7e7 CComponentsWindow: add method to set background image in window classes
- setBodyBGImage() exists as member of base class CCDraw and had
  no visual effect in this class, because visibility of window container is disabled.
  This additional member overloads the original methode and is using functionality from
  window body object. Example for buildinfo added.

TODO:
- background behavior of embedded objects must be global adapted if a background image is used
2017-12-23 16:30:11 +01:00
Thilo Graf
94517d3404 src/gui/components/cc_frm_window.cpp: fix too small left bottom corner
radius is allready calculatetd in base class src/gui/components/cc_frm.cpp
in member CComponentsForm::paintCCItems()

NOTE:
It seems the radius calculation inside framebuffer don't working correct
for corners on the right site on top and bottom.
Seen on hd51 hardware on osd-boxes with shadow
(e.g. infobar) or Boxes with frames e.g. on  error message windows, buttons.
There are pixel errors like minimal holes on osd or displaced pixels.
On CST hardware evreything is ok.
2017-11-19 21:12:42 +01:00
Thilo Graf
c18e337d1f offsets: add SIDEBAR_WIDTH
required in window class
2017-08-08 14:25:12 +02:00
Thilo Graf
aaa34d8887 Merge branch 'master' into pu/fb-setmode
# Conflicts:
#	src/gui/components/cc_frm_window.h
2017-05-11 12:18:38 +02:00
Thilo Graf
942a27e3ef cc_frm_header.cpp/h: remove CTextBox types for title allignment
Title object has only width of current text content. This causes CTextBox
types have not a really visible effect. Now we have only three align types for title
and these are related to cc-text object position.

Involved classes adjusted too.
2017-05-11 12:15:16 +02:00
M. Liebmann
b46f566e2a Merge branch 'master' into pu/fb-setmode 2017-04-17 18:12:39 +02:00
Thilo Graf
e1f51050b2 CComponentsWindow: try to fix header and footer arrangement
Header and footer were placed too much on left side.
2017-04-17 15:18:45 +02:00
Thilo Graf
cf9a953b59 CComponentsWindow: use negative values for discret percental dimensions
Also add possibility to use placeholder for better readability and
better compatibilty with previous implementations.
See doc in source files for more details
2017-03-03 09:22:08 +01:00
Thilo Graf
055fef8b58 CComponentsWindow: use percentage conversion for dimension values
Dimension values for windows below a certain size are often not really
useful, even with regard to different resolutions.
Usage of percent values could be easier to handle.
In the constructor, the argument values für dimesions must be only
between 1 and 100 to achieve this.

TODO: behavior inside parents
2017-02-26 21:29:53 +01:00
Jacek Jendrzej
f76dda36df fix uninitialised values 2017-01-29 20:54:35 +01:00
Thilo Graf
6a3b07152f CComponentsWindow: use FONT_TYPE_BUTTON_TEXT instead FONT_TYPE_MENU_FOOT
Buttton text is not the same like footer text.
2016-12-30 20:33:26 +01:00
Thilo Graf
c1ec746321 CComponentsWindow: fix window body color
Color parameter was not passed to body. Parameters in constructor and
setters had no effect.
2016-12-01 22:42:21 +01:00
Thilo Graf
4e1a3a89dc CComponentsWindow: remove default values from internal init method
Is not really required for this private member.
2016-11-23 10:04:50 +01:00
Thilo Graf
013cd1f2cc CComponentsWindow: prepare possibility to change footer height 2016-10-24 10:31:27 +02:00
Thilo Graf
f90440e0f1 CComponentsWindow: remove wrong corner assignment
Overwrites corner mode for already assigned corner type for body object and
previous statement is canceled. This should avoid this.
2016-10-07 14:25:59 +02:00
Thilo Graf
90866b232a CComponentsWindow: fix possible holes between frame and footer
One line was to much
2016-08-22 21:17:02 +02:00
Thilo Graf
ca5702acf4 CComponentsWindow: simplify statements 2016-08-22 21:16:50 +02:00
Jacek Jendrzej
912017621b src/gui/components/cc_frm_window.cpp dont paint over screen size 2016-08-20 16:20:16 +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
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
29d723a97b CComponentsWindow: change order of items
Add header and footer items as first  and  body as last item.
Render of items occurs in listed order. So it's better for performance
while render of window.
This is something more advantageously because all other items are
contained inside body. So we avoid possible delay while rendering
of base items. It looks better on screen.
2016-06-26 15:32:36 +02:00
Thilo Graf
0a1d687b35 CComponentsWindow: try to fix reduce of item height on enabled frame
The lower part of the window frame was always painted over.
2016-06-26 15:32:35 +02:00
Thilo Graf
775e5c73a4 CComponentsWindow: use only body as background
Should provide more performance
2016-06-26 15:32:34 +02:00
Thilo Graf
0f64aff1dc CComponentsWindow: ensure default disable background paint on window
Only basic items should have enabled background paint as default.
Should be better for performance.
2016-06-26 15:32:33 +02:00
Thilo Graf
74e08ddb50 CComponentsWindow: add member to set button font and use infobar font as default 2016-04-07 17:29:10 +02:00
Thilo Graf
63533b6dbd CComponentsWindow: fix default header color 2016-02-26 14:57:05 +01:00
Thilo Graf
4bd3173d41 CComponentsWindow: add return value to addWindowCCItem(), fix footer color
- return value of addWindowCCItem() = current id of added body item
- assignment of footer color was missing
2015-12-28 18:13:21 +01:00
Thilo Graf
7659dd4642 CComponentsWindow: add member setWindowHeaderTextColor()
To modifiy header text color.
2015-12-27 14:42:30 +01:00
Thilo Graf
8e99559d90 CComponentsWindow: add method to set header color 2015-12-27 14:42:30 +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
Thilo Graf
64c84fb490 CComponents: move variable cc_gradientData, paintGradient into base class
Variable now usable via g_settings in all subclasses. enable/disable.
TODO: gradient type handling
2014-09-25 11:07:45 +04:00
Thilo Graf
c1f70dbbb8 CComponentsWindow, CMenuWidget: apply gradiant settings to header 2014-09-25 11:07:28 +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
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
f21c119517 CComponentsWindow: add possibilty to add sidebars in window objects
This allows to add objects in to window on left or right site. eg. for
navigation icons or other similar stuff. Default this feature is disabled.
to enable with methode enableSidebar(TYPE); With parameter
CC_WINDOW_LEFT_SIDEBAR, CC_WINDOW_RIGHT_SIDEBAR or both.
Width of sidebar can be changed with methode setWidthSidebar(int)
2014-06-23 18:43:47 +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
8a897103ac CComponentsItem: move/rename doCenter()to base class CComponentsItem
So it's possible to use this method for all cc-items.
setCenterPos() comes now with parameter 'along_mode' (CC_ALONG_X, CC_ALONG_Y).
So it's possible to center in x or y direction. As default are
both directions predefined.
2014-03-03 08:54:10 +01:00
Thilo Graf
c6221581ed CComponentsWindow: fix missing define of header position
Position is strictly top and left within of Window
2014-02-07 09:31:30 +01:00
Thilo Graf
a6eb67d456 CComponentsWindow: remove redundant init of header and footer 2014-02-05 11:56:48 +01:00
Thilo Graf
9482613d4c CComponentsWindowMax: add missing parameters to constructors 2014-02-05 11:56:47 +01:00
Thilo Graf
9d3febd080 CComponentsWindow: fix handling of window size
On some several cases it's possible that full resulution is not
visible on SD output or video-out modes like 576i/p.
So it's makes more sense to use current osd-settings for max size and
position.
This fixes also current behavior of Imageinfo.
2014-02-05 11:56:47 +01:00
Thilo Graf
d35da1afb6 CComponentsWindow: cleanup 2014-01-24 23:38:19 +01:00
Thilo Graf
66ae096372 CComponentsWindow: adapt header and footer corners for parent window
Corners of header and footer were not adapted to parent form.
It's unsightly, if these elements are not using the same corner types
like the parent window.
2014-01-24 23:13:49 +01:00
Thilo Graf
8cad2a3ca5 CComponentsWindow: add member doCenter()
Allows centering of window on screen, mostly senseful for
window objects without parent
2014-01-24 23:13:41 +01:00