CComponents: split cc_base.cpp

It's easier to work with smaller files.
Most files contain only one cc-class and their names are
derived on the particular class that is contained therein.


Origin commit data
------------------
Commit: 3ed9af87ad
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-02-26 (Tue, 26 Feb 2013)
This commit is contained in:
2013-02-26 15:58:22 +01:00
parent b9c9b31b32
commit de00ec3d5e
16 changed files with 2475 additions and 2056 deletions

View File

@@ -0,0 +1,90 @@
/*
Based up Neutrino-GUI - Tuxbox-Project
Copyright (C) 2001 by Steffen Hehn 'McClean'
Classes for generic GUI-related components.
Copyright (C) 2012, 2013, Thilo Graf 'dbt'
Copyright (C) 2012, Michael Liebmann 'micha-bbg'
License: GPL
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <global.h>
#include <neutrino.h>
#include "cc.h"
using namespace std;
//-------------------------------------------------------------------------------------------------------
//sub class CComponentsWindow inherit from CComponentsForm
CComponentsWindow::CComponentsWindow()
{
initVarWindow();
}
void CComponentsWindow::initVarWindow()
{
//CComponentsForm
initVarForm();
cc_item_type = CC_ITEMTYPE_FRM_WINDOW;
ccw_head = NULL;
ccw_caption = "";
ccw_icon_name = NULL;
setShadowOnOff(true);
}
CComponentsWindow::~CComponentsWindow()
{
if (ccw_head)
delete ccw_head;
}
void CComponentsWindow::initHeader()
{
if (ccw_head == NULL)
ccw_head = new CComponentsHeader();
ccw_head->setXPos(0);
ccw_head->setYPos(0);
ccw_head->setWidth(width);
ccw_head->setHeaderIcon(ccw_icon_name);
ccw_head->setHeaderText(ccw_caption);
}
void CComponentsWindow::initCCWItems()
{
initHeader();
if (ccw_head)
addCCItem(ccw_head);
}
void CComponentsWindow::paint(bool do_save_bg)
{
//paint body
paintInit(do_save_bg);
//paint
paintCCItems();
}