zioinfo-mail/app/node_modules/react-native-screens/windows/RNScreens/ScreenStack.cpp
DESKTOP-TKLFCPR\ython 11c670f2a0 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

66 lines
1.7 KiB
C++

#include "pch.h"
#include "ScreenStack.h"
#include "JSValueXaml.h"
#include "NativeModules.h"
namespace winrt {
using namespace Microsoft::ReactNative;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::UI;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
} // namespace winrt
namespace winrt::RNScreens::implementation {
ScreenStack::ScreenStack(
winrt::Microsoft::ReactNative::IReactContext reactContext)
: m_reactContext(reactContext),
m_children(
{winrt::single_threaded_vector<Windows::UI::Xaml::UIElement>()}) {}
void ScreenStack::addScreen(Screen &screen, int64_t) {
auto uiElement = screen.try_as<UIElement>();
if (!uiElement)
return;
m_children.Append(uiElement);
Content(uiElement);
}
void ScreenStack::removeAllChildren() {
Content(nullptr);
m_children.Clear();
}
void ScreenStack::removeChildAt(int64_t index) {
m_children.RemoveAt(static_cast<uint32_t>(index));
onChildModified(index);
}
void ScreenStack::replaceChild(
winrt::Windows::UI::Xaml::UIElement oldChild,
winrt::Windows::UI::Xaml::UIElement newChild) {
uint32_t index;
if (!m_children.IndexOf(oldChild, index))
return;
m_children.SetAt(index, newChild);
onChildModified(index);
}
void ScreenStack::onChildModified(int64_t index) {
// Was it the topmost item in the stack?
if (index >= m_children.Size() - 1) {
if (m_children.Size() == 0) {
// Nobody left
Content(nullptr);
} else {
// Focus on the top item
auto uiElement = m_children.GetAt(m_children.Size() - 1);
Content(uiElement);
}
}
}
} // namespace winrt::RNScreens::implementation