TouchVG framework
Public 类型 | Public 成员函数 | Public 属性 | 静态 Public 属性 | Private 成员函数 | 所有成员列表
GiCoreViewImpl类 参考

GiCoreView实现类 更多...

#include <gicoreviewimpl.h>

类 GiCoreViewImpl 继承关系图:
Inheritance graph

Public 类型

enum  OPT_TYPE { kOptBool, kOptInt, kOptFloat, kOptStr }
 
typedef std::pair< OPT_TYPE, std::string > OPT_VALUE
 
typedef std::map< std::string, OPT_VALUE > OPT_MAP
 

Public 成员函数

 GiCoreViewImpl (GiCoreView *owner, bool useCmds=true)
 
 ~GiCoreViewImpl ()
 
void submitBackXform ()
 应用后端坐标系对象到前端 更多...
 
MgMotion * motion ()
 返回当前动作参数 更多...
 
MgCmdManager * cmds () const
 返回命令管理器对象 更多...
 
GcShapeDoc * document () const
 返回内核的内部文档对象 更多...
 
MgShapeDoc * doc () const
 得到可编辑的图形文档 更多...
 
MgShapes * shapes () const
 得到可编辑的图形列表 更多...
 
GiContext * context () const
 得到当前绘图属性 更多...
 
GiTransform * xform () const
 得到坐标系对象 更多...
 
Matrix2d & modelTransform () const
 文档的模型变换矩阵 更多...
 
void * createRegenLocker ()
 为 MgRegenLocker 创建内部对象 更多...
 
int getNewShapeID ()
 返回新绘图形的ID 更多...
 
void setNewShapeID (int sid)
 设置新绘图形的ID 更多...
 
CmdSubject * getCmdSubject ()
 返回命令扩展目标对象 更多...
 
MgSelection * getSelection ()
 返回选择集对象,可能为NULL 更多...
 
MgShapeFactory * getShapeFactory ()
 返回图形工厂对象 更多...
 
MgSnap * getSnap ()
 返回图形特征点捕捉器 更多...
 
MgActionDispatcher * getAction ()
 返回上下文动作分发对象 更多...
 
bool registerCommand (const char *name, MgCommand *(*creator)())
 注册命令 更多...
 
bool toSelectCommand ()
 取消当前命令 更多...
 
const char * getCommandName ()
 得到当前命令名称 更多...
 
MgCommand * getCommand ()
 得到当前命令 更多...
 
MgCommand * findCommand (const char *name)
 查找命令 更多...
 
bool setCommand (const char *name, const char *params="")
 启动命令 更多...
 
bool setCurrentShapes (MgShapes *shapes)
 设置当前图形列表 更多...
 
bool isReadOnly () const
 返回文档是否只读 更多...
 
bool isCommand (const char *name)
 当前是否为指定名称的命令 更多...
 
bool shapeWillAdded (MgShape *shape)
 通知将添加图形 更多...
 
bool shapeWillDeleted (const MgShape *shape)
 通知将删除图形 更多...
 
bool shapeCanRotated (const MgShape *shape)
 通知是否能旋转图形 更多...
 
bool shapeCanTransform (const MgShape *shape)
 通知是否能对图形变形 更多...
 
bool shapeCanUnlock (const MgShape *shape)
 通知是否能对图形解锁 更多...
 
bool shapeCanUngroup (const MgShape *shape)
 通知是否能对成组图形解散 更多...
 
bool shapeCanMovedHandle (const MgShape *shape, int index)
 通知是否能移动点 更多...
 
void shapeMoved (MgShape *shape, int segment)
 通知图形已拖动 更多...
 
bool shapeWillChanged (MgShape *shape, const MgShape *oldsp)
 通知将修改图形 更多...
 
void shapeChanged (MgShape *shape)
 通知已拖动图形 更多...
 
bool shapeDblClick (const MgShape *shape)
 通知图形双击编辑 更多...
 
MgShape * createShapeCtx (int type, const GiContext *ctx=NULL)
 根据类型号创建图形对象 更多...
 
void commandChanged ()
 命令改变 更多...
 
void selectionChanged ()
 选择集改变的通知 更多...
 
void dynamicChanged ()
 图形动态拖拉改变的通知 更多...
 
bool shapeClicked (const MgShape *shape, float x, float y)
 图形点击的通知,返回false继续显示上下文按钮 更多...
 
void showMessage (const char *text)
 
void getLocalizedString (const char *name, MgStringCallback *c)
 得到本地化文字内容(可用封装函数 MgLocalized::getString) 更多...
 
int removeShape (const MgShape *shape)
 删除图形 更多...
 
bool useFinger ()
 使用手指或鼠标交互 更多...
 
bool isContextActionsVisible ()
 返回上下文菜单是否已显示 更多...
 
void hideContextActions ()
 隐藏上下文操作菜单 更多...
 
bool showContextActions (int, const int *actions, const Box2d &selbox, const MgShape *)
 显示上下文菜单(MgContextAction) 更多...
 
void shapeAdded (MgShape *sp)
 通知已添加图形,由视图重新构建显示 更多...
 
void redraw (bool changed=true)
 标记视图待更新显示 更多...
 
void regenAll (bool changed)
 标记视图待重新构建显示 更多...
 
void regenAppend (int sid, long playh=0)
 标记视图待追加显示新图形 更多...
 
bool setView (GcBaseView *view)
 
bool gestureToCommand ()
 
void submitDynamicShapes (GcBaseView *v)
 
bool getOptionBool (const char *name, bool defValue)
 布尔选项值 更多...
 
int getOptionInt (const char *name, int defValue)
 整型选项值 更多...
 
float getOptionFloat (const char *name, float defValue)
 浮点型选项值 更多...
 
void setOptionBool (const char *name, bool value)
 设置布尔选项值 更多...
 
void setOptionInt (const char *name, int value)
 设置整型选项值 更多...
 
void setOptionFloat (const char *name, float value)
 设置浮点型选项值 更多...
 
const char * getOptionString (const char *name)
 文本选项值 更多...
 
void setOptionString (const char *name, const char *text)
 设置文本选项值 更多...
 
OPT_MAP & getOptions ()
 
void resetOptions ()
 
- Public 成员函数 继承自 GiCoreViewData
 GiCoreViewData ()
 
 ~GiCoreViewData ()
 
MgRecordShapes * recorder (bool forUndo)
 
void setRecorder (bool forUndo, MgRecordShapes *p)
 
int getPlayingCount ()
 
long acquireFrontDoc (int index)
 
long acquireFrontShapes (int index)
 
void addPlaying (GiPlaying *p)
 
void removePlaying (GiPlaying *p)
 
- Public 成员函数 继承自 MgView
virtual ~MgView ()
 
long toHandle () const
 得到句柄,用于跨库转换 更多...
 

Public 属性

GcShapeDoc * _gcdoc
 
MgCmdManager * _cmds
 
GcBaseView * curview
 
long refcount
 
MgMotion _motion
 
int gestureHandler
 
MgJsonStorage defaultStorage
 
long regenPending
 
long appendPending
 
long redrawPending
 
volatile long changeCount
 
volatile long drawCount
 
std::map< int, MgShape *(*)()> _shapeCreators
 
OPT_MAP options
 
GiGraphics * gsBuf [20]
 
volatile long gsUsed [20]
 
volatile long stopping
 
- Public 属性 继承自 GiCoreViewData
volatile long startPauseTick
 
GiPlaying * drawing
 
MgShapeDoc * backDoc
 
GiPlayShapes play
 

静态 Public 属性

static float _factor = 1.0f
 

Private 成员函数

void registerShape (int type, MgShape *(*creator)())
 
MgShape * createShape (int type)
 
void calcContextButtonPosition (mgvector< float > &pos, int n, const Box2d &box)
 
Box2d calcButtonPosition (mgvector< float > &pos, int n, const Box2d &selbox)
 
Vector2d moveActionsInView (Box2d &rect, float btnHalfW)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 GiCoreViewData
static GiCoreViewData * fromHandle (long h)
 转为对象 更多...
 

详细描述

GiCoreView实现类


该类的文档由以下文件生成:

通用矢量图形框架, 版权所有 (C) 张云贵 2004-2017,BSD 开源许可证