void MkCheckBoxControlNode::SetObjectTemplate(MkDataNode& node) { MkWindowBaseNode::SetObjectTemplate(node); // ObjKey_CaptionTextName node.CreateUnit(ObjKey_CaptionString, MkStr::EMPTY); node.CreateUnit(ObjKey_OnCheck, false); }
void MkWindowThemedNode::SetObjectTemplate(MkDataNode& node) { MkVisualPatternNode::SetObjectTemplate(node); node.CreateUnit(ObjKey_ThemeName, MkStr::EMPTY); node.CreateUnit(ObjKey_ComponentType, MkStr::EMPTY); node.CreateUnit(ObjKey_CustomFormName, MkStr::EMPTY); node.CreateUnit(ObjKey_UseShadow, false); node.CreateUnitEx(ObjKey_ClientSize, MkFloat2::Zero); node.CreateUnit(ObjKey_FrameType, MkStr::EMPTY); }
void MkLineShape::SetObjectTemplate(MkDataNode& node) { // attribute MkBitField32 attr; attr.Assign(eRecordable, false); attr.Assign(eVisible, true); node.CreateUnit(ObjKey_Attribute, attr.m_Field); // local vertices MkArray<MkFloat2> fEmpty; node.CreateUnitEx(ObjKey_LocalVertices, fEmpty); // local depth node.CreateUnit(ObjKey_LocalDepth, 0.f); // indice MkArray<unsigned int> uiEmpty; node.CreateUnit(ObjKey_Indice, uiEmpty); // color node.CreateUnit(ObjKey_Color, MkColor::White.ConvertToD3DCOLOR()); }
void MkWindowBaseNode::_StartCursorReport(ePA_SceneNodeEvent evt, const MkInt2& position) { // report MkFloat2 worldPos(static_cast<float>(position.x), static_cast<float>(position.y)); MkFloat2 localPos = worldPos - GetWorldPosition(); MkDataNode arg; arg.CreateUnit(MkWindowBaseNode::ArgKey_CursorLocalPosition, MkVec2(localPos.x, localPos.y)); arg.CreateUnit(MkWindowBaseNode::ArgKey_CursorWorldPosition, MkVec2(worldPos.x, worldPos.y)); StartNodeReportTypeEvent(evt, &arg); // call back if (!m_CallBackTargetWindowPath.Empty()) { do { MkSceneNode* mgrNode = FindNearestDerivedNode(ePA_SNT_WindowManagerNode); // 소속 window mananger if (mgrNode == NULL) break; MkSceneNode* targetNode = mgrNode->GetChildNode(m_CallBackTargetWindowPath); // call back을 호출 할 node if ((targetNode == NULL) || (!targetNode->IsDerivedFrom(ePA_SNT_WindowBaseNode))) break; MkWindowBaseNode* winBase = dynamic_cast<MkWindowBaseNode*>(targetNode); if (winBase == NULL) break; MkArray<MkHashStr> myPath; GetWindowPath(myPath); winBase->CallBackOperation(evt, &arg, myPath); return; } while (false); m_CallBackTargetWindowPath.Clear(); // 부정 경로. 초기화 } }
void MkBodyFrameControlNode::SetObjectTemplate(MkDataNode& node) { MkWindowBaseNode::SetObjectTemplate(node); node.CreateUnit(ObjKey_HangingType, static_cast<int>(eHT_None)); }
void MkWindowBaseNode::UpdateCursorInput (const MkInt2& position, const MkInt2& movement, bool cursorInside, eButtonState leftBS, eButtonState middleBS, eButtonState rightBS, int wheelDelta) { if (cursorInside) { if (IsQuadForm()) { switch (leftBS) { case eBS_None: case eBS_Released: SetFormState(MkWindowThemeFormData::eS_Focus); break; case eBS_Pushing: case eBS_Pressed: case eBS_DoubleClicked: SetFormState(MkWindowThemeFormData::eS_Pushing); break; } } if (!m_CursorInside) { StartNodeReportTypeEvent(ePA_SNE_CursorEntered, NULL); } switch (leftBS) { case eBS_Released: _StartCursorReport(ePA_SNE_CursorLBtnReleased, position); m_HoldingEventType = ePA_SNE_None; break; case eBS_Pressed: _StartCursorReport(ePA_SNE_CursorLBtnPressed, position); _StartHoldingCheck(ePA_SNE_CursorLBtnHold, position); break; case eBS_DoubleClicked: _StartCursorReport(ePA_SNE_CursorLBtnDBClicked, position); _StartHoldingCheck(ePA_SNE_CursorLBtnHold, position); break; } switch (middleBS) { case eBS_Released: _StartCursorReport(ePA_SNE_CursorMBtnReleased, position); m_HoldingEventType = ePA_SNE_None; break; case eBS_Pressed: _StartCursorReport(ePA_SNE_CursorMBtnPressed, position); _StartHoldingCheck(ePA_SNE_CursorMBtnHold, position); break; case eBS_DoubleClicked: _StartCursorReport(ePA_SNE_CursorMBtnDBClicked, position); _StartHoldingCheck(ePA_SNE_CursorMBtnHold, position); break; } switch (rightBS) { case eBS_Released: _StartCursorReport(ePA_SNE_CursorRBtnReleased, position); m_HoldingEventType = ePA_SNE_None; break; case eBS_Pressed: _StartCursorReport(ePA_SNE_CursorRBtnPressed, position); _StartHoldingCheck(ePA_SNE_CursorRBtnHold, position); break; case eBS_DoubleClicked: _StartCursorReport(ePA_SNE_CursorRBtnDBClicked, position); _StartHoldingCheck(ePA_SNE_CursorRBtnHold, position); break; } // holding check if ((m_HoldingEventType == ePA_SNE_CursorLBtnHold) || (m_HoldingEventType == ePA_SNE_CursorMBtnHold) || (m_HoldingEventType == ePA_SNE_CursorRBtnHold)) { MkTimeState ts; MK_TIME_MGR.GetCurrentTimeState(ts); if (m_HoldingCounter.OnTick(ts)) { _StartCursorReport(m_HoldingEventType, position); m_HoldingEventType = ePA_SNE_None; } } if (wheelDelta != 0) { MkDataNode arg; arg.CreateUnit(MkWindowBaseNode::ArgKey_WheelDelta, wheelDelta); StartNodeReportTypeEvent(ePA_SNE_WheelMoved, &arg); } } else { if (IsQuadForm()) { SetFormState(MkWindowThemeFormData::eS_Normal); } StartNodeReportTypeEvent(ePA_SNE_CursorLeft, NULL); m_HoldingEventType = ePA_SNE_None; } m_CursorInside = cursorInside; }