mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- 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
83 lines
2.5 KiB
C++
83 lines
2.5 KiB
C++
/*
|
|
Based up Neutrino-GUI - Tuxbox-Project
|
|
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
|
|
|
Scrollbar class based up CComponentsFrmChain.
|
|
Copyright (C) 2014 Thilo Graf 'dbt'
|
|
|
|
License: GPL
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public
|
|
License as published by the Free Software Foundation; either
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef __CC_FORM_SCROLLBAR_H__
|
|
#define __CC_FORM_SCROLLBAR_H__
|
|
|
|
#include "cc_frm_chain.h"
|
|
#include "cc_item_picture.h"
|
|
|
|
class CComponentsScrollBar : public CComponentsFrmChain
|
|
{
|
|
private:
|
|
///scroll up navi icon object
|
|
CComponentsPicture *sb_up_obj;
|
|
///scroll down navi icon object
|
|
CComponentsPicture *sb_down_obj;
|
|
///container object for segments
|
|
CComponentsFrmChain *sb_segments_obj;
|
|
|
|
///names of navi icons
|
|
std::string sb_up_icon, sb_down_icon;
|
|
|
|
///count of segments
|
|
int sb_segments_count;
|
|
|
|
///mark id
|
|
int sb_mark_id;
|
|
|
|
///init top icon
|
|
void initTopNaviIcon();
|
|
///init bottom icon
|
|
void initBottomNaviIcon();
|
|
|
|
///init segements
|
|
void initSegments();
|
|
|
|
///init all items
|
|
void initCCItems();
|
|
|
|
void initVarSbForm( const int& count);
|
|
|
|
public:
|
|
CComponentsScrollBar( const int &x_pos, const int &y_pos, const int &w = 15, const int &h = 40,
|
|
const int& count = 1,
|
|
CComponentsForm *parent = NULL,
|
|
int shadow_mode = CC_SHADOW_OFF,
|
|
fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_3,
|
|
fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0);
|
|
// ~CComponentsScrollBar(); //inherited from CComponentsForm
|
|
|
|
///set marked segment, 1st = 0, 2nd = 1 ...
|
|
void setMarkID(const int& mark_id){sb_mark_id = mark_id; initSegments();};
|
|
///get current assigned marked id
|
|
int getMarkID(){return sb_mark_id;};
|
|
|
|
///Sets count of scrollbar segments and is similar e.g. page count. Each segment is assigned to an id. Starting with id 0...n see also setMarkID(), getMarkID().
|
|
void setSegmentCount(const int& segment_count, const int& mark_id = 0);
|
|
///Get count of current scrollbar segments
|
|
int getSegmentCount(){return sb_segments_count;}
|
|
};
|
|
|
|
#endif
|