📄 eb_slot.h
字号:
/***************************************************************************
EB_Slot.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 __EB_SLOT__
#define __EB_SLOT__
#include "EB_Defs.h"
#include "EB_Utils.h"
#include "EB_PFWImage.h"
#include "KR_Option.h"
class KREBDLIBS_API Slot {
protected:
JitMapper* pict ;
/* fSlotID is the name of the slot created by KD. This name is made of <group's name><slot's fIndex>. It is necessary
to keep it because when a Slot is deserialized, the View it belongs to is not yet created. That's why this fView must
be reassign after the construction of the slot ( by calling setView() from Layout::createLayout().
This information is archaical and it must not be used for other purpose.
*/
pchar fSlotID ;
View* fView ;
int fIndex ;
int x;
int y;
int w;
int h;
long fAccesskey;
Option* fOption ;
GContext *gContext ;
private:
void slotInit(GContext* newGContext, View *newView, int newIndex, int newX, int newY, int newW, int newH);
public :
DEFINE_NEW(Slot);
DEFINE_DELETE(Slot);
Slot(GContext* newGContext, View *newView, int newIndex, int newX, int newY, int newW, int newH);
Slot(GContext* newGContext, pchar newSlotId, int newX, int newY, int newW, int newH);
~Slot() ;
#ifdef DEV_DEBUG
void dump() ;
#endif // def DEV_DEBUG
void clear()
{
pict=NULL ; // When the pict is not defined, the slot is not drawn...
fOption=NULL;
}
// Must only be used to assign the View and the fIndex
pchar getSlotID() { return fSlotID; }
void setView(View* newView, int newIndex) ;
View* getView() { return fView; }
int getIndex() { return fIndex; }
void draw(Graphics* scr);
int isUsing(JitMapper* img) ;
int isInZone(int x0, int y0) ;
//#ifdef USE_DEPRECATED
void setBitmap(JitMapper* newBitmap, boolean /*unused*/) {
setBitmap(newBitmap);
}
//#endif
void setBitmap(JitMapper* newBitmap);
/*
* Let this slot know the action that is currently mapped in it.
* This is useful to handle touch-screens
*/
void setOption(Option* newOption);
Option* getOption()
{ return fOption ; }
void getPosition(int *px, int *py, int *pw, int *ph)
{ *px=x ; *py=y ; *pw=w ; *ph=h ; return; }
void setPosition(int nx, int ny, int nw, int nh)
{ x=nx ; y=ny ; w=nw ; h=nh ; return; }
void setAccesskey(long key) {
fAccesskey = key;
}
long getAccesskey() {
return fAccesskey;
}
} ;
typedef Slot* pSlot ;
#endif // ndef __EB_SLOT__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -