?? kr_view.h
字號:
/***************************************************************************
KR_View.h -
-------------------
begin : Tue Mar 3 2004
copyright : (C) 2004 by DigitalAirways
email : info@digitalairways.com
***************************************************************************/
/*
* Copyright (c) 2000-2004 DigitalAirways, sarl. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
*/
/*
**************************************************************
* TODO
**************************************************************
-
**************************************************************
* HISTORY
**************************************************************
-
*/
#ifndef __KR_VIEW__
#define __KR_VIEW__
#include "KR_KRuntime.h"
#include "KR_Object.h"
#include "KR_Serializer.h"
#include "KR_Group.h"
class KREBDLIBS_API View : public Plugin {
friend class Group;
protected:
char* fName;
Group* fGroup;
boolean fCarrouselMode;
long fCarrouselOffset;
long fScrollStep;
long fViewIndexOffset;
long fSlotNb;
char* fSlotPrefix;
boolean fHandleAccept;
boolean fHandleLeftRight;
boolean fHandleUpDown;
boolean fHandleActionA;
boolean fHandleActionB;
boolean fHandleActionC;
boolean fHandleActionD;
long fRightStep;
long fLeftStep;
long fUpStep;
long fDownStep;
Group* fNextIndicatorGroup;
long fNextIndicatorGroupId;
long fNextIndicatorIndex;
Group* fPrevIndicatorGroup;
long fPrevIndicatorGroupId;
long fPrevIndicatorIndex;
long fBorderBegin;
long fBorderEnd;
boolean fFill;
char* fPopulatorClass;
//ViewPopulator* fPopulator;
void* fPopulator;
char* fPopulatorParam;
#ifdef DEV_CONSISTENCY
char* fPopulatorVersion;
#endif
private:
void initView();
void activateIndicators(Group* g) ;
void doStep(long actionid) ;// do not public: will be inlined in near futur.
boolean focusDisplays(long groupfocusindex, long firstoptiontoshow);
boolean focusDisplays(Group* g, long firstoptiontoshow);
virtual char* renderStr(Group* g) {
return render(g, true);
}
virtual void complete(Serializer* serializer) {
fNextIndicatorGroup=(Group*) serializer->id2Instance(fNextIndicatorGroupId);
fPrevIndicatorGroup=(Group*) serializer->id2Instance(fPrevIndicatorGroupId);
}
virtual void marshalRestore(ObjectReader* reader, long version, Group** previousGroup, View** previousView, Option** previousOption);
void marshalRestoreCurrent(ObjectReader* reader, long version, Group** previousGroup, View** previousView, Option** previousOption);
void marshalRestore30(ObjectReader* reader, long version);
public:
DEFINE_NEW(View);
DEFINE_DELETE(View);
View(GContext*newGContext, char* name):Plugin(newGContext) {
ASSERT_MEMORY_OWNERSHIP(this, name);
initView();
fName = name;
}
virtual ~View() {
SAFE_FREE(fName);
SAFE_FREE(fSlotPrefix);
}
View(GContext* newGContext):Plugin(newGContext) {
initView();
}
char* getName() {
return fName;
}
void setBorderBegin(long v) {
fBorderBegin = v;
}
void setBorderEnd(long v) {
fBorderEnd = v;
}
long getViewIndexOffset() {
return fViewIndexOffset;
}
Group* getNextIndicatorGroup() {
return fNextIndicatorGroup;
}
Group* getPrevIndicatorGroup() {
return fPrevIndicatorGroup;
}
void setViewIndexOffset(long viewIndexOffset) {
fViewIndexOffset = viewIndexOffset;
}
void setPrevIndicatorGroup(Group* prevIndicatorGroup) {
fPrevIndicatorGroup = prevIndicatorGroup;
}
Group* getGroup() {
return fGroup;
}
/* api */ KPage* getPage();
boolean isFill() {
return fFill;
}
void setFill(boolean b) {
fFill = b;
}
void setFirstOptionToShow(long index);
long getFirstOptionToShow();
void setGroup(Group* group) {
fGroup = group;
}
void setDownStep(long downStep) {
fDownStep = downStep;
}
void setLeftStep(long leftStep) {
fLeftStep = leftStep;
}
void setRightStep(long rightStep) {
fRightStep = rightStep;
}
void setUpStep(long upStep) {
fUpStep = upStep;
}
char* getSlotPrefix() {
return fSlotPrefix;
}
void setSlotPrefix(char* slotPrefix) {
ASSERT_MEMORY_OWNERSHIP(this, slotPrefix);
SAFE_DELETE(fSlotPrefix);
fSlotPrefix = slotPrefix;
}
char* getDebugName() {
return fSlotPrefix;
}
long getScrollStep() {
return fScrollStep;
}
long getRightStep() {
return fRightStep;
}
long getLeftStep() {
return fLeftStep;
}
long getUpStep() {
return fUpStep;
}
long getDownStep() {
return fDownStep;
}
long getSlotNb() {
return fSlotNb;
}
void setScrollStep(long step) {
fScrollStep = step;
}
void setSlotNb(long window) {
fSlotNb = window;
}
void setPrevIndicator(Group* g, long i) {
fPrevIndicatorGroup=g;
fPrevIndicatorIndex=i;
}
void setNextIndicator(Group* g, long i) {
fNextIndicatorGroup=g;
fNextIndicatorIndex=i;
}
void setCarrouselOffset(long carrouselOffset) {
fCarrouselOffset = carrouselOffset;
}
long getCarrouselOffset() {
return fCarrouselOffset;
}
void setCarrouselMode(boolean carrouselMode) {
fCarrouselMode = carrouselMode;
}
boolean isCarouselMode() {
return fCarrouselMode;
}
boolean isHandleAction(long actionid);
void setHandleLeftRight(boolean handleLeftRight) {
fHandleLeftRight = handleLeftRight;
}
void setHandleUpDown(boolean handleUpDown) {
fHandleUpDown = handleUpDown;
}
long calculateFirstOptionToShow(Group* g);
char* render(Group* g, boolean asString=0) ;
};
#endif // ndef __KR_VIEW__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -