14#include "ff_basecollection.h"
15#if OPERATING_SYSTEM == MAC_OS
16#include <finaleframework_cocoa.h>
17#include <ff_cocoa_cppinterface.h>
19#ifdef PDK_FRAMEWORK_CANVASCTRL
20#include "ff_fcctrlcanvas.h"
23#ifdef PDK_FRAMEWORK_DIALOGS
27#ifdef PDK_FRAMEWORK_FILEDIALOGS
29#if OPERATING_SYSTEM == WINDOWS
56#ifndef DOXYGEN_SHOULD_IGNORE_THIS
60 int _defaultfilterindex;
70 _defaultfilterindex = 0;
72 const char*
ClassName()
const override {
return "__FCFileDialogBase"; }
89 if (!pFilterDescription)
return;
92 _filters.
Add(pNewString);
94 pNewString->
SetString(pFilterDescription);
95 _filterdescriptions.
Add(pNewString);
111 if (index < 0)
return;
112 if (index >= _filters.
GetCount())
return;
113 _defaultfilterindex = index;
158 if (!pString)
return;
169 if (!pString)
return;
179 if (!pString)
return;
193 if (!pszSuffix)
return false;
194 if (pszSuffix[0] !=
'.')
return false;
229 _multiselect =
false;
231 const char*
ClassName()
const override {
return "FCFileOpenDialog"; }
256 if (!pStrings)
return;
274 _pUI->_NotifyModalWindowWillOpen();
275 bool rslt = _Execute();
276 _pUI->_NotifyModalWindowDidClose();
298 const char*
ClassName()
const override {
return "FCFileSaveAsDialog"; }
306 _pUI->_NotifyModalWindowWillOpen();
307 bool rslt = _Execute();
308 _pUI->_NotifyModalWindowDidClose();
344 _usefinaleapi =
true;
346 const char*
ClassName()
const override {
return "FCFolderBrowseDialog"; }
392 if (!pString)
return;
404 if (!pString)
return;
435 _pUI->_NotifyModalWindowWillOpen();
436 bool rslt = _Execute();
437 _pUI->_NotifyModalWindowDidClose();
445#ifdef PDK_FRAMEWORK_DIALOGS
452#ifndef DOXYGEN_SHOULD_IGNORE_THIS
459struct _NONWINDOW_PROPERTY_BASE
464 _NONWINDOW_PROPERTY_BASE() =
default;
468struct _NONWINDOW_PROPERTY :
public _NONWINDOW_PROPERTY_BASE<T>
470 _NONWINDOW_PROPERTY() =
default;
471 _NONWINDOW_PROPERTY(
const T&& value) : _NONWINDOW_PROPERTY_BASE<T>()
474 void SetValue(
const T& newvalue) {
475 this->value = newvalue;
476 this->has_been_set =
true;
480struct _NONWINDOW_PROPERTY_FCSTRING :
public _NONWINDOW_PROPERTY<FCString>
482 _NONWINDOW_PROPERTY_FCSTRING() =
default;
484 void SetIntegerValue(
int anint) {
485 value.SetInteger(anint);
489#ifdef PDK_FRAMEWORK_PREFS
490 void SetMeasurementValue(
double measurement, twobyte measurementunit) {
491 value.SetMeasurement(measurement, measurementunit);
499struct _NONWINDOW_PROPERTY_FCSTRINGS :
public _NONWINDOW_PROPERTY_BASE<FCStrings>
501 _NONWINDOW_PROPERTY_FCSTRINGS() =
default;
503 void AppendString(
FCString* pString)
505 value.AddCopy(pString);
518struct _NONWINDOW_PROPERTY_FCNUMBERS :
public _NONWINDOW_PROPERTY_BASE<FCNumbers>
520 _NONWINDOW_PROPERTY_FCNUMBERS() =
default;
522 void AppendInt(
int anint)
528 void AppendFloat(
double afloat)
530 value.AddFloat(afloat);
545struct __FCUserWindow_NONWINDOWSTORAGE
547 _NONWINDOW_PROPERTY_FCSTRING title;
548 _NONWINDOW_PROPERTY<float> width;
549 _NONWINDOW_PROPERTY<float> height;
550 _NONWINDOW_PROPERTY<float> clientheight;
551 _NONWINDOW_PROPERTY<float> clientwidth;
565 FLAG_32 _lastcommandmodifierkeys;
569#if OPERATING_SYSTEM == WINDOWS
572 double _window_dpi_x;
573 double _window_dpi_y;
577#ifndef DOXYGEN_SHOULD_IGNORE_THIS
579 __FCUserWindow_NONWINDOWSTORAGE nonwindow_store;
580#if OPERATING_SYSTEM == WINDOWS
581 bool _wants_dpi_awareness;
586 twobyte _modalresult;
588#ifndef DOXYGEN_SHOULD_IGNORE_THIS
589#if OPERATING_SYSTEM == MAC_OS
591 _FCWindowController_cocoa* _pCocoaLink;
595 bool _pointsmeasurement;
596#if OPERATING_SYSTEM == WINDOWS
598 HINSTANCE _hRichEditDll;
600 float _maximumresizewidth;
601 float _minimumresizewidth;
602 float _maximumresizeheight;
603 float _minimumresizeheight;
604 float _oldresizewidth;
605 float _oldresizeheight;
608 bool _positionstored;
616 bool _isinwindowshademode;
617 float _nonwindowshadeheight;
619 bool _bufferedcontrolmovement;
620#if OPERATING_SYSTEM == WINDOWS
621 bool _initwindowcalled;
623 bool _restorepositioncalled;
625#if PDK_FRAMEWORK_DIAGNOSE
630 void _CheckControls();
633 friend class _FCWindowController_cocoa;
636#ifndef DOXYGEN_SHOULD_IGNORE_THIS
639 void _CreateDynamicControls();
647 virtual void _InitNonWindowHandleStates();
653 void _StoreNonWindowHandleStates();
657 bool _closewindowcalled;
666#ifndef DOXYGEN_SHOULD_IGNORE_THIS
668 FLAG_32 _GetLastCommandModifierKeys()
const {
return _lastcommandmodifierkeys; }
671 void _SetLastCommandModifierKeys(FLAG_32 value) { _lastcommandmodifierkeys = value; }
673#if OPERATING_SYSTEM == WINDOWS
675 void _LoadRichEditDll();
719 _lastcommandmodifierkeys = 0x0;
720 _preventclose =
false;
721 _pointsmeasurement =
false;
722#if OPERATING_SYSTEM == MAC_OS
726 _wants_dpi_awareness =
false;
727 _is_dpi_aware =
false;
731 _hRichEditDll = NULL;
735 _closewindowcalled =
false;
736 _maximumresizewidth = _minimumresizewidth =
737 _maximumresizeheight = _minimumresizeheight =
738 _oldresizewidth = _oldresizeheight = 0;
739 _positionstored = _sizestored =
false;
740 _isinwindowshademode =
false;
741 _nonwindowshadeheight = 0;
742 WINCODE(_initwindowcalled =
false;)
743 _restorepositioncalled =
false;
744 _bufferedcontrolmovement =
false;
749#if OPERATING_SYSTEM == WINDOWS
750 DeleteObject(_shellfont);
754 FreeLibrary(_hRichEditDll);
755 _hRichEditDll = NULL;
760 const char*
ClassName()
const override {
return "__FCUserWindow"; }
772#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
779 FXWND hParent = WINCODE(GetWindowHandle()) MACCODE(
nullptr);
780 return new _NOLUACODE(
FCUI(hParent)) _LUACODE(
FCUI(hParent, L));
783#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
785 luabridge::RefCountedPtr<FCUI> CreateChildUI_GC(lua_State* L)
796 return _pointsmeasurement;
802#ifndef DOXYGEN_SHOULD_IGNORE_THIS
804 void _WinStoreModifierKeys();
806 void _SetPointsMeasurement(
bool use_points)
808 _pointsmeasurement = use_points;
812 void _SetModalResult(twobyte modalresultid) { _modalresult = modalresultid; }
814 bool _GetCloseWindowCalled() {
return _closewindowcalled; }
821 void _HandleResizeChange(
int newwidth,
int newheight);
823#if OPERATING_SYSTEM == WINDOWS
829 void _SetModelessEnabledState();
831 void _call_FX_Dialog(
832 const twobyte nDlgID,
833 FF_DialogHandlerUPP lpCallBack,
835 const twobyte dlgFlags,
839 bool _GetIsDpiAware()
const {
return _is_dpi_aware; }
841 double _GetWindowDpiX()
const {
return _window_dpi_x; }
843 double _GetWindowDpiY()
const {
return _window_dpi_y; }
845 HFONT _GetShellFont()
const {
return _shellfont; }
847 void _SetWindowDpiFromSystem();
853 double _WinHorizPixelsToPoints(
double value)
const;
855 double _WinVertPixelsToPoints(
double value)
const;
857 double _WinHorizPointsToPixels(
double value)
const;
859 double _WinVertPointsToPixels(
double value)
const;
961 return ((_lastcommandmodifierkeys & modifiers) == modifiers);
982#ifndef DOXYGEN_SHOULD_IGNORE_THIS
983#if OPERATING_SYSTEM == MAC_OS
985 _FCWindowController_cocoa* _GetCocoaLink()
const
990 virtual bool ModelessCancelCanEscape()
const {
return false; }
995 void _SetWindowHandle(EWND hwnd) {
999 EWND GetWindowHandle()
const {
return _hwnd; }
1008 _maximumresizewidth = width;
1009#if OPERATING_SYSTEM == MAC_OS
1011 _FCWindowController_cocoa* pCocoaLink = _GetCocoaLink();
1012 if (!pCocoaLink)
return;
1013 pCocoaLink->SetMaximumResizeWidth(width);
1022 _maximumresizeheight = height;
1023#if OPERATING_SYSTEM == MAC_OS
1025 _FCWindowController_cocoa* pCocoaLink = _GetCocoaLink();
1026 if (!pCocoaLink)
return;
1027 pCocoaLink->SetMaximumResizeHeight(height);
1034 return _minimumresizewidth;
1040 if (_isinwindowshademode)
return 0;
1041 return _minimumresizeheight;
1047 return _maximumresizewidth;
1053 return _maximumresizeheight;
1127 _SetModalResult(IDOK);
1142 _SetModalResult(IDCANCEL);
1258 virtual void HandleResize([[maybe_unused]]
int newwidth, [[maybe_unused]]
int newheight, [[maybe_unused]]
int oldwidth, [[maybe_unused]]
int oldheight) {}
1296 void SetTimer(twobyte timerID, ufourbyte msInterval);
1423#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1425 void _SetRestorePositionCalled(
bool value)
1427 _restorepositioncalled = value;
1430#if OPERATING_SYSTEM == WINDOWS
1432 void _WinSetInitWindowCalled(
bool value)
1434 _initwindowcalled = value;
1439 void _WinPostRestorePosition()
1441 if (!_initwindowcalled)
return;
1442 if (!_restorepositioncalled)
return;
1449#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1455struct __FCControl_NONWINDOWSTORAGE
1457 _NONWINDOW_PROPERTY_FCSTRING text;
1458 _NONWINDOW_PROPERTY<bool> enabled;
1459 _NONWINDOW_PROPERTY<bool> visible;
1460 _NONWINDOW_PROPERTY<float> left;
1461 _NONWINDOW_PROPERTY<float> top;
1462 _NONWINDOW_PROPERTY<float> width;
1463 _NONWINDOW_PROPERTY<float> height;
1483#ifdef PDK_FRAMEWORK_IMAGECTRL
1486#ifdef PDK_FRAMEWORK_CANVASCTRL
1490using __FCControlTypedPtr = std::variant<
1491#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1494#ifdef PDK_FRAMEWORK_CANVASCTRL
1497#ifdef PDK_FRAMEWORK_IMAGECTRL
1537#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1538 const __FCControlTypedPtr _subtypeptr;
1542#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1543 std::unique_ptr<FCFontInfo> _fontinfo;
1544#if OPERATING_SYSTEM == WINDOWS
1545 HFONT _storednewfont;
1562#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1564 __FCControl_NONWINDOWSTORAGE nonwindow_store;
1566#if OPERATING_SYSTEM == WINDOWS
1568 int _WinCalcFontHeightFromSize(HDC hDC,
int size);
1573 virtual double _CalcNonTextWidth()
const {
return 0.0; }
1574 double _CalcNonTextWidthFromTheme(
int partID,
int stateID,
double additionalHardcodedValue,
double fallbackHardcodedValue)
const;
1579 bool _pointsmeasurement;
1581 bool _programmaticallycreate;
1582 bool _autoresizewidth;
1583 std::map<int, int> _nooverlapControls;
1585 bool _alignwithRight;
1586 double _alignwithOffset;
1589 bool _bufferedmove, _bufferedresize;
1590 float _bufferedx{}, _bufferedy{}, _bufferedwidth{}, _bufferedheight{};
1598 WINCODE(_storednewfont = 0;)
1599 _pointsmeasurement =
false;
1600 _programmaticallycreate =
false;
1601 _autoresizewidth =
false;
1603 _alignwithRight =
false;
1604 _alignwithOffset = 0.0;
1605 _stretchtofit =
false;
1606 _controlaction = ACTION_NONE;
1608 _ResetBufferedMovement();
1612#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1616 CONTROLTYPE_UNDEFINED = 0,
1618 CONTROLTYPE_DATALIST,
1621 CONTROLTYPE_CHECKBOX,
1622 CONTROLTYPE_RADIOBUTTON,
1626 CONTROLTYPE_COMBOBOX,
1629 CONTROLTYPE_LISTBOX,
1630 CONTROLTYPE_SWITCHER,
1633 CONTROLTYPE_TEXTEDITOR
1637 const char*
ClassName()
const override {
return "FCControl"; }
1639#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1645 static int FCControl_tostring(lua_State* L)
1647 FCControl* pThis = luabridge::Stack<FCControl*>::get(L, 1) LB3(.value());
1648 std::
string s = std::
string(pThis->
ClassName()) + ": (ID " + std::to_string(pThis->
GetControlID()) + ")";
1649 luabridge::Stack<std::
string>::push(L, s).throw_on_error();
1667 FCControl(twobyte
id,
const __FCControlTypedPtr &subclassPtr) :
__FCBase(), _id(id), _subtypeptr(subclassPtr)
1670#ifndef PDK_FRAMEWORK_LUAFRIENDLY
1683 WINCODE(DeleteObject(_storednewfont);)
1686#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1687#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1691 template<
class F,
typename... Args>
1692 luabridge::LuaResult _LuaCallEventHandler(luabridge::LuaRef luaRef, F&& errorHandler, Args... args)
1694 assert(luaRef.isFunction());
1695 return std::visit([&](
auto const &ptr)
1697 return luaRef.callWithHandler(errorHandler, ptr, args...);
1709#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1711 void _SetPointsMeasurement(
bool use_points) { _pointsmeasurement = use_points; }
1714 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_UNDEFINED; }
1720 virtual double _GetAutoCreateWidth() {
return 70; }
1726 virtual float _GetAutoCreateMultilineHeight() {
return 150; }
1731 virtual bool _TextColorSet()
const {
return false; }
1734 bool _GetAutoResizeWidth()
const {
return _autoresizewidth; }
1737 std::map<int, int> _GetNoOverlapControls()
const {
return _nooverlapControls; }
1740 FCControl* _GetHorizontallyAlignWith()
const
1742 return (_pParent && _alignwithID) ? _pParent->
FindControl(_alignwithID) :
nullptr;
1746 bool _GetHorizontallyAlignWithRight()
const {
return _alignwithRight; }
1749 double _GetAlignLeft() {
return std::round(
GetLeft() - _alignwithOffset); }
1752 double _GetAlignRight() {
return std::round(
GetLeft() +
GetWidth() - _alignwithOffset); }
1755 bool _GetStretchToAlignRight()
const {
return _stretchtofit; }
1757#if OPERATING_SYSTEM == WINDOWS
1762 bool _WinCreateUIControl(
int height_DU, LPCSTR classnameA, LPCWSTR classnameW, DWORD style, DWORD exstyle);
1765 virtual COLORREF _GetWindowsColor()
const {
return RGB(0, 0, 0); }
1767#ifdef PDK_FRAMEWORK_DPIAWARE
1769 virtual void _OnDpiChanged();
1777 bool _CreateUIControl();
1785 virtual void _InitNonWindowHandleStates();
1793 virtual void _StoreNonWindowHandleStates();
1798 _pParent = parentptr;
1805 void _SetProgrammaticallyCreate(
bool state) { _programmaticallycreate = state; }
1808 bool _GetProgrammaticallyCreate() {
return _programmaticallycreate; }
1818 if (!_pParent)
return false;
1819#if OPERATING_SYSTEM == WINDOWS
1822 if (!_GetCocoaLink())
return false;
1827#ifndef DOXYGEN_SHOULD_IGNORE_THIS
1828#if OPERATING_SYSTEM == MAC_OS
1830 _FCWindowController_cocoa* _GetCocoaLink()
const
1832 return _pParent ? _pParent->_GetCocoaLink() : NULL;
1836 HWND GetWindowHandle()
const {
return _pParent ? _pParent->GetWindowHandle() : 0; }
1840#if OPERATING_SYSTEM == WINDOWS
1845 if (!GetWindowHandle())
return 0;
1856#if OPERATING_SYSTEM == WINDOWS
1932 virtual void SetBold(
bool state);
1972#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
1974 luabridge::RefCountedPtr<FCFontInfo> CreateFontInfo_GC()
1986#if OPERATING_SYSTEM == MAC_OS
2047 _alignwithID = pControl ? pControl->
GetControlID() : 0;
2048 _alignwithRight =
false;
2049 _alignwithOffset = pControl ? offset : 0;
2052#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2054 int HorizontallyAlignLeftWith_CFunc(lua_State *L)
2056 const int numArgs = lua_gettop(L);
2058 const FCControl* pControl = luabridge::Stack<const FCControl*>::get(L, 2) LB3(.value());
2059 double offset = (numArgs < 3) ? 0 : luabridge::Stack<
double>::get(L, 3) LB3(.value());;
2078 _alignwithID = pControl ? pControl->
GetControlID() : 0;
2079 _alignwithRight = pControl ? true :
false;
2080 _alignwithOffset = pControl ? offset : 0;
2083#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2085 int HorizontallyAlignRightWith_CFunc(lua_State *L)
2087 const int numArgs = lua_gettop(L);
2089 const FCControl* pControl = luabridge::Stack<const FCControl*>::get(L, 2) LB3(.value());
2090 double offset = (numArgs < 3) ? 0 : luabridge::Stack<
double>::get(L, 3) LB3(.value());;
2108 _alignwithRight =
true;
2109 _alignwithOffset = offset;
2112#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2114 static int HorizontallyAlignRightWithFurthest_CFunc(lua_State *L)
2116 return _CFunctionOneOptionalParameter<FCControl, void, double, &FCControl::HorizontallyAlignRightWithFurthest>(L, 0);
2134 _autoresizewidth =
true;
2135 if (minimumwidth.has_value())
2139#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
2141 static int DoAutoResizeWidth_CFunc(lua_State *L)
2260 virtual void ResizeRelative(
float horizresize,
float vertresize);
2275#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2280 bool _HasBufferedMovement()
2282 return (_bufferedmove || _bufferedresize);
2286 void _ResetBufferedMovement()
2288 _bufferedmove = _bufferedresize =
false;
2292 void _GetBufferedMovement(
bool *pshouldmove,
bool *pshouldresize,
2293 float *px,
float *py,
float *pwidth,
float *pheight)
2295 *pshouldmove = _bufferedmove;
2296 *pshouldresize = _bufferedresize;
2299 *pwidth = _bufferedwidth;
2300 *pheight = _bufferedheight;
2307 void _BufferMove(
float x,
float y)
2309 _bufferedmove =
true;
2318 void _BufferResize(
float width,
float height)
2320 _bufferedresize =
true;
2321 _bufferedwidth = width;
2322 _bufferedheight = height;
2325#ifdef PDK_FRAMEWORK_DIAGNOSE
2330 bool _ControlExists();
2335 void _ControlClassCheck();
2345 virtual const char* _WinGetUIClassName()
const = 0;
2354 virtual const char* _MacGetUIClassName()
const = 0;
2370 struct __FCCtrlUpDown_NONWINDOWSTORAGE
2372 _NONWINDOW_PROPERTY<int> steppervalue;
2373 _NONWINDOW_PROPERTY<int> min;
2374 _NONWINDOW_PROPERTY<int> max;
2375 } updown_nonwindow_store;
2378 void _InitNonWindowHandleStates()
override;
2381 void _StoreNonWindowHandleStates()
override;
2386 CONNECTED_MEASUREMENT
2387 } _connectededitmode;
2392 double _minMeasurement;
2393 double _maxMeasurement;
2399 _connectededitmode = CONNECTED_NONE;
2400 _pConnectedEditControl = NULL;
2401 _minInt = _maxInt = 0;
2402 _minMeasurement = _maxMeasurement = 0;
2406 const char*
ClassName()
const override {
return "FCCtrlUpDown"; }
2413 void SetValue(
int value);
2425 void SetRange(
int min,
int max);
2445#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2446 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_UPDOWN; }
2448 double _GetAutoCreateWidth()
override {
return WINCODE(14;) MACCODE(19;) }
2465 if (!pControl)
return false;
2466 if (max < min)
return false;
2467 _connectededitmode = CONNECTED_INT;
2468 _pConnectedEditControl = pControl;
2471#if OPERATING_SYSTEM == MAC_OS
2491 if (!pControl)
return false;
2492 if (max < min)
return false;
2493 _connectededitmode = CONNECTED_MEASUREMENT;
2494 _pConnectedEditControl = pControl;
2495 _minMeasurement = min;
2496 _maxMeasurement = max;
2497#if OPERATING_SYSTEM == MAC_OS
2498 SetRange((
int) min, (
int) max);
2503#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2505 void _HandleConnectedEditEvent(
int delta);
2508#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2509 const char* _WinGetUIClassName()
const override {
return "msctls_updown32"; }
2510 const char* _MacGetUIClassName()
const override {
return "NSStepper"; }
2525#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2526 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_LINE; }
2528 double _GetAutoCreateWidth()
override {
return 150; }
2536#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2538 FCCtrlLine(twobyte
id,
const __FCControlTypedPtr &subclassPtr,
bool horizontal)
2539 :
FCControl(
id, subclassPtr), _horizontal(horizontal) {}
2543 const char*
ClassName()
const override {
return "FCCtrlLine"; }
2551#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2552 void SetEnable(
bool WINCODE(state))
override
2554#if OPERATING_SYSTEM == WINDOWS
2559 bool GetEnable()
const override
2561#if OPERATING_SYSTEM == WINDOWS
2574#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2575 const char* _WinGetUIClassName()
const override {
return "Static"; }
2576 const char* _MacGetUIClassName()
const override {
return "NSBox"; }
2589 const char*
ClassName()
const override {
return "FCCtrlHorizontalLine"; }
2604 const char*
ClassName()
const override {
return "FCCtrlVerticalLine"; }
2616#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2617 _NONWINDOW_PROPERTY<int> _textColorRed;
2618 _NONWINDOW_PROPERTY<int> _textColorGreen;
2619 _NONWINDOW_PROPERTY<int> _textColorBlue;
2621 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_STATIC; }
2623 double _GetAutoCreateWidth()
override {
return 100; }
2626 void _InitNonWindowHandleStates()
override
2628 FCControl::_InitNonWindowHandleStates();
2629 if (_TextColorSet()) SetTextColor(_textColorRed.value, _textColorGreen.value, _textColorBlue.value);
2633 const char*
ClassName()
const override {
return "FCCtrlStatic"; }
2642 void SetInteger(
int anint);
2655 void SetTextColor(
int red,
int green,
int blue);
2657#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2661 bool _TextColorSet()
const override {
return _textColorRed.has_been_set; }
2662#if OPERATING_SYSTEM == WINDOWS
2663 COLORREF _GetWindowsColor()
const override {
return RGB(_textColorRed.value, _textColorGreen.value, _textColorBlue.value); }
2667#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2668 const char* _WinGetUIClassName()
const override {
return "Static"; }
2669 const char* _MacGetUIClassName()
const override {
return "NSTextField"; }
2681#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2682 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_EDIT; }
2684 double _GetAutoCreateWidth()
override {
return 70; }
2686#if OPERATING_SYSTEM == WINDOWS
2687 double _CalcNonTextWidth()
const override {
return 4.0; }
2694#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2696 FCCtrlEdit(twobyte
id,
const __FCControlTypedPtr &subclassPtr) :
FCControl(
id, subclassPtr) {}
2700 const char*
ClassName()
const override {
return "FCCtrlEdit"; }
2721 int GetRangeInteger(
int minimum,
int maximum);
2723#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2724 void SetEnable(
bool state)
override
2726#if OPERATING_SYSTEM == MAC_OS
2727 if (WindowExists() && !state)
2742#ifdef PDK_FRAMEWORK_PREFS
2753 double GetMeasurement(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2770 double GetRangeMeasurement(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit,
double min,
double max);
2786 float f = GetMeasurement(measurementunit);
2810 float f = GetRangeMeasurement(measurementunit, min / 64, max / 64);
2827 void SetMeasurement(
double value, _ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2844 SetMeasurement(value, measurementunit);
2858 double GetMeasurementInteger(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2875 double GetRangeMeasurementInteger(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit,
int min,
int max);
2888 void SetMeasurementInteger(
double value, _ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2895 void SetInteger(
int anint);
2901 void SetFloat(
double value);
2907 double GetFloat(
double min,
double max);
2910 void AdjustIntegerWithin(
int min,
int max);
2920#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2921#if OPERATING_SYSTEM == WINDOWS
2922 void SetKeyboardFocus()
override
2923 { FX_SetDlgFocus(GetWindowHandle(), GetControlID()); }
2931 void SetMaxLength(twobyte maxlength);
2934 void SetReadOnly(
bool readonly);
2937 void ScrollToBottom();
2939#ifndef DOXYGEN_SHOULD_IGNORE_THIS
2940 const char* _WinGetUIClassName()
const override {
return "Edit"; }
2941 const char* _MacGetUIClassName()
const override {
return "NSTextField;NSSearchField"; }
2953 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_POPUP; }
2955 double _GetAutoCreateWidth()
override {
return 100; }
2957 struct __FCCtrlPopup_NONWINDOWSTORAGE
2959 _NONWINDOW_PROPERTY<int> selecteditem;
2960 _NONWINDOW_PROPERTY_FCSTRINGS items;
2961 } popup_nonwindow_store;
2963#if OPERATING_SYSTEM == WINDOWS
2964 double _CalcNonTextWidth()
const override;
2968 void _InitNonWindowHandleStates()
override;
2971 void _StoreNonWindowHandleStates()
override;
2973 const char*
ClassName()
const override {
return "FCCtrlPopup"; }
2979 bool AssureWidthForText()
override;
3002 void InsertString(
int index,
FCString* pString);
3016 if (!pStrings)
return;
3017 for (
int i = 0; i < pStrings->
GetCount(); i++)
3030 void DeleteItem(
int index);
3036 int GetCount()
const;
3044 int GetSelectedItem()
const;
3052 void SetSelectedItem(
int index);
3060 bool GetItemText(
int index,
FCString* pString);
3068 void SetItemText(
int index,
FCString* pString);
3070#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3071 const char* _WinGetUIClassName()
const override {
return "ComboBox"; }
3072 const char* _MacGetUIClassName()
const override {
return "NSPopUpButton"; }
3085 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_COMBOBOX; }
3087 double _GetAutoCreateWidth()
override {
return 100; }
3089 struct __FCCtrlPopup_NONWINDOWSTORAGE
3091 _NONWINDOW_PROPERTY<int> selecteditem;
3092 _NONWINDOW_PROPERTY_FCSTRINGS items;
3093 } cbobox_nonwindow_store;
3095#if OPERATING_SYSTEM == WINDOWS
3096 double _CalcNonTextWidth()
const override;
3100 void _InitNonWindowHandleStates()
override;
3103 void _StoreNonWindowHandleStates()
override;
3106 const char*
ClassName()
const override {
return "FCCtrlComboBox"; }
3112 bool AssureWidthForText()
override;
3136 if (!pStrings)
return;
3137 for (
int i = 0; i < pStrings->
GetCount(); i++)
3157 int GetSelectedItem();
3165 void SetSelectedItem(
int index);
3167#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3168 const char* _WinGetUIClassName()
const override {
return "ComboBox"; }
3169 const char* _MacGetUIClassName()
const override {
return "NSComboBox"; }
3186 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_TEXTEDITOR; }
3188 double _GetAutoCreateWidth()
override {
return 200; }
3190 float _GetAutoCreateMultilineHeight()
override {
return 150; }
3192 struct __FCCtrlTextEditor_NONWINDOWSTORAGE
3194 _NONWINDOW_PROPERTY<bool> readonly;
3195 _NONWINDOW_PROPERTY<bool> wordwrap;
3196 _NONWINDOW_PROPERTY<bool> richtext;
3197 _NONWINDOW_PROPERTY<bool> autoediting;
3198 _NONWINDOW_PROPERTY<double> tabwidth;
3199#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3200 _NONWINDOW_PROPERTY_FCSTRING enigmastring;
3202 _NONWINDOW_PROPERTY<int> parseextag;
3203 _NONWINDOW_PROPERTY<double> linespacing;
3205 __FCCtrlTextEditor_NONWINDOWSTORAGE()
3206 : wordwrap(
true), richtext(
true), autoediting(
true), parseextag(tx_TextBlock) {}
3207 } edittext_nonwindow_store;
3213 void _InitNonWindowHandleStates()
override;
3216 void _StoreNonWindowHandleStates()
override;
3218#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3220 bool _ReplaceTextInRangeWithEnigmaString(
const FCString* pString,
const FCRange* pRange =
nullptr);
3223 bool _SetColorInRange(
int red,
int green,
int blue,
bool reset,
bool background,
const FCRange* pRange);
3224 std::tuple<int, int, int> _GetColorAtIndex(
int index,
bool background)
const;
3225 FCRanges* _CreateColorChanges(
bool background)
const;
3227 std::unique_ptr<FCRange> _CreateAdjustedRange(
const FCRange* pRange)
const
3229 std::unique_ptr<FCRange> adjustedRange = std::make_unique<FCRange>();
3230 GetTotalTextRange(adjustedRange.get());
3231 adjustedRange->SetStart((std::max)(adjustedRange->GetStart(), pRange->
GetStart()));
3232 adjustedRange->SetLength((std::min)(adjustedRange->GetLength(), pRange->
GetLength()));
3233 return adjustedRange;
3236#if OPERATING_SYSTEM == WINDOWS
3241 std::pair<bool, POINT> FCCtrlTextEditor::_SetNotifySelectionChanges(
bool newStatus,
const std::optional<POINT> oldScrollPos = std::nullopt)
const;
3245 const char*
ClassName()
const override {
return "FCCtrlTextEditor"; }
3254 FCControl::nonwindow_store.enabled.SetValue(
true);
3260 FCControl::SetParent(parentptr);
3261 WINCODE(parentptr->_LoadRichEditDll());
3273 STRFINDOPT_IGNORECASE = 0x01,
3276 STRFINDOPT_WHOLEWORDS = 0x02,
3279 STRFINDOPT_REGEX = 0x04
3282#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3283 void SetFont(
const FCFontInfo* fontInfo)
override;
3284#if OPERATING_SYSTEM == WINDOWS
3286 void GetText(
FCString* pText)
const override;
3290#ifndef DOXYGEN_SHOULD_IGNORE_THIS
3291 void SetEnable(
bool state)
override
3293 FCControl::nonwindow_store.enabled.SetValue(state);
3294#if OPERATING_SYSTEM == WINDOWS
3295 if (!WindowExists())
return;
3296 HWND hCtrl = GetDlgItem(GetWindowHandle(), GetControlID());
3297 EnableWindow(hCtrl, state);
3301 SetReadOnly(edittext_nonwindow_store.readonly.value);
3305 bool GetEnable()
const override
3307#if OPERATING_SYSTEM == WINDOWS
3308 if (!WindowExists())
return nonwindow_store.enabled.value;
3309 HWND hCtrl = GetDlgItem(GetWindowHandle(), GetControlID());
3310 return IsWindowEnabled(hCtrl);
3312 return FCControl::nonwindow_store.enabled.value;
3329 bool GetTotalTextRange(
FCRange* pRange)
const;
3340 int GetLineForPosition(
int pos)
const;
3352 GetSelection(&currSel);
3353 return GetLineForPosition(currSel.
GetStart());
3364 bool GetLineRangeForLine(
int line,
FCRange* pRange)
const;
3378#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3380 int CreateLineRanges_GC(lua_State *L)
3382 const int numArgs = lua_gettop(L);
3384 const FCRange * pRange = (numArgs < 2) ? nullptr : luabridge::Stack<const FCRange *>::get(L, 2) LB3(.value());;
3385 luabridge::Stack<luabridge::RefCountedPtr<FCRanges>>::push(L, makeLuaSharedPtr(CreateLineRanges(pRange))) LB3(.throw_on_error());
3400 bool GetLineRangeForPosition(
int pos,
FCRange* pRange)
const;
3413 bool GetSelection(
FCRange *pRange)
const;
3425 bool SetSelection(
const FCRange* pRange);
3434 if (! GetTotalTextRange(&totalRange))
3436 return SetSelection(&totalRange);
3466 bool ReplaceTextInRange(
const FCString *pText,
const FCRange* pRange);
3480#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3490 if (!pString || !pRange)
return false;
3491 return _ReplaceTextInRangeWithEnigmaString(pString, pRange);
3507 if (! GetSelection(&range))
return false;
3508 return GetTextInRange(pText, &range);
3523 if (! GetSelection(&range))
return false;
3524 return ReplaceTextInRange(pText, &range);
3537 void InsertTextAtCursor(
const FCString *pText);
3545 void AppendText(
const FCString *pText);
3587#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3589 luabridge::RefCountedPtr<FCString> CreateRTFString_GC()
3590 {
return makeLuaSharedPtr(CreateRTFString()); }
3593#ifdef PDK_FRAMEWORK_ENIGMASTRINGS
3618#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3621 luabridge::RefCountedPtr<FCString>CreateEnigmaString_GC(
const FCRange* pRange)
3622 {
return makeLuaSharedPtr(CreateEnigmaString(pRange)); }
3625 static int CreateEnigmaString_CFunc(lua_State* L)
3627 return _CFunctionOneOptionalParameter<FCCtrlTextEditor, luabridge::RefCountedPtr<FCString>,
const FCRange*, &FCCtrlTextEditor::CreateEnigmaString_GC>(L,
nullptr);
3646 bool SetRTFString(
const FCString* pString);
3682 edittext_nonwindow_store.parseextag.SetValue(FCRawText::_exTagFromRawTextType(
static_cast<FCRawText::RAWTEXTTYPES>(rawtexttype)));
3683 return _ReplaceTextInRangeWithEnigmaString(pString);
3686#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3688 int SetEnigmaString_CFunc(lua_State* L)
3690 const int numArgs = lua_gettop(L);
3692 const FCString * pString = luabridge::Stack<const FCString *>::get(L, 2) LB3(.value());
3693 const
int rawtexttype = (numArgs < 3) ? 0 : luabridge::Stack<
int>::get(L, 3) LB3(.value());
3694 luabridge::Stack<
bool>::push(L, SetEnigmaString(pString, rawtexttype)) LB3(.throw_on_error());
3711 FCFontInfo* CreateFontInfoAtIndex(
int index)
const;
3713#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3715 luabridge::RefCountedPtr<FCFontInfo> CreateFontInfoAtIndex_GC(
int index)
3716 {
return makeLuaSharedPtr(CreateFontInfoAtIndex(index)); }
3736 bool SetFontForSelection(
const FCFontInfo* pFont);
3746 bool SetFontSizeInRange(
int size,
const FCRange* pRange);
3755 bool SetFontSizeForSelection(
int size);
3765 bool SetFontBoldInRange(
bool state,
const FCRange* pRange);
3774 bool SetFontBoldForSelection(
bool state);
3784 bool SetFontItalicInRange(
bool state,
const FCRange* pRange);
3793 bool SetFontItalicForSelection(
bool state);
3799 void SetReadOnly(
bool readonly);
3805 bool GetReadOnly()
const;
3815 void SetWordWrap(
bool wordwrap);
3821 bool GetWordWrap()
const {
return edittext_nonwindow_store.wordwrap.value; }
3830 void SetUseRichText(
bool state);
3845 bool GetUseRichText()
const;
3854 void SetAutomaticEditing(
bool state);
3876 void SetTabstopWidth(
double value);
3924 FCRanges* CreateRangesForString(
const FCString* pSearchString, FLAG_32 options,
const FCRange* pRange =
nullptr)
const;
3926#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
3928 int CreateRangesForString_CFunc(lua_State *L)
const
3930 const int numArgs = lua_gettop(L);
3932 const FCString * pString = luabridge::Stack<const FCString *>::get(L, 2) LB3(.value());
3933 const FLAG_32 options = luabridge::Stack<FLAG_32>::get(L, 3) LB3(.value());
3934 const
FCRange * pRange = (numArgs < 4) ?
nullptr : luabridge::Stack<const
FCRange *>::get(L, 4) LB3(.value());;
3935 luabridge::Stack<luabridge::RefCountedPtr<
FCRanges>>::push(L, makeLuaSharedPtr(CreateRangesForString(pString, options, pRange))) LB3(.throw_on_error());
3947 void ResetUndoState();
3966 return _SetColorInRange(red, green, blue,
false,
false, pRange);
3982 return _SetColorInRange(red, green, blue,
false,
true, pRange);
3996 return _SetColorInRange(0, 0, 0,
true,
false, pRange);
4009 return _SetColorInRange(0, 0, 0,
true,
true, pRange);
4021 GetTotalTextRange(&range);
4023 if (!ResetTextColorInRange(&range)) retval =
false;
4024 if (!ResetBackgroundColorInRange(&range)) retval =
false;
4042 return _GetColorAtIndex(index,
false);
4059 return _GetColorAtIndex(index,
true);
4073 return _CreateColorChanges(
false);
4076#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
4078 luabridge::RefCountedPtr<FCRanges> CreateTextColorChanges_GC()
const
4079 {
return makeLuaSharedPtr(CreateTextColorChanges()); }
4093 return _CreateColorChanges(
true);
4096#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
4098 luabridge::RefCountedPtr<FCRanges> CreateBackgroundColorChanges_GC()
const
4099 {
return makeLuaSharedPtr(CreateBackgroundColorChanges()); }
4112 int GetNumberOfLines()
const;
4120 double GetVerticalScrollPosition()
const;
4132 void ScrollToBottom();
4141 void ScrollToVerticalPosition(
double vpos);
4149 void ScrollLineIntoView(
int line);
4159 double GetLineSpacing()
const;
4174 void SetLineSpacing(
double value);
4192 FCString* CreateCharacterAtIndex(
int pos)
const;
4194#ifdef PDK_FRAMEWORK_LUAFRIENDLY_CPP
4196 luabridge::RefCountedPtr<FCString> CreateCharacterAtIndex_GC(
int pos)
4197 {
return makeLuaSharedPtr(CreateCharacterAtIndex(pos)); }
4212 bool TextToClipboard()
const;
4214#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4215 const char* _WinGetUIClassName()
const override {
return "RICHEDIT50W"; }
4216 const char* _MacGetUIClassName()
const override {
return "NSTextView"; }
4234 int _connectedlineindex;
4238#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4245 void _SetCheckState(
bool state) { _checked = state; }
4255 _connectedlineindex = -1;
4256 _connectedlist = NULL;
4258 const char*
ClassName()
const override {
return "FCDataListRow"; }
4264 void SetCheck(
bool state);
4293 bool _usecheckboxes;
4297#if OPERATING_SYSTEM == MAC_OS
4301 class __FCDataList_NONWINDOWSELECTION
4303 _NONWINDOW_PROPERTY<int> focusindex;
4304 std::set<int> selectedindices;
4306 __FCDataList_NONWINDOWSELECTION()
4308 focusindex.value = -1;
4310 bool has_been_set()
const {
return focusindex.has_been_set; }
4311 int get_focus_index()
const {
return focusindex.value; }
4312 void select_line(
int index)
4314 if (index < 0)
return;
4315 selectedindices.insert(index);
4316 focusindex.SetValue(index);
4318 void select_line_exclusive(
int index)
4320 selectedindices.clear();
4323 void unselect_line(
int index)
4325 if (index < 0)
return;
4326 selectedindices.erase(index);
4327 if (!is_line_selected(get_focus_index()))
4329 if (selectedindices.size() <= 0)
4330 focusindex.SetValue(-1);
4332 focusindex.SetValue(*selectedindices.begin());
4337 selectedindices.clear();
4338 focusindex.SetValue(-1);
4340 bool is_line_selected(
int index)
const
4342 return selectedindices.find(index) != selectedindices.end();
4344 } datalist_nonwindow_selection;
4346 struct __FCDataList_NONWINDOWSTORAGE
4348 _NONWINDOW_PROPERTY_FCSTRINGS columntexts;
4349 _NONWINDOW_PROPERTY_FCNUMBERS columnwidths;
4350 _NONWINDOW_PROPERTY<bool> usealternatingrows;
4351 } datalist_nonwindow_store;
4358 void _InitNonWindowHandleStates()
override;
4361 void _StoreNonWindowHandleStates()
override;
4369 _usecheckboxes =
false;
4371 _expandlast =
false;
4372 _multiselect =
false;
4373#if OPERATING_SYSTEM == MAC_OS
4380#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4385 void _DataListInitNonWindowHandleStates();
4386 void _DataListStoreNonWindowHandleStates();
4391#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4392 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_DATALIST; }
4394 double _GetAutoCreateWidth()
override {
return 200; }
4396 float _GetAutoCreateMultilineHeight()
override {
return 150; }
4399 const char*
ClassName()
const override {
return "FCCtrlDataList"; }
4405#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4406#if OPERATING_SYSTEM == MAC_OS
4424#if OPERATING_SYSTEM == MAC_OS
4425 _fontsize = fontsize;
4429#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4430 const eUniChar16* _GetCellUnicodeText(
FCDataListRow* pRow,
int columnindex);
4432 const char* _GetCellCText(
FCDataListRow* pRow,
int columnindex);
4440 void SetColumnTitle(
int columnindex,
FCString* pTitle);
4446 bool AddColumn(
FCString* pTitle,
float columnwidth);
4481 bool DeleteRow(
int lineindex);
4490 void DeleteAllColumns();
4516 bool UseLeftCheckboxColumn();
4566 void UseFullRowSelect();
4576 bool GetAlternatingBackgroundRowColors()
const;
4585 void SetAlternatingBackgroundRowColors(
bool state);
4623 bool SelectLine(
int lineindex,
bool ensurevisible =
false);
4635 bool AddSelectedLine(
int lineindex,
bool ensurevisible =
false);
4645 bool IsLineSelected(
int lineindex);
4654 bool UnselectLine(
int lineindex);
4686 void ExpandLastColumn();
4699 int GetSelectedLine();
4712 virtual void HandleSelectChange(
int lineindex);
4724 virtual void HandleUnselect();
4735 pRow->_SetCheckState(state);
4736 GetParent()->HandleDataListCheck(
this, lineindex, state);
4748 void ReconnectAll();
4752 bool HasCheckboxes();
4763 int GetDetailedColumnCount(
bool includecheckboxcolumn);
4777 float GetColumnWidth(
int columnindex);
4785 bool Swap(
int rowindex1,
int rowindex2,
bool redraw);
4787#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4788 const char* _WinGetUIClassName()
const override {
return "SysListView32"; }
4789 const char* _MacGetUIClassName()
const override {
return "NSTableView"; }
4811#if OPERATING_SYSTEM == WINDOWS
4818#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4819 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_LISTBOX; }
4821 double _GetAutoCreateWidth()
override {
return 150; }
4823 float _GetAutoCreateMultilineHeight()
override {
return 170; }
4827 struct __FCCtrlListBox_NONWINDOWSTORAGE
4829 _NONWINDOW_PROPERTY<int> selecteditem;
4830 _NONWINDOW_PROPERTY_FCSTRINGS items;
4831 } listbox_nonwindow_store;
4834 void _InitNonWindowHandleStates()
override;
4837 void _StoreNonWindowHandleStates()
override;
4839#if OPERATING_SYSTEM == MAC_OS
4840 void _MacSetupListboxColumn();
4843 const char*
ClassName()
const override {
return "FCCtrlListBox"; }
4866 int GetSelectedItem();
4880 void SetSelectedItem(
int index);
4891 int count = GetCount();
4892 if (count < 1)
return false;
4893 SetSelectedItem(count - 1);
4898 void ClearSelection();
4908 void SetItemText(
int index,
FCString* pString);
4918 void GetItemText(
int index,
FCString* pString);
4924 void DeleteItem(
int index);
4934 void InsertItem(
int index,
FCString* pString);
4945#ifndef DOXYGEN_SHOULD_IGNORE_THIS
4946 const char* _WinGetUIClassName()
const override {
return "ListBox"; }
4947#if OPERATING_SYSTEM == WINDOWS
4950 const char* _MacGetUIClassName()
const override {
return "NSTableView"; }
4972#if OPERATING_SYSTEM == WINDOWS
5000 const char*
ClassName()
const override {
return "FCTreeNode"; }
5035 if (!pString)
return;
5045#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5048 void _SetIsContainer(
bool state) { _iscontainer = state; }
5055 void _SetExpanded(
bool state) { _expanded = state; }
5062 bool _GetExpanded() {
return _expanded; }
5074#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5075 void _SetTreeControl(
FCCtrlTree* pTree) { _pTreeControl = pTree; }
5077 FCCtrlTree* _GetTreeControl() {
return _pTreeControl; }
5079 void _SetParentNode(
FCTreeNode* pNode) { _pParentNode = pNode; }
5082 void _SetSelected(
bool selected) { _isselected = selected; }
5085 bool _GetSelected() {
return _isselected; }
5104 if (!_pParentNode)
return -1;
5116 if (!_pParentNode)
return 0;
5121#if OPERATING_SYSTEM == WINDOWS
5131 void _SetItemHandle(
5132#
if OPERATING_SYSTEM == WINDOWS
5141#ifdef PDK_FRAMEWORK_DEBUG
5144 DebugOutBool(
"Is Container: ", _iscontainer);
5147 DebugOutString(
"Text: ", &astring);
5183#if OPERATING_SYSTEM == MAC_OS
5184 void _MacSetupTreeColumn();
5193 void _DeleteAllSubNodes(
FCTreeNode* pBaseNode);
5200#if OPERATING_SYSTEM == MAC_OS
5208 _DeleteAllSubNodes(_pRootNode);
5211 const char*
ClassName()
const override {
return "FCCtrlTree"; }
5213#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5214 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_TREE; }
5216 double _GetAutoCreateWidth()
override {
return 150; }
5218 float _GetAutoCreateMultilineHeight()
override {
return 170; }
5221 void _InitNonWindowHandleStates()
override;
5224 void _StoreNonWindowHandleStates()
override;
5227#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5369#if OPERATING_SYSTEM == MAC_OS
5395 void ExpandAllContainers();
5401 void CollapseAllContainers();
5424#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5446 void Repaint()
override;
5448#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5449 const char* _WinGetUIClassName()
const override {
return "SysTreeView32"; }
5450 const char* _MacGetUIClassName()
const override {
return "NSOutlineView"; }
5473 struct __FCCtrlSwitcher_NONWINDOWSTORAGE
5475 _NONWINDOW_PROPERTY<int> selectedindex;
5476 _NONWINDOW_PROPERTY_FCSTRINGS items;
5477 } switcher_nonwindow_store;
5479#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5480 double _GetAutoCreateWidth()
override {
return 200; }
5483 void _InitNonWindowHandleStates()
override;
5486 void _StoreNonWindowHandleStates()
override;
5489 bool _FindControlIDReference(
int theid);
5494 const char*
ClassName()
const override {
return "FCCtrlSwitcher"; }
5496#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5497 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_SWITCHER; }
5519 bool AttachControl(
FCControl* pControl,
int pageindex);
5525 void HandleVisibleStates(
int index);
5538 int GetSelectedPage();
5546 void SetSelectedPage(
int index);
5548#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5549 const char* _WinGetUIClassName()
const override {
return "SysTabControl32"; }
5550 const char* _MacGetUIClassName()
const override {
return "NSSegmentedControl"; }
5566 struct __FCCtrlRadioButton_NONWINDOWSTORAGE
5568 _NONWINDOW_PROPERTY<bool> checkstate;
5569 } radiobutton_nonwindow_store;
5575 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_RADIOBUTTON; }
5577 double _GetAutoCreateWidth()
override {
return 100; }
5579#if OPERATING_SYSTEM == WINDOWS
5580 double _CalcNonTextWidth()
const override
5581 {
return _CalcNonTextWidthFromTheme(BP_RADIOBUTTON, RBS_UNCHECKEDNORMAL, 3.0, 16.0); }
5585 void _InitNonWindowHandleStates()
override;
5588 void _StoreNonWindowHandleStates()
override;
5598 :
FCControl(id, this), _pButtonGroup(pButtonGroup), _buttonindex(buttonIndex)
5600 assert(!pButtonGroup || buttonIndex >= 0);
5608 :
FCControl(id, this), _pButtonGroup(nullptr), _buttonindex(-1)
5611 const char*
ClassName()
const override {
return "FCCtrlRadioButton"; }
5613#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5615 int _GetButtonIndex()
const {
return _buttonindex; }
5625 void SetCheck(
bool checked);
5641#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5642 const char* _WinGetUIClassName()
const override {
return "Button"; }
5643 const char* _MacGetUIClassName()
const override {
return "NSButton"; }
5676 const char*
ClassName()
const override {
return "FCCtrlRadioButtonGroup"; }
5720 for (
int index = 0; index < GetCount(); index++)
5721 GetItemAt(index)->SetWidth(width);
5733 for (
int index = 0; index < GetCount(); index++)
5736 if (pButton->
GetCheck())
return pButton;
5749 for (
int index = 0; index < GetCount(); index++)
5750 if (GetItemAt(index)->GetCheck())
return index;
5762 if (index < 0 || index >= GetCount())
return;
5763 for (
int next = 0; next < GetCount(); next++)
5764 GetItemAt(next)->SetCheck(next == index);
5778 for (
int index = 0; index < GetCount(); index++)
5779 GetItemAt(index)->MoveRelative(horizoffset, vertoffset);
5791 struct __FCCtrlCheckbox_NONWINDOWSTORAGE
5793 _NONWINDOW_PROPERTY<int> checkstate;
5794 _NONWINDOW_PROPERTY<bool> threestate;
5795 } checkbox_nonwindow_store;
5798 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_CHECKBOX; }
5800 double _GetAutoCreateWidth()
override {
return 100; }
5802#if OPERATING_SYSTEM == WINDOWS
5803 double _CalcNonTextWidth()
const override
5804 {
return _CalcNonTextWidthFromTheme(BP_CHECKBOX, CBS_UNCHECKEDNORMAL, 3.0, 16.0); }
5808 void _InitNonWindowHandleStates()
override;
5811 void _StoreNonWindowHandleStates()
override;
5816#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5821 const char*
ClassName()
const override {
return "FCCtrlCheckbox"; }
5831 virtual void SetCheck(twobyte checked);
5839 virtual twobyte GetCheck();
5855 checkbox_nonwindow_store.threestate.value = allow3states;
5864 return checkbox_nonwindow_store.threestate.value;
5867#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5868 const char* _WinGetUIClassName()
const override {
return "Button"; }
5869 const char* _MacGetUIClassName()
const override {
return "NSButton"; }
5883 WINCODE(HFONT _storednewfont{};)
5886 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_BUTTON; }
5888 double _GetAutoCreateWidth()
override {
return 60; }
5890#if OPERATING_SYSTEM == MAC_OS
5891 double _originalheight{};
5894#if OPERATING_SYSTEM == WINDOWS
5895 double _CalcNonTextWidth()
const override {
return 24.0; }
5905 const char*
ClassName()
const override {
return "FCCtrlButton"; }
5908 void ClearShortcutKey();
5918 void SetFontSize(
int fontsize);
5920#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5921#if OPERATING_SYSTEM == MAC_OS
5923 double _GetOriginalHeight()
const {
return _originalheight; }
5925 void _SetOriginalHeight(
double value) { _originalheight = value; }
5929#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5930 const char* _WinGetUIClassName()
const override {
return "Button"; }
5931 const char* _MacGetUIClassName()
const override {
return "NSButton"; }
5947 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_SLIDER; }
5949 double _GetAutoCreateWidth()
override {
return 150; }
5951 struct __FCCtrlSlider_NONWINDOWSTORAGE
5953 _NONWINDOW_PROPERTY<int> minvalue;
5954 _NONWINDOW_PROPERTY<int> maxvalue;
5955 _NONWINDOW_PROPERTY<int> thumbpos;
5956 } slider_nonwindow_store;
5958#if OPERATING_SYSTEM == WINDOWS
5959 bool trackingStarted;
5963 void _InitNonWindowHandleStates()
override;
5966 void _StoreNonWindowHandleStates()
override;
5971#if OPERATING_SYSTEM == WINDOWS
5972 trackingStarted =
false;
5976 const char*
ClassName()
const override {
return "FCCtrlSlider"; }
5978#ifndef DOXYGEN_SHOULD_IGNORE_THIS
5979#if OPERATING_SYSTEM == WINDOWS
5981 bool _GetTrackingStartedWin()
const {
return trackingStarted; }
5983 void _SetTrackingStartedWin(
bool state) { trackingStarted = state; }
5997 void SetMinValue(
int min);
6009 void SetMaxValue(
int max);
6015 void SetThumbPosition(
int position);
6023 int GetThumbPosition();
6025#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6026 const char* _WinGetUIClassName()
const override {
return "msctls_trackbar32"; }
6027 const char* _MacGetUIClassName()
const override {
return "NSSlider"; }
6031#ifdef PDK_FRAMEWORK_IMAGECTRL
6057#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6058#if OPERATING_SYSTEM == WINDOWS
6061#if OPERATING_SYSTEM == MAC_OS
6065 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_IMAGE; }
6067 double _GetAutoCreateWidth()
override {
return 100; }
6069 void _ReleaseImage()
6071#if OPERATING_SYSTEM == WINDOWS
6072 DeleteObject(_image);
6074 _cocoalink_ReleaseImage(_image);
6079#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6084 FCCTRLIMAGE_FILEPATH,
6091 void _AttachAssignedImageToControl();
6094 bool _SetImage(IMAGESOURCE source,
const char *data,
long dataLength,
bool preserveControlSize);
6097 void _InitNonWindowHandleStates()
override
6099 FCControl::_InitNonWindowHandleStates();
6101 _AttachAssignedImageToControl();
6106 const char*
ClassName()
const override {
return "FCCtrlImage"; }
6112#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6113#if OPERATING_SYSTEM == WINDOWS
6114#ifdef PDK_FRAMEWORK_DPIAWARE
6116 void _OnDpiChanged()
override;
6141 {
return _SetImage(FCCTRLIMAGE_FILEPATH, path, 0, preserveControlSize); }
6158 {
return _SetImage(FCCTRLIMAGE_BITMAP, data, dataLength, preserveControlSize); }
6160#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6161 const char* _WinGetUIClassName()
const override {
return "Static"; }
6162 const char* _MacGetUIClassName()
const override {
return "NSImageView"; }
6167#ifdef PDK_FRAMEWORK_CANVASCTRL
6176 struct __FCCtrlSlider_NONWINDOWSTORAGE
6178 _NONWINDOW_PROPERTY<void*> instructions;
6179 } canvas_nonwindow_store;
6182 _CONTROL_TYPE _GetControlType()
override {
return CONTROLTYPE_CANVAS; }
6184 double _GetAutoCreateWidth()
override {
return 80; }
6186 float _GetAutoCreateMultilineHeight()
override {
return 80; }
6189 void _InitNonWindowHandleStates()
override;
6192 void _StoreNonWindowHandleStates()
override;
6195 FCCtrlCanvas(twobyte
id) :
FCControl(id, this) {}
6199 void RebuildInstructions(FCVirtualCanvasInstructions* pInstructions);
6201#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6202 const char* _WinGetUIClassName()
const override {
return "Static"; }
6203 const char* _MacGetUIClassName()
const override {
return "NSFCCtrlCanvas"; }
6216#if OPERATING_SYSTEM == WINDOWS
6217 FF_DialogHandlerUPP _handler;
6229 EXECMODAL_CLOSE = 0,
6235 EXECMODAL_CANCEL = 2
6248 const char*
ClassName()
const override {
return "FCResourceWindow"; }
6251 void DestroyWindow();
6254 void InitWindow()
override;
6259 void CloseWindow()
override;
6265 void ShowModeless(EWND WINCODE(hParent));
6278#ifndef PDK_FRAMEWORK_LUAFRIENDLY
6283 ExecuteModal_EWND(EWND hParent);
6299#ifndef PDK_FRAMEWORK_LUAFRIENDLY
6306#ifdef PDK_FRAMEWORK_LUAFRIENDLY
6307#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6308 int ExecuteModal_CFunc(lua_State *L);
6312#if OPERATING_SYSTEM == WINDOWS
6314 virtual bool HandleWMNotify(WPARAM wparam, LPARAM lparam);
6319 void _SetupInternalWindowCode();
6321#ifdef PDK_FRAMEWORK_DPIAWARE
6339 return WINCODE(_wants_dpi_awareness) MACCODE(
false);
6365#if OPERATING_SYSTEM == WINDOWS
6366 if (!WindowExists()) _wants_dpi_awareness = state;
6375 pControl->SetParent(
this);
6390#ifdef PDK_FRAMEWORK_IMAGECTRL
6462#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6463#define __IDRESOURCE_CUSTOMWINDOW 5001
6491 bool _okbuttoncanclose;
6492 bool _okbuttoninprogress;
6494 std::vector<FCCtrlRadioButtonGroup*> _radioButtonGroups;
6496#ifndef DOXYGEN_SHOULD_IGNORE_THIS
6506 if (!pControl)
return pControl;
6508 pControl->_SetPointsMeasurement(
true);
6509 pControl->SetParent(
this);
6510 pControl->_SetProgrammaticallyCreate(
true);
6519 void _MoveAllControls(
int horizoffset,
int vertoffset);
6525 void _CalcControlsExtent(
float *pLeftMin,
float* pTopMin,
float* pRightMax,
float* pBottomMax);
6531 void _InitNonWindowHandleStates()
override;
6539 _SetPointsMeasurement(
true);
6545 _radioButtonGroups.clear();
6548 const char*
ClassName()
const override {
return "FCCustomWindow"; }
6558 for (
int i = 0; i < GetCount(); i++)
6562 if ((testid >= tryid) && (testid < 20000))
6573 if (!pControl)
return pControl;
6575 pControl->_SetPointsMeasurement(
true);
6576 pControl->SetParent(
this);
6577 pControl->_SetProgrammaticallyCreate(
true);
6606 _okbuttoninprogress =
true;
6608 _okbuttoninprogress =
false;
6623#ifdef PDK_FRAMEWORK_IMAGECTRL
6636#ifdef PDK_FRAMEWORK_DPIAWARE
6637 SetWantsDpiAwareness(
true);
6726 if (FindControl(1))
return NULL;
6728 pOkButton->
SetAction(FCControl::ACTION_OK);
6745 if (FindControl(2))
return NULL;
6747 pCancelButton->
SetAction(FCControl::ACTION_CANCEL);
6749 pCancelButton->
SetText(&canceltext);
6750 return pCancelButton;
6766 pCloseButton->
SetAction(FCControl::ACTION_CLOSE);
6768 pCloseButton->
SetText(&closetext);
6769 return pCloseButton;
6870 if (no_of_items < 1)
return NULL;
6871 if (no_of_items > 20)
return NULL;
6872 const size_t index = _radioButtonGroups.size();
6874 static const float kYSeparation = 16;
6875 for (
int next = 0; next < no_of_items; next++)
6878 _AddCreatedCtrl(button, x, y + next*kYSeparation);
6879 _radioButtonGroups[index]->Add(button);
6881 if (_radioButtonGroups[index]->GetCount() > 0)
6883 return _radioButtonGroups[index];
6910#ifdef PDK_FRAMEWORK_CANVASCTRL
6911 FCCtrlCanvas* CreateCanvas(
float x,
float y) {
return (FCCtrlCanvas*) _AddCreatedCtrl(
new FCCtrlCanvas(_CalcAvailableCtrlID()), x, y); }
6957 { _MoveAllControls(horizoffset, vertoffset); }
Base class for the Finale Framework classes.
Definition ff_base.h:71
MEASUREMENTUNITS
Constants for Finale's standard measurement units.
Definition ff_base.h:243
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition ff_basecollection.h:26
int GetIndexOf(__FCBase *pObject) const
Returns the 0-based order index for the object within the collection.
Definition finaleframework.cpp:13775
void Add(__FCBase *pNewItem)
Adds an element to the end of the collection.
Definition finaleframework.cpp:13726
void DetachAll()
Removes all the objects from the collection, without freeing/destroying the objects.
Definition ff_basecollection.h:162
int GetCount() const
Returns the number of elements of the collection.
Definition ff_basecollection.h:102
__FCBase * GetItemAt(int index) const
Returns the object at the index position. Index is 0-based.
Definition finaleframework.cpp:13767
Base class that contains the basic functionality for the operating system's modal dialog boxes for se...
Definition ff_dialogs.h:54
void AddFilter(FCString *pFilter, FCString *pFilterDescription)
Adds a file filter with description. Multiple filters can be added.
Definition ff_dialogs.h:86
void GetWindowTitle(FCString *pString)
Copies the initialized window title to a FCString object.
Definition ff_dialogs.h:156
void GetFileName(FCString *pString)
Copies the file name to a FCString object.
Definition ff_dialogs.h:167
bool AssureFileExtension(const char *pszSuffix)
Makes sure that a file extension exists for the file name. If one is missing, the suffix is added.
Definition ff_dialogs.h:191
virtual bool Execute()=0
Virtual method that's overridden in all child methods. Executes the dialog box.
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:72
void SetDefaultFilter(int index)
Sets the 0-based default filter.
Definition ff_dialogs.h:109
FCStrings * _GetFilters()
For internal use only!
Definition ff_dialogs.h:101
void SetWindowTitle(FCString *pString)
Sets the caption of the window title.
Definition ff_dialogs.h:120
void SetInitFolder(FCString *pString)
Sets the initial starting folder for the dialog box.
Definition ff_dialogs.h:146
__FCFileDialogBase(FCUI *pUI)
The constructor.
Definition ff_dialogs.h:67
void GetInitFolder(FCString *pString)
Copies the init folder to a FCString object.
Definition ff_dialogs.h:177
void SetFileName(FCString *pString)
Sets the initial file name string. The string contains the full path to the file name.
Definition ff_dialogs.h:130
Base class for all other dialog/window classes.
Definition ff_dialogs.h:563
virtual void HandleDataListSelect(FCCtrlDataList *pControl, int lineindex)
Virtual handler method for when FCCtrlDataList selection state changes. Overwrite to provide function...
Definition ff_dialogs.h:1221
virtual void TextSelectionChanged(FCControl *pControl)
Virtual method that is called when the selected text on a FCCtrlTextEditor control changes.
Definition ff_dialogs.h:1157
virtual bool HandleCommand(FCControl *pControl)
Virtual method that is called when a user command occurs, such as a button press.
Definition ff_dialogs.h:1151
bool IsModal()
Returns true if the dialog currently is running in a modal state.
Definition ff_dialogs.h:800
void SetPreventClosing(bool state)
Sets whether the window may be closed. Note that certain situations may still close the window even w...
Definition ff_dialogs.h:1324
float GetStoredHeight() const
Returns the stored height. -1 if no height has been stored.
Definition finaleframework.cpp:26463
virtual void HandleUpDownPressed(FCControl *pControl, int delta)
Virtual handler method for up/down arrow controls when they are clicked. Overwrite to provide functio...
Definition ff_dialogs.h:1212
float GetClientHeight()
Returns the current height of the window client area, excluding the title bar.
Definition finaleframework.cpp:26322
float GetMaximumResizeHeight()
Returns the maximum resize height for resizable dialogs/windows.
Definition ff_dialogs.h:1051
virtual void HandleResize(int newwidth, int newheight, int oldwidth, int oldheight)
Handler called when user resizes the window.
Definition ff_dialogs.h:1258
void SetWidth(float newwidth)
Changes the width of the window frame.
Definition finaleframework.cpp:26141
void SetClientWidth(float newwidth)
Changes the width of the window client area.
Definition finaleframework.cpp:26237
bool IsInBufferMode()
Returns true if buffered movement has been started with StartBufferControlMovement.
Definition ff_dialogs.h:1421
void Hide()
Hides the window.
Definition finaleframework.cpp:25966
bool GetPointsMeasurement()
Returns if the measurements and positioning is in points or in a system-native unit for this window.
Definition ff_dialogs.h:794
float GetWidth()
Returns the current width of the window frame.
Definition finaleframework.cpp:26174
bool IsWindowshade()
Returns true if the window is in window shade mode.
Definition ff_dialogs.h:1388
bool WindowExists() const
Returns true if the window exists in the user interface.
Definition finaleframework.cpp:25957
void GetTitle(FCString *pTitle)
Gets the caption (title) for the window.
Definition finaleframework.cpp:26382
float GetClientWidth()
Returns the current width of the window client area.
Definition finaleframework.cpp:26268
virtual void CloseButtonPressed()
Virtual method that is called when a control with a "Close" action is pressed by the user.
Definition ff_dialogs.h:1110
FCControl * FindControl(int controlid)
Finds a control based on the control's ID.
Definition finaleframework.cpp:26056
float GetMinimumResizeWidth()
Returns the minimum resize width for resizable dialogs/windows.
Definition ff_dialogs.h:1032
bool QueryLastCommandModifierKeys(FLAG_32 modifiers)
Returns if the user held down a specific set of modifier keys at the last "command" event,...
Definition ff_dialogs.h:959
virtual void HandleDataListCheck(FCCtrlDataList *pControl, int lineindex, bool checkstate)
Virtual handler method for when FCCtrlDataList check state changes (for data list controls with check...
Definition ff_dialogs.h:1232
virtual void HandleSwitcherSelect(FCCtrlSwitcher *pControl, int switchindex)
Virtual method that is called when a switcher control is clicked. Please note that switcher selection...
Definition finaleframework.cpp:26049
float GetMinimumResizeHeight()
Returns the minimum resize height for resizable dialogs/windows.
Definition ff_dialogs.h:1038
bool RestorePosition()
Restores the window's position and size (if the size is stored).
Definition finaleframework.cpp:26493
FCControl * GetItemAt(int index) const
Overloaded implementation of GetItemAt().
Definition ff_dialogs.h:872
virtual void OkButtonPressed()
Virtual handler method that is called when a control with a "OK" action is pressed by the user.
Definition ff_dialogs.h:1125
void StopTimer(twobyte timerID)
Destroys a previously created timer (created with SetTimer).
Definition finaleframework.cpp:26088
float GetStoredX() const
Returns the stored horizonal position, for use in the restore feature.
Definition finaleframework.cpp:26445
FCUI * CreateChildUI() const
Creates and returns an instance of FCUI with this window as the parent window. This is mainly for lau...
Definition ff_dialogs.h:775
virtual void CloseWindow()=0
Closes the window. Functionality is provided by the child classes.
float GetHeight()
Returns the current height of the window frame.
Definition finaleframework.cpp:26222
float GetStoredWidth() const
Returns the stored width. -1 if no width has been stored.
Definition finaleframework.cpp:26457
virtual void ScrollChanged(FCControl *pControl)
Virtual method that is called when the scroll changes on a control with a scrollbar.
Definition ff_dialogs.h:1168
bool IsDarkModeAppearance() const
Returns the current Dark Mode state of the window. (Currently macOS only.)
Definition finaleframework.cpp:26337
virtual bool CanClose()
Virtual method that decides if the window can close or not.
Definition ff_dialogs.h:1330
void SetHeight(float newheight)
Changes the height of the window frame.
Definition finaleframework.cpp:26189
void StartBufferControlMovement()
Marks a start of buffered movement for the controls in the dialog.
Definition finaleframework.cpp:26639
virtual bool HandleListEnterKey(FCControl *pControl)
Called every time there's an enter key hit inside a data list or list box.
Definition ff_dialogs.h:1246
void SetWindowAlpha(twobyte alphapercent)
Sets the transparency for the window.
Definition finaleframework.cpp:26607
__FCUserWindow()
The constuctor.
Definition ff_dialogs.h:717
virtual void OSMenuCommandExecuted(EMENUID menuCommand, int menuCommandType)
Called after a menu command on the main menu tree is executed. This function is also called when keyb...
Definition ff_dialogs.h:1099
bool EndBufferControlMovement()
Resizes/moves all buffered control movements made since the StartBufferControlMovement call.
Definition finaleframework.cpp:26650
void SetTitle(FCString *pTitle)
Sets the caption (title) for the window.
Definition finaleframework.cpp:26364
float GetMaximumResizeWidth()
Returns the maximum resize width for resizable dialogs/windows.
Definition ff_dialogs.h:1045
MENU_COMMAND_TYPES
Constants for menu command types.
Definition ff_dialogs.h:707
@ MENUCMDTYPE_ACCELERATOR
Definition ff_dialogs.h:712
@ MENUCMDTYPE_SELECTION
Definition ff_dialogs.h:709
virtual void HandleActivate(bool activated)
Virtual method that is called when the window is activated or deactivated. Overwrite in child classes...
Definition ff_dialogs.h:1252
twobyte GetModalResult()
Returns the value that will be returned for a modal dialog.
Definition ff_dialogs.h:662
virtual void CancelButtonPressed()
Virtual handler method that is called when a control with a "Cancel" action is pressed by the user.
Definition ff_dialogs.h:1140
void SetMaximumResizeHeight(int height)
Sets the maximum resize height for resizable dialogs/windows.
Definition ff_dialogs.h:1020
void SetMaximumResizeWidth(int width)
Sets the maximum resize width for resizable dialogs/windows.
Definition ff_dialogs.h:1006
bool GetPreventClosing() const
Returns whether the window may be closed.
Definition ff_dialogs.h:1317
void ShowAndActivate()
Makes the window visible and sets it focused.
Definition finaleframework.cpp:25976
void SetClientHeight(float newheight)
Changes the height of the window client area (excluding the title bar).
Definition finaleframework.cpp:26281
virtual void HandleListDoubleClick(FCControl *pControl)
Called every time there's a double-click inside a data list or list box.
Definition ff_dialogs.h:1238
bool TryToCloseWindow()
Tries to close the window. This method calls the CanClose() virtual method before calling CloseWindow...
Definition ff_dialogs.h:975
bool IsVisible()
Returns true if the window is visible.
Definition finaleframework.cpp:26039
float GetStoredY() const
Returns the stored vertical position, for use in the restore feature.
Definition finaleframework.cpp:26451
void Windowshade(bool windowshade)
Sets the window in a "windowshade" mode (where only the title bar is visible) - or restore the window...
Definition finaleframework.cpp:26550
virtual void DarkModeIsChanging(bool isDarkMode)
Called whenever Dark Mode changes. (Currently macOS only.)
Definition ff_dialogs.h:1089
void StorePosition(bool storesize)
Stores the window position for use with RestorePosition.
Definition finaleframework.cpp:26469
virtual void MouseTrackingStarted(FCControl *pControl)
Virtual method that is called when a mouse tracking starts. Currently only supported fo FCCtrlSlider.
Definition ff_dialogs.h:1264
virtual void WindowDestroyed()
Called once just when the window/dialog has been destroyed.
Definition ff_dialogs.h:1083
void SetRestorePositionData(float x, float y, float width, float height)
Sets the restore position and size.
Definition finaleframework.cpp:26423
void SetTimer(twobyte timerID, ufourbyte msInterval)
Creates a timer with the supplied ID and the timeout/refresh interval.
Definition finaleframework.cpp:26067
void Activate()
Activates the window and sets it in user focus.
Definition finaleframework.cpp:26411
virtual void HandleTimer(twobyte timerID)
Virtual handler method that is called on timer events. Overwrite in child classes.
Definition ff_dialogs.h:1249
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:760
virtual void MouseTrackingStopped(FCControl *pControl)
Virtual method that is called when a mouse tracking stops. Currently only supported fo FCCtrlSlider.
Definition ff_dialogs.h:1270
COMMAND_MOD_KEYS
Constants for the QueryLastCommandModifierKeys() method.
Definition ff_dialogs.h:685
@ CMDMODKEY_SHIFT
Definition ff_dialogs.h:687
@ CMDMODKEY_CTRL
Definition ff_dialogs.h:693
@ CMDMODKEY_FUNCTION
Definition ff_dialogs.h:699
@ CMDMODKEY_ALT
Definition ff_dialogs.h:690
@ CMDMODKEY_COMMAND
Definition ff_dialogs.h:696
void SetEnabled(bool state)
Sets the enabled state of the window.
Definition finaleframework.cpp:26104
virtual bool HandleKeyboardCommand(FCControl *pControl, eUniChar16 character)
Virtual method that notifies when a keyboard command has been requested with the Command key (macOS) ...
Definition ff_dialogs.h:1193
void SetRestorePositionOnlyData(float x, float y)
Sets the restore position, but with no size.
Definition finaleframework.cpp:26434
virtual void InitWindow()
Called once just when the window/dialog has been created.
Definition finaleframework.cpp:26005
Base class for all UI controls in a dialog.
Definition ff_dialogs.h:1536
float GetHeight()
Returns the height of the control.
Definition finaleframework.cpp:25403
virtual FCFontInfo * CreateFontInfo() const
Creates font information from the current text font of the control.
Definition finaleframework.cpp:25254
virtual bool GetEnable() const
Returns the enable/grayed state of the control (if user input should be allowed or not).
Definition finaleframework.cpp:24922
int GetControlID() const
Returns the control ID for the control.
Definition ff_dialogs.h:1873
virtual void SetVisible(bool bShow)
Sets the visibility of the control.
Definition finaleframework.cpp:25136
void SetTop(float pos)
Sets the top position of the control.
Definition finaleframework.cpp:25372
virtual ~FCControl()
Destructor.
Definition ff_dialogs.h:1681
float GetLeft()
Returns the left position of the control.
Definition finaleframework.cpp:25350
void AssureNoHorizontalOverlap(const FCControl &control, int padding)
Shift the control right as needed to the extent necessary so that its GetLeft position will accommoda...
Definition ff_dialogs.h:2028
CONTROL_ACTIONS GetAction() const
Returns the dialog acction assigned to the control.
Definition ff_dialogs.h:1889
float GetTop()
Returns the top position of the control.
Definition finaleframework.cpp:25382
int GetAssignedID() const
Gets the connected ID regardless of platform.
Definition ff_dialogs.h:1883
bool WindowExists() const
Returns true if a valid parent window handle (and control handle) is available.
Definition ff_dialogs.h:1816
void HorizontallyAlignLeftWith(const FCControl *pControl, double offset=0)
Specifies a control with which to horizontally align left. All controls set to align with this contro...
Definition ff_dialogs.h:2045
virtual void SetEnable(bool state)
Sets the enable/grayed state of the control (if user input should be allowed or not).
Definition finaleframework.cpp:24904
void SetAction(CONTROL_ACTIONS action)
Sets the dialog acction assigned to the control.
Definition ff_dialogs.h:1895
virtual void Repaint()
Force a visual update of the control.
Definition ff_dialogs.h:1854
virtual void GetText(FCString *pString) const
Gets the text of the control.
Definition finaleframework.cpp:25098
FCControl(twobyte id, const __FCControlTypedPtr &subclassPtr)
The constructor.
Definition ff_dialogs.h:1667
void HorizontallyAlignRightWith(const FCControl *pControl, double offset=0)
Specifies a control with which to horizontally align right. All controls set to align with this contr...
Definition ff_dialogs.h:2076
void HorizontallyAlignRightWithFurthest(double offset=0)
Specifies that this control should align with the control that extends furthest to the right....
Definition ff_dialogs.h:2105
__FCUserWindow * GetParent() const
Returns the parent window object for the control.
Definition ff_dialogs.h:1812
virtual void SetText(const FCString *pString)
Sets the text for the control.
Definition finaleframework.cpp:25053
bool GetPointsMeasurement()
Returns if the measurements and positioning is in points or in a system-native unit.
Definition ff_dialogs.h:1707
float GetWidth()
Returns the width of the control.
Definition finaleframework.cpp:25420
bool GetVisible()
Returns the visibility state of a control.
Definition finaleframework.cpp:25315
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:1637
void DoAutoResizeWidth(std::optional< double > minimumwidth=std::nullopt)
Sets the autoresize width option for the control. When this value is set, the control calls AssureWid...
Definition ff_dialogs.h:2132
CONTROL_ACTIONS
Predefined actions for controls.
Definition ff_dialogs.h:1554
void MoveAbsolute(float x, float y)
Moves the control in absolute coordinates.
Definition finaleframework.cpp:25525
void SetWidth(float width)
Sets the width of the control.
Definition finaleframework.cpp:25437
virtual void SetFont(const FCFontInfo *fontInfo)
Sets the font information for the text of the control.
Definition finaleframework.cpp:25209
void SetLeft(float pos)
Sets the left position of the control.
Definition finaleframework.cpp:25340
bool RedrawImmediate() const
Redraws the control immediately. Calling this allows your program that has blocked the main thread to...
Definition finaleframework.cpp:25603
virtual bool AssureWidthForText()
Lengthens the width of the control to the extent necessary to display all the text in the control.
Definition finaleframework.cpp:25031
virtual void SetBold(bool state)
Sets the boldface appearance for the control.
Definition finaleframework.cpp:25168
virtual void ResizeRelative(float horizresize, float vertresize)
Resizes the control relatively to the current size. Top left corner will stay fixed.
Definition finaleframework.cpp:25559
void StretchToAlignWithRight()
Sets a control to stretch its width to align with the furthest right control.
Definition ff_dialogs.h:2153
HWND _GetWinControlHandle() const
For internal use only. Returns the handle for the control.
Definition ff_dialogs.h:1843
void MoveRelative(float horizmove, float vertmove)
Moves the control relatively to the current position.
Definition finaleframework.cpp:25479
void SetHeight(float height)
Sets the height of the control.
Definition finaleframework.cpp:25459
void SetTextAndResize(FCString *pString)
Cocoa only: Sets the text and resizes the view inside a NSScrollView.
Definition finaleframework.cpp:24938
virtual void SetKeyboardFocus()
Sets the keyboard focus to the control.
Definition finaleframework.cpp:25328
FCControl(twobyte id)
The constructor for external C++ subclasses.
Definition ff_dialogs.h:1676
Control class for a checkbox control.
Definition ff_dialogs.h:5790
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:5821
void SetThreeStatesMode(bool allow3states)
Enables the 3-states mode for a checkbox.
Definition ff_dialogs.h:5853
FCCtrlCheckbox(twobyte id)
The constructor.
Definition ff_dialogs.h:5814
bool GetThreeStatesMode() const
Returns the 3-states mode for the checkbox.
Definition ff_dialogs.h:5862
UI class that handles a combo box, which is a combination of a edit field and a popup list.
Definition ff_dialogs.h:3084
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:3106
FCCtrlComboBox(twobyte id)
The constructor.
Definition ff_dialogs.h:3109
void SetStrings(FCStrings *pStrings)
Sets a string collection to the popup part of the combo box.
Definition ff_dialogs.h:3133
Class that handles a contol with multiple lines of data, arranged in columns.
Definition ff_dialogs.h:4292
bool GetExpandLastColumn() const
Returns if the list should expand the last column to fill the available space.
Definition ff_dialogs.h:4673
virtual void HandleDoubleClick()
Called every time there's a double-click inside the data list.
Definition ff_dialogs.h:4744
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:4399
void SetAllowsMultipleSelection(bool state)
Sets if the list should allow multiple selections. To have any effect, this must be called before the...
Definition ff_dialogs.h:4536
bool GetShowHeader() const
Returns if the list should display its header.
Definition ff_dialogs.h:4544
virtual void HandleCheckChange(int lineindex, bool state)
Called every time there's a user check change on any of the items.
Definition ff_dialogs.h:4731
bool GetAllowsMultipleSelection() const
Returns if the list should allow multiple selections.
Definition ff_dialogs.h:4524
FCCtrlDataList(twobyte id)
The constructor.
Definition ff_dialogs.h:4402
void SetUseCheckboxes(bool state)
Sets if checkboxes should be used for the data list. To have any effect, this must be called before t...
Definition ff_dialogs.h:4507
void SetExpandLastColumn(bool state)
Sets if the list should expand the last column to fill the available space. To have any effect,...
Definition ff_dialogs.h:4682
bool GetUseCheckboxes() const
Returns if checkboxes should be used for the data list.
Definition ff_dialogs.h:4498
void SetShowHeader(bool state)
Sets if checkboxes should be used for the data list. To have any effect, this must be called before t...
Definition ff_dialogs.h:4553
void UseAlternatingBackgroundRowColors()
Set that the list view (on macOS) should use alternating row colors.
Definition ff_dialogs.h:4595
int GetColumnCount()
Returns the number of columns.
Definition ff_dialogs.h:4769
void SetFontSize(int fontsize)
Sets the font size for the data list. This affects Cocoa only.
Definition ff_dialogs.h:4422
Class that handles edit controls.
Definition ff_dialogs.h:2680
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:2700
float GetRangeMeasurementEfix(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit, float min, float max)
Gets the measurement value in EFIXes from the edit field, within a specific range.
Definition ff_dialogs.h:2807
void SetMeasurementEfix(float value, _ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit)
Sets the EFIX value to the edit field, using the indicated measurement unit.
Definition ff_dialogs.h:2841
void SetFocus()
Moves the keyboard focus to the edit control.
Definition ff_dialogs.h:2918
FCCtrlEdit(twobyte id)
The constructor.
Definition ff_dialogs.h:2703
float GetMeasurementEfix(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit)
Gets the measurement value in EFIXes from the edit field.
Definition ff_dialogs.h:2783
UI class representing a horizontal graphical line.
Definition ff_dialogs.h:2587
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:2589
FCCtrlHorizontalLine(twobyte id)
The constructor.
Definition ff_dialogs.h:2592
UI class that handles a control with a static image.
Definition ff_dialogs.h:6056
FCCtrlImage(twobyte id)
The constructor.
Definition ff_dialogs.h:6109
bool SetImageFromFilePath(const char *path, bool preserveControlSize=false)
Set the image from a fully qualified file name and path.
Definition ff_dialogs.h:6140
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:6106
bool SetImageFromBuffer(const onebyte *data, long dataLength, bool preserveControlSize=false)
Set the image from an input memory buffer.
Definition ff_dialogs.h:6157
UI class representing a graphical line.
Definition ff_dialogs.h:2524
FCCtrlLine(twobyte id)
The constructor.
Definition ff_dialogs.h:2546
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:2543
bool GetHorizontal()
Returns the line style to horizontal or vertical. This is only used for programmatically created line...
Definition ff_dialogs.h:2572
A list box control.
Definition ff_dialogs.h:4816
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:4843
bool SetSelectedLast()
Selects the last item in the list box.
Definition ff_dialogs.h:4888
Control class for sliders.
Definition ff_dialogs.h:5945
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:5976
FCCtrlSlider(twobyte id)
The constructor.
Definition ff_dialogs.h:5969
UI class that handles a control with static text.
Definition ff_dialogs.h:2615
FCCtrlStatic(twobyte id)
The constructor.
Definition ff_dialogs.h:2636
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:2633
A control to switch between multiple pages.
Definition ff_dialogs.h:5468
FCCtrlSwitcher(twobyte id)
The constructor.
Definition ff_dialogs.h:5492
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:5494
UI class that handles a multiline edit control for viewing or modifying text (optionally formatted wi...
Definition ff_dialogs.h:3185
int GetConvertTabsToSpaces() const
Gets the number of spaces to which to convert tab characters. If this value is zero or negative,...
Definition ff_dialogs.h:3883
bool ResetColors()
Resets text and background colors to their default system colors for the entire control.
Definition ff_dialogs.h:4018
bool GetWordWrap() const
Gets the edit text field's setting to wrap or to have horizontal scrollers and not wrap.
Definition ff_dialogs.h:3821
bool ResetBackgroundColorInRange(const FCRange *pRange)
Resets the background color in a given range to the system default color. On macOS,...
Definition ff_dialogs.h:4007
FCCtrlTextEditor(twobyte id)
The constructor.
Definition ff_dialogs.h:3248
std::tuple< int, int, int > GetBackgroundColorAtIndex(int index) const
Gets the background color at the specified index. On macOS, the value for the default color may diffe...
Definition ff_dialogs.h:4057
bool ReplaceTextInRangeWithEnigmaString(const FCString *pString, const FCRange *pRange)
Replaces the specified range of text with the input text and formatting specified by the input enigma...
Definition ff_dialogs.h:3488
FCRanges * CreateBackgroundColorChanges() const
Returns an FCRanges collection containing the range in the text where the background color changes.
Definition ff_dialogs.h:4091
bool GetAutomaticallyIndent() const
Gets whether to automatically indent to the same tab level when hitting the Enter key.
Definition ff_dialogs.h:3899
bool GetSelectedText(FCString *pText) const
Gets the selected text on the control.
Definition ff_dialogs.h:3504
bool ReplaceSelectedText(const FCString *pText)
Replaces the currently selected text with the contents of the input string. If no selection exists,...
Definition ff_dialogs.h:3520
bool SelectAll()
Selects the entire text.
Definition ff_dialogs.h:3431
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:3245
FCRanges * CreateTextColorChanges() const
Returns an FCRanges collection containing the range in the text where the color changes.
Definition ff_dialogs.h:4071
bool SetEnigmaString(const FCString *pString, int rawtexttype=0)
Sets the contents of the control based on the input Enigma string. Any previous text in the control i...
Definition ff_dialogs.h:3680
void SetConvertTabsToSpaces(int value)
Sets the number of spaces to which to convert tab characters. If this value is zero or negative,...
Definition ff_dialogs.h:3893
int GetCurrentLine() const
Returns the current line number, starting with line 1. The current line is the line of text where the...
Definition ff_dialogs.h:3349
bool SetTextColorInRange(int red, int green, int blue, const FCRange *pRange)
Sets the text color in a given range. If the range is to the end of the control, it also sets the def...
Definition ff_dialogs.h:3964
bool SetBackgroundColorInRange(int red, int green, int blue, const FCRange *pRange)
Sets the background color in a given range. If the range is to the end of the control,...
Definition ff_dialogs.h:3980
void SetParent(__FCUserWindow *parentptr) override
For internal use only. Overriden SetParent.
Definition ff_dialogs.h:3258
void SetAutomaticallyIndent(bool state)
Sets whether to automatically indent to the same tab level when hitting the Enter key.
Definition ff_dialogs.h:3905
std::tuple< int, int, int > GetTextColorAtIndex(int index) const
Gets the text color at the specified index. On macOS, the value for the default color may differ depe...
Definition ff_dialogs.h:4040
STRINGFINDOPTIONS
Bitwise option codes for the CreateRangesForString method.
Definition ff_dialogs.h:3271
bool ResetTextColorInRange(const FCRange *pRange)
Resets the text color in a given range to the system default color. On macOS, this is a dynamic color...
Definition ff_dialogs.h:3994
bool GetAutomaticEditing() const
Sets whether the control should use automatic editing features.
Definition ff_dialogs.h:3862
A tree UI control.
Definition ff_dialogs.h:5175
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:5211
FCCtrlTree(twobyte id)
The constructor.
Definition ff_dialogs.h:5198
void SetFontSize(int size)
Sets the font size of the tree control.
Definition ff_dialogs.h:5367
FCTreeNode * GetRootItemAt(int index)
Returns the root node at the 0-based index position.
Definition ff_dialogs.h:5419
int GetRootCount()
Returns the number of container nodes in the tree.
Definition ff_dialogs.h:5409
int GetRootIndexOf(FCTreeNode *pNode)
Returns the index of a node that appears at root level.
Definition ff_dialogs.h:5440
A UI class that handles an Up/Down control. The control has 2 arrows, one pointing up and one down.
Definition ff_dialogs.h:2369
bool ConnectIntegerEdit(FCCtrlEdit *pControl, int min, int max)
Connects an integer edit field to an up/down control.
Definition ff_dialogs.h:2463
FCCtrlUpDown(twobyte id)
The constructor.
Definition ff_dialogs.h:2397
FCCtrlEdit * GetConnectedEdit()
Returns the connected edit control (if any).
Definition ff_dialogs.h:2443
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:2406
bool ConnectMeasurementEdit(FCCtrlEdit *pControl, double min, double max)
Connects a measurement edit field to an up/down control.
Definition ff_dialogs.h:2489
UI class representing a horizontal graphical line.
Definition ff_dialogs.h:2602
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:2604
FCCtrlVerticalLine(twobyte id)
The constructor.
Definition ff_dialogs.h:2607
A class that supports programmatically created controls (that are not defined in resource files).
Definition ff_dialogs.h:6490
FCCtrlButton * CreateCloseButton(float x, float y)
Creates a "Close" push button at the specified position and connects it to the window.
Definition ff_dialogs.h:6763
FCCtrlListBox * CreateListBox(float x, float y)
Creates and connects a list box control to the window.
Definition ff_dialogs.h:6844
FCControl * _AddCreatedCtrl(FCControl *pControl, float x, float y)
For internal use only.
Definition ff_dialogs.h:6571
FCCtrlSlider * CreateSlider(float x, float y)
Creates and connects a horizontal slider control to the window.
Definition ff_dialogs.h:6832
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:6548
bool GetOkButtonCanClose() const
Gets the closability state of the Ok button. See SetOkButtonCanClose for more information.
Definition ff_dialogs.h:6600
int _CalcAvailableCtrlID()
For internal use only!
Definition ff_dialogs.h:6555
FCCtrlSwitcher * CreateSwitcher(float x, float y)
Creates and connects a page switcher control to the window.
Definition ff_dialogs.h:6908
FCCtrlStatic * CreateStatic(float x, float y)
Adds a static text object to the window.
Definition ff_dialogs.h:6621
FCCtrlPopup * CreatePopup(float x, float y)
Creates and connects a popup/drop-down list control to the window.
Definition ff_dialogs.h:6782
FCCustomWindow()
The constructor.
Definition ff_dialogs.h:6537
FCCtrlHorizontalLine * CreateHorizontalLine(float x, float y, float width)
Creates and connects a horizontal line control to the window.
Definition ff_dialogs.h:6796
FCCtrlVerticalLine * CreateVerticalLine(float x, float y, float height)
Creates and connects a vertical line control to the window.
Definition ff_dialogs.h:6815
FCCtrlRadioButtonGroup * CreateRadioButtonGroup(float x, float y, int no_of_items)
Creates and connects a radio button group to the window.
Definition ff_dialogs.h:6868
FCCtrlCheckbox * CreateCheckbox(float x, float y)
Creates and connects a checkbox control to the window.
Definition ff_dialogs.h:6701
FCCtrlEdit * CreateEdit(float x, float y)
Adds an edit control object to the window.
Definition ff_dialogs.h:6653
FCCtrlDataList * CreateDataList(float x, float y)
Creates and connects a data list view control to the window.
Definition ff_dialogs.h:6924
void MoveAllControls(int horizoffset, int vertoffset)
Moves all controls on the window by the specified amount.
Definition ff_dialogs.h:6956
void OkButtonPressed() override
Override method for __FCUserWindow::OkButtonPressed.
Definition ff_dialogs.h:6604
FCCtrlImage * CreateImage(float x, float y)
Adds an image object to the window.
Definition ff_dialogs.h:6634
FCCtrlTree * CreateTree(float x, float y)
Creates and connects a tree view control to the window.
Definition ff_dialogs.h:6896
FCCtrlButton * CreateButton(float x, float y)
Creates and connects a push button to the window.
Definition ff_dialogs.h:6689
void SetOkButtonCanClose(bool value)
Sets the closability state of the window for the Ok button.
Definition ff_dialogs.h:6594
FCCtrlButton * CreateCancelButton()
Creates a "Cancel" push button, with default positioning and appearance/behaviour.
Definition ff_dialogs.h:6743
FCCtrlTextEditor * CreateTextEditor(float x, float y)
Adds an edit text control object to the window.
Definition ff_dialogs.h:6665
FCCtrlRadioButton * CreateRadioButton(float x, float y)
Creates and connects a radio button control to the window.
Definition ff_dialogs.h:6712
FCCtrlComboBox * CreateComboBox(float x, float y)
Adds a combobox control object to the window.
Definition ff_dialogs.h:6677
FCCtrlButton * CreateOkButton()
Creates an "Ok" push button, with default positioning and appearance/behaviour.
Definition ff_dialogs.h:6724
FCCtrlUpDown * CreateUpDown(float x, float y)
Creates and connects a up/down (stepper) control to the window.
Definition ff_dialogs.h:6856
A class that represents one row of data in a FCCtrlDataList UI control.
Definition ff_dialogs.h:4232
FCDataListRow()
The constructor.
Definition ff_dialogs.h:4252
FCCtrlDataList * GetConnectedList()
Returns the connected FCCtrlDataList control.
Definition ff_dialogs.h:4276
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:4258
bool GetCheck() const
Returns the check state of the row.
Definition ff_dialogs.h:4270
int GetConnectedLineIndex()
Returns the connected 0-based line index in the control.
Definition ff_dialogs.h:4273
Class that specifies Enigma text style. This includes font, size, efx, superscript,...
Definition ff_base.h:1757
Class to display the operating system's "Open File" modal dialog box.
Definition ff_dialogs.h:214
void SetMultiSelect(bool value)
Sets the dialog to allow multiple selections.
Definition ff_dialogs.h:237
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:231
bool Execute() override
Displays the dialog box to the user.
Definition ff_dialogs.h:272
bool GetMultiSelect() const
Returns the state controlling if the dialog will allow multiple selections.
Definition ff_dialogs.h:244
void _SetFileNames(FCStrings *pStrings)
For internal use only!
Definition ff_dialogs.h:261
FCFileOpenDialog(FCUI *pUI)
The constructor.
Definition ff_dialogs.h:227
void GetFileNames(FCStrings *pStrings)
Gets the string collection with all selected file names, if multiple selection has been enabled for t...
Definition ff_dialogs.h:254
Class to display the operating system's "Save File As" modal dialog box.
Definition ff_dialogs.h:288
FCFileSaveAsDialog(FCUI *pUI)
The constructor.
Definition ff_dialogs.h:295
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:298
bool Execute() override
Displays the dialog box to the user.
Definition ff_dialogs.h:304
Class to display the operating system's modal folder browser dialog box.
Definition ff_dialogs.h:326
void SetUseFinaleAPI(bool state)
Sets if the native Finale API for folder browsing should be used on Finale 25 and above.
Definition ff_dialogs.h:382
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:346
void GetFolderPath(FCString *pString)
Gets the folder path.
Definition ff_dialogs.h:390
FCFolderBrowseDialog(FCUI *pUI)
The constructor.
Definition ff_dialogs.h:341
void SetFolderPath(FCString *pString)
Sets the default folder path. This is the path that will be preselected when the dialog is displayed.
Definition ff_dialogs.h:356
void GetWindowTitle(FCString *pString)
Gets the assigned dialog title.
Definition ff_dialogs.h:402
bool Execute()
Displays the dialog box to the user.
Definition ff_dialogs.h:433
void SetWindowTitle(FCString *pString)
Sets the title for the dialog box.
Definition ff_dialogs.h:364
bool GetUseFinaleAPI() const
Returns if the native Finale API for folder browsing should be used on Finale 25 and above.
Definition ff_dialogs.h:422
Class for document-independent font information.
Definition ff_base.h:1138
Class that encapsulates a range (start, length)
Definition ff_base.h:5570
int GetStart() const
Returns the start value.
Definition ff_base.h:5616
int GetLength() const
Returns the length value.
Definition ff_base.h:5622
Simple collection class for FCRange class objects.
Definition ff_basecollection.h:1525
RAWTEXTTYPES
enumerates the possible raw text types.
Definition ff_text.h:72
Class for modeless and modal dialogs that are visually designed as a resource. This class is also a p...
Definition ff_dialogs.h:6214
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:6248
FCCtrlButton * AddButton(twobyte id)
Links a button object to the dialog resource.
Definition ff_dialogs.h:6425
FCCtrlCheckbox * AddCheckbox(twobyte id)
Links a checkbox object to the dialog resource.
Definition ff_dialogs.h:6440
FCCtrlListBox * AddListBox(twobyte id)
Links a list box object to the dialog resource.
Definition ff_dialogs.h:6420
FCCtrlImage * AddImage(twobyte id)
Links an image object to the dialog resource.
Definition ff_dialogs.h:6392
FCCtrlStatic * AddStatic(twobyte id)
Links a static text object to the dialog resource.
Definition ff_dialogs.h:6385
FCCtrlEdit * AddEdit(twobyte id)
Links an edit field object to the dialog resource.
Definition ff_dialogs.h:6405
__FCUserWindow * GetParent()
Returns the parent window object.
Definition ff_dialogs.h:6262
void SetWantsDpiAwareness(bool WINCODE(state))
Sets the HiDPI awareness state of the window.
Definition ff_dialogs.h:6363
FCCtrlPopup * AddPopup(twobyte id)
Links a popup object to the dialog resource.
Definition ff_dialogs.h:6415
FCCtrlUpDown * AddUpDown(twobyte id)
Links a up/down object to the dialog resource.
Definition ff_dialogs.h:6445
FCCtrlTextEditor * AddTextEditor(twobyte id)
Links an edit text object to the dialog resource.
Definition ff_dialogs.h:6410
FCCtrlTree * AddTree(twobyte id)
Links a data list to the dialog resource.
Definition ff_dialogs.h:6456
FCCtrlSlider * AddSlider(twobyte id)
Links a slider object to the dialog resource.
Definition ff_dialogs.h:6430
FCCtrlDataList * AddDataList(twobyte id)
Links a tree view to the dialog resource.
Definition ff_dialogs.h:6450
FCCtrlComboBox * AddComboBox(twobyte id)
Links a combo box object to the dialog resource.
Definition ff_dialogs.h:6399
FCControl * AddCtrl(FCControl *pControl)
Adds a control object to the dialog collection.
Definition ff_dialogs.h:6372
FCCtrlLine * AddLine(twobyte id)
Links a line object to the dialog resource.
Definition ff_dialogs.h:6380
EXECMODAL_RETURNS
The return codes for the ExecuteModal() method.
Definition ff_dialogs.h:6227
FCCtrlRadioButton * AddRadioButton(twobyte id)
Links a radio button object to the dialog resource.
Definition ff_dialogs.h:6435
bool GetWantsDpiAwareness() const
Gets the HiDPI awareness state of the window.
Definition ff_dialogs.h:6337
Class that provides storage for text. This is to achieve platform-transparent text handling,...
Definition ff_base.h:1877
void ExtractFileExtension()
Removes everything except the file extension part of a file name.
Definition ff_base.h:2739
void SetString(const FCString *pString)
Copies a string.
Definition finaleframework.cpp:2398
void Clear()
Creates an empty string.
Definition ff_base.h:2391
void AppendCString(const char *pOtherString)
Appends a C-style string to the string.
Definition finaleframework.cpp:1861
bool IsEmpty() const
Returns true if the string is empty.
Definition ff_base.h:3179
Collection class for FCString class objects.
Definition ff_basecollection.h:1085
FCString * GetItemAt(int index) const
Overridden GetItemAt() method.
Definition ff_basecollection.h:1118
void CopyFrom(FCStrings *pSourceStrings)
Recreates a string collection. Any existing strings in the collection are cleared....
Definition ff_basecollection.h:1309
Class representing a single node item in a FCCtrlTree control.
Definition ff_dialogs.h:4965
FCTreeNode * GetItemAt(int index) const
Overridden version of GetItemAt().
Definition ff_dialogs.h:5008
void DebugDump() override
Outputs the class data/information for debugging purposes.
Definition ff_dialogs.h:5142
FCString * GetTextPtr()
Returns the direct pointer to the text object.
Definition ff_dialogs.h:5040
void GetText(FCString *pString) const
Gets the node's text and copies it to a FCString object.
Definition ff_dialogs.h:5033
int GetIndex()
Returns the index of the item within the parent container.
Definition ff_dialogs.h:5102
void SetText(FCString *pText)
Sets the text for the node. This method will also visually update the node.
Definition ff_dialogs.h:5018
int GetSiblingCount()
Returns the number of childen that the node's parent has.
Definition ff_dialogs.h:5114
HANDLE _GetItemHandle()
For internal use only!
Definition ff_dialogs.h:5128
FCTreeNode * GetParentNode()
Returns the tree node's owner object.
Definition ff_dialogs.h:5094
bool GetIsContainer() const
Returns true if the node is set to be a container (that can contain subnodes).
Definition ff_dialogs.h:5072
const char * ClassName() const override
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition ff_dialogs.h:5000
Standard class for basic user interface functionality.
Definition ff_ui.h:29