📄 mdictionaryappview1container.h
字号:
/*
* MDictionary - dictionary program for Symbian cellular phones
*
* Copyright (C) 2005 Egyeki Gergely
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __MDICTIONARY_APPVIEW1CONTAINER_H__
#define __MDICTIONARY_APPVIEW1CONTAINER_H__
#include <coemain.h>
#include <aknlists.h> //for listbox
#include <AknWaitDialog.h> //for the wait dialog
#include <AknUtils.h> //for CAknFilteredTextListBoxModel,
//CAknListBoxFilterItems
class CAknSearchField;
class CEikListBox;
/*!
@class CMDictionaryAppViewContainer
@discussion An instance of CMDictionaryAppViewContainer contains the view
@drawn to the screen for CMDictionaryAppView
*/
class CMDictionaryAppView1Container : public CCoeControl,
MCoeControlObserver
{
public:
/**
* C++ default constructor.
*/
CMDictionaryAppView1Container();
/*!
@function ConstructL
@discussion Perform the second phase construction of a
@CMDictionaryAppViewContainer object
@param aRect Frame rectangle for container.
*/
void ConstructL(const TRect& aRect, CMDictionaryAppView1* aParent);
/**
* Destructor.
*/
virtual ~CMDictionaryAppView1Container();
private: // from CoeControl
/**
* From CoeControl,SizeChanged.
*/
void SizeChanged();
/*!
@function CountComponentControls
@discussion Get the number of controls contained in this compound control
@return Number of component controls
@result the number of controls
*/
TInt CountComponentControls() const;
/*!
@function ComponentControl.
@discussion Get the specified component
@param aIndex specification for component pointer
@return Pointer to component control
*/
CCoeControl* ComponentControl(TInt aIndex) const;
/*!
@function Draw
@discussion Draw this CMDictionaryAppViewContainer to the screen
@param aRect the rectangle of this view that needs updating
*/
void Draw(const TRect& aRect) const;
/**
* From CCoeControl, Handles key event.
* @param aKeyEvent The key event.
* @param aType The type of the event.
* @return Indicates whether or not the key event was
* used by this control.
*/
TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
TEventCode aType);
private:
void CreateListBoxL();
void AddItemsToListBoxL();
void DisplayFindBoxL();
void CreateFilterItemsL();
void HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType);
CAknSingleNumberStyleListBox* iListBox; //the listbox
CDesC16ArraySeg* iListBoxRows; //contain the words from files 1x
CAknSearchField* iFindBox; // For the find box
CAknListBoxFilterItems* iFilterItems; //CAknListBoxFilterItems
HBufC* iSelectedText;
HBufC* iFilter;
TInt iStartInd;
TInt iEndInd;
TBool popupShown;
TInt popupSelectedInd;
CMDictionaryAppView1* iParent;
public:
HBufC* GetWordL();
};
#endif // __MDICTIONARY_APPVIEW1CONTAINER_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -