//========================================================================
// E3D library
//
// - Special Widget combos for 3D
//
// AUTHOR:  Gabor Nagy
// DATE:    2023-Aug-16 19:58:01
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//========================================================================
#ifndef _E3DPanelGUI_h
#define _E3DPanelGUI_h


#include <Xe/FSBox.h>

enum
{
	E3dpCR_SELECT_X_AXIS,
	E3dpCR_SELECT_Y_AXIS,
	E3dpCR_SELECT_Z_AXIS,
	E3dpCR_SET_AXIS_X,
	E3dpCR_SET_AXIS_Y,
	E3dpCR_SET_AXIS_Z
};

typedef struct  E3dpAxisSelector_S	E3dpAxisSelector;

typedef struct
{
	ECallbackStructCore;
} E3dAxisSelectorCallbackStruct;

//typedef void  (*E3dpAxisSelectorCallbackProc)(E3dpAxisSelector*, EPointer);

struct E3dpAxisSelector_S
{
	XeWidget       MatrixW,
	               XAxisBW, YAxisBW, ZAxisBW,
	               AxisXScaleW, AxisYScaleW, AxisZScaleW;
	E3dCoord3      Axis;
	ECallbackFunc  CallbackProc;
	EPointer       ClientData;
};

extern void  E3dpAxisSelector_Set(E3dpAxisSelector* PAxisSelector,  const E3dCoordinate PAxisX, const E3dCoordinate PAxisY, const E3dCoordinate PAxisZ);
extern void  E3dpAxisSelector_New(E3dpAxisSelector* PAxisSelector, const char* PLabelString, XeWidget PParentW, const EBool PCreateScales,  ECallbackFunc PCallbackProc, EPointer PClientData,  const E3dCoordinate PAxisX, const E3dCoordinate PAxisY, const E3dCoordinate PAxisZ);
extern void  E3dWidgetCombos_Exit(void);



#define E3dImageSourcePanelMAX_NTYPES  8

typedef struct
{
// The Widgets in TypeMatrixW (next to the texture type selector). These Widgets may need to be hidden/unhidden for each type.
// E.g. the camera source won't have a file name, load file button etc.
//
	XeWidget  TypeWidgets[E3dImageSourcePanelMAX_NTYPES];int  TypeWidgets_Count;
} E3dImageSourceUI;

typedef struct
{
	XeWidget              TypeMatrixW, TypeOptionMenuW;
	XeFileSelectionPanel  FileSelectionPanel;XeFSBoxCallbackFunc  FileSelectionCallbackFunc;
	XeCallbackFunc        CallbackFunc;
	EPointer              CallbackData;
	EListA(, E3dImageSourceUI, ImageSourceUIs);  // One for every registered TextureShaderClass
	EPointer              ParentPanel;
} E3dImageSourcePanel;

extern void  E3dpImageSourceSelector_Update(E3dImageSourcePanel* PImageSourcePanel,  E3d2DTexture* PTexture);
extern void  E3dpImageSourceSelector_New(E3dImageSourcePanel* PImageSourcePanel, EPointer PParentPanel, XeWidget PParentW, E3d2DTexture* PTexture,  XeCallbackFunc PCallbackFunc, XeFSBoxCallbackFunc PCallbackProc, EPointer PClientData);


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
}	// Close scope of 'extern "C"' declaration
#endif

#endif	// _E3DPanelGUI_h
