void enuSetWindowColor() method



void enuSetWindowColor(

[in] HVIEW hView,

[in] byte red,

[in] byte green,

[in] byte blue,

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


red [in]

Type:byte 

뷰의 윈도우 색상(red) value - 0~255


green [in]

Type:byte 

뷰의 윈도우 색상(green) value - 0~255


blue [in]

Type:byte 

뷰의 윈도우 색상(blue) value - 0~255


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 뷰(2D/3D)의 위도우 색상을 변경하고자 할때 사용하는 함수. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);

enuSetWindowColor(ViewHandle, 128, 128128);

}




Reference


void enuSetCanvasColor( );



void enuSetMouseWheelCallBack() method



void enuSetMouseWheelCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 휠 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 휠 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseMouseWheel(float delta, float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetMouseWheelCallBack(ViewHandle, MouseMouseWheel);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );

void enuSetMouseMoveCallBack() method



void enuSetMouseMoveCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 이동 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 이동 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseMove(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetMouseMoveCallBack(ViewHandle, MouseMove);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );

void enuSetMButtonUpCallBack() method



void enuSetMButtonUpCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 업(middle) 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 업(middle) 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseMButtonUp(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetMButtonUpCallBack(ViewHandle, MouseMButtonUp);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );

bool enuSetMButtonDownCallBack() method



void enuSetMButtonDownCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 다운(middle) 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 다운(middle) 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseMButtonDown(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetMButtonDownCallBack(ViewHandle, MouseMButtonDown);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );

enuSpace for Moon(2016) 기준

void enuSetRButtonUpCallBack() method



void enuSetRButtonUpCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 업(right) 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 업(right) 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseRButtonUp(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetRButtonUpCallBack(ViewHandle, MouseRButtonUp);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );




void enuSetRButtonDownCallBack() method



void enuSetRButtonDownCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 다운(right) 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 다운(right) 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseRButtonDown(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetRButtonDownCallBack(ViewHandle, MouseRButtonDown);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );



enuSpace professional 2016 기준

void enuSetLButtonUpCallBack() method



void enuSetLButtonUpCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 업 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 업 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseLButtonUp(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 Up 상태시 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetLButtonUpCallBack(ViewHandle, MouseLButtonUp);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );



enuSpace professional 2016 기준

void enuSetLButtonDownCallBack() method



void enuSetLButtonDownCallBack(

[in] HVIEW hView,

[in] void cb_function(float, float)

};


Parameters

hView [in]

Type:HVIEW

enuSpace View Handle


cb_function [in]

Type:function pointer

마우스 다운 이벤트를 받고자하는 함수 포인터 주소


Return value

Type : void


Remarks

enuSpace SDK를 이용시, 응용 프로그램 개발에 뷰 마우스 다운 이벤트를 전달 받고자 하는 함수의 주소를 설정하며 해당 이벤트 발생시 응용 프로그램에 콜백함수 호출 수행. 



Examples


enuSpace SDK



HVIEW ViewHandle = NULL;


void MouseLButtonDown(float posx, float posy)

{

// Mouse Down Postiion (x, y)

// 선택 객체 리턴, 리턴값이 NULL인 경우 마우스 다운에 의해서 선택 객체 없음.

HNODE Node = enuGetSelectSingleObject(ViewHandle);


if (Node)

{

VariableStruct pg_type;

enuGetAttributeByNode(pSvg, selNode, L"pg-type", &pg_type);


if (_wtoi(pg_type.strValue) == DEF_NODE_LINE)

{

// 선택된 객체가 라인이라면, 끝점 좌표값 변경.

CString strValue;

strValue.Format(L"%f", posx);

enuSetAttributeByNode(pSvg, Node, L"x2", strValue.GetBuffer(0));

strValue.Format(L"%f", posy);

enuSetAttributeByNode(pSvg, Node, L"y2", strValue.GetBuffer(0));

}

}

}


void CSampleView::OnInitialUpdate()

{

CView::OnInitialUpdate();


enuCreateProject();

enuLoadProjectFile(L"Project\\sample.enup");

ViewHandle = enuCreateView(this->m_hWnd);


enuSetLButtonDownCallBack(ViewHandle, MouseLButtonDown);

if (enuSetSvgPageView(ViewHandle, L"picture\\picture.svg"))

{

HSVG pSvg = enuGetSvgHandler(ViewHandle);

HNODE lineNode = enuCreateLine(pSvg, L"", 0, 0, 0, 0, 0, 0);


enuSetEditOperationMode(ViewHandle, false);

enuSetScriptOperationMode(true);

}

}




Reference


void enuSetLButtonDownCallBack( );

void enuSetLButtonUpCallBack( );

void enuSetRButtonDownCallBack( );

void enuSetRButtonUpCallBack( );

void enuSetMButtonDownCallBack( );

void enuSetMButtonUpCallBack( );

void enuSetMouseMoveCallBack( );

void enuSetMouseWheelCallBack( );


enuSpace professional 2016 기준

bool enuLoadProjectFile() method


C++ 

 bool enuLoadProject(

[in] wchar_t *projectFilename 

);

Parameters

projectFilename[in]

Type : wchar_t

프로젝트의 파일이름 입력.


Return value

Type : bool

프로젝트의 로딩 결과 


Remarks

프로젝트를 정상적으로 로드되지 않았을 경우, 리턴값으로 false를 반환한다. 정상적으로 프로젝트가 리턴된 경우에는 true를 반환한다. 


Examples

C++ 


#include <SvgDefine.h>

#include <enuLibrary.h>


HPROJECT m_Project = NULL;


BOOL CSampleDlg::OnInitDialog()

{

HPROJECT m_Project = enuCreateProject();


CString strProjectFile = L"d:\\SampleProject\\sample.enup";

if (enuLoadProjectFile(strProjectFile) == false)

{

AfxMessageBox(L"Project load failed.");

return true;

}


return TRUE; 

}


void CSampleDlg::OnDestroy()

{

enuCloseProjectFile(); 

enuDestoryProject(m_pProject);

}




See also

enuCloseProjectFile()

+ Recent posts