/////////////////////////////////////////////////////////////////////////////////////////
//
// Please refer to "COPYRIGHT.md" for the relevant copyright statement of this software.
//
/////////////////////////////////////////////////////////////////////////////////////////
//
#if !defined(_GCHTMLAPI_H_INCLUDED_)
#  define _GCHTMLAPI_H_INCLUDED_

#  if _MSC_VER >= 1000
#    pragma once
#  endif

class CGdUiPaletteSet;

GCCORE_PORT int gcedAddHTMLPalette(CGdUiPaletteSet* ps, const GCHAR* name, const GCHAR* uriOfHtmlPage);
GCCORE_PORT bool gcedShowHTMLModalWindow(HWND owner, const GCHAR* uriOfHtmlPage, bool persistSizeAndPosition = true);
GCCORE_PORT HWND gcedShowHTMLModelessWindow(HWND owner, const GCHAR* uriOfHtmlPage, bool persistSizeAndPosition = true);

struct HtmlWindowOptions
{
  enum HtmlWindowFlags
  {
    eAllowResize = 0x0001,
    eAllowMinimize = 0x0002,
    eAllowMaximize = 0x0004,
    eInitPosition = 0x0008,
    eInitSize = 0x0010,
    eMaxSize = 0x0020,
    eMinSize = 0x0040,
    ePersistSizeAndPosition = 0x0080,
    eCenterWindow = 0x0100,
    eDialogFrame = 0x0200,
    eAutoHiDpiScale = 0x0400,
    eTransparentHost = 0x0800
  };
  UINT flags = 0;
  int x = 0;
  int y = 0;
  UINT width = 0;
  UINT height = 0;
  UINT maxWidth = 0;
  UINT maxHeight = 0;
  UINT minWidth = 0;
  UINT minHeight = 0;
  UINT dialogTemplateId = 0;
  HWND ownerWindow = NULL;
  bool hasCustomHelp = false;
};

GCCORE_PORT bool gcedShowHTMLModalWindow(HWND owner, const GCHAR* uriOfHtmlPage, HtmlWindowOptions opts);

class GcApDocWindow;
GCCORE_PORT GcApDocWindow* gcedAddHTMLDocWindow(const GCHAR* title, const GCHAR* uriOfHtmlPage);
#endif