Files
UnrealEngine/Engine/Source/Programs/Enterprise/Datasmith/DatasmithARCHICADExporter/Private/Palette.h
2025-05-18 13:04:45 +08:00

82 lines
1.7 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Utils/AddonTools.h"
#include "DG.h"
#include "Utils/ShellOpenDocument.h"
BEGIN_NAMESPACE_UE_AC
class FPaletteWindow;
class FPalette
{
public:
// Palette data saved in preferences
struct SPrefs
{
bool bShown;
bool bHiddenByUser;
bool bHiddenByAC;
bool bIsDocked;
};
// Toggle visibility of palette
static void ShowFromUser();
// Switch to another window
static void WindowChanged();
// AutoSync status changed
static void AutoSyncChanged();
// Delete palette
static void Delete();
static void Register();
static void Unregister();
static Int32 PaletteRefId();
static GS::Guid PaletteGuid;
private:
// Constructor
FPalette();
// Destructor
~FPalette();
// Create Palette and set CurrentPalette
static void Create();
// Save palette state to preferences
void Save2Pref();
short DlgCallBack(short message, short dialID, short item, DGMessageData MsgData);
GSErrCode PaletteControlCallBack(Int32 referenceID, API_PaletteMessageID messageID, GS::IntPtr param);
void ShowHide(bool ByUserFromMenu, bool BeginHide);
static void SetPaletteMenuTexts(bool PaletteIsOn, bool PaletteIsVisible);
# if AC_VERSION < 28
static GSErrCode __ACENV_CALL APIPaletteControlCallBack(Int32 referenceID, API_PaletteMessageID messageID,
GS::IntPtr /*param*/);
#else
static GSErrCode APIPaletteControlCallBack(Int32 referenceID, API_PaletteMessageID messageID,
GS::IntPtr /*param*/);
#endif
static short DGCALLBACK CntlDlgCallBack(short message, short dialID, short item, DGUserData userData,
DGMessageData MsgData);
static FPalette* CurrentPalette;
FPaletteWindow* Window = nullptr;
};
END_NAMESPACE_UE_AC