classschedulecontainer.h

来自「《基于symbian手机开发与应用》一书的源代码」· C头文件 代码 · 共 99 行

H
99
字号
/*
* ============================================================================
*  Name     : CClassScheduleContainer from ClassScheduleContainer.h
*  Part of  : ClassSchedule
*  Created  : 2005-8-30 by 
*  Description:
*     Declares container control for application.
*  Version  :
*  Copyright: 
* ============================================================================
*/

#ifndef CLASSSCHEDULECONTAINER_H
#define CLASSSCHEDULECONTAINER_H

// INCLUDES
#include "ClassSchedule.hrh"
#include <coecntrl.h>
#include <eiklbo.h>

// FORWARD DECLARATIONS
class CEikTextListBox;
class CClassScheduleAppUi;

// CLASS DECLARATION

/**
*  CClassScheduleContainer  container control class.
*  
*/
class CClassScheduleContainer : public CCoeControl, MCoeControlObserver, public MEikListBoxObserver
{
public: // Constructors and destructor
    
        /**
        * EPOC default constructor.
        * @param aRect Frame rectangle for container.
    */
    void ConstructL(const TRect& aRect, CClassScheduleAppUi *aUi);
    
    /**
    * Destructor.
    */
    ~CClassScheduleContainer();
    
public: // New functions
    void CreateListBoxL();
    void SetCurrentItemIndex(TInt aIndex);
    TInt GetCurrentItemIndex();
    void CreateSearchListBoxL();
    void OpenCurrentListItem();
    
	void CmdDetail();
	void CmdModify();
	void CmdDelete();

    void CmdSearchDetail();

public: // Functions from base classes
    void HandleListBoxEventL(CEikListBox* aListBox,TListBoxEvent aEventType );
    TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
private: // Functions from base classes
	static TInt TimerPeriod(TAny * aPtr);
    void UpdataTimer();

private: // Functions from base classes
    
    /**
    * From CoeControl,CountComponentControls.
    */
    TInt CountComponentControls() const;
    
    /**
    * From CCoeControl,ComponentControl.
    */
    CCoeControl* ComponentControl(TInt aIndex) const;
    
    /**
    * From CCoeControl,Draw.
    */
    void Draw(const TRect& aRect) const;
    
    /**
    * From ?base_class ?member_description
    */
    // event handling section
    // e.g Listbox events
    void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
    
private: //data
	CEikTextListBox* iListBox;
	CClassScheduleAppUi *iUi;
    CPeriodic* iTimer;
};

#endif

// End of File

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?