11 #include "ff_basecollection.h"
12 #if OPERATING_SYSTEM == MAC_OS
13 #include <finaleframework_cocoa.h>
14 #include <ff_cocoa_cppinterface.h>
16 #ifdef PDK_FRAMEWORK_CANVASCTRL
17 #include "ff_fcctrlcanvas.h"
20 #ifdef PDK_FRAMEWORK_FILEDIALOGS
43 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
47 int _defaultfilterindex;
57 _defaultfilterindex = 0;
75 if (!pFilterDescription)
return;
78 _filters.
Add(pNewString);
80 pNewString->
SetString(pFilterDescription);
81 _filterdescriptions.
Add(pNewString);
97 if (index < 0)
return;
98 if (index >= _filters.
GetCount())
return;
99 _defaultfilterindex = index;
144 if (!pString)
return;
155 if (!pString)
return;
165 if (!pString)
return;
179 if (!pszSuffix)
return false;
180 if (pszSuffix[0] !=
'.')
return false;
212 _multiselect =
false;
238 if (!pStrings)
return;
306 _usefinaleapi =
true;
348 if (!pString)
return;
360 if (!pString)
return;
392 #ifdef PDK_FRAMEWORK_DIALOGS
399 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
402 struct _NONWINDOW_PROPERTY_VOIDPTR
407 _NONWINDOW_PROPERTY_VOIDPTR()
410 has_been_set =
false;
413 void SetValue(
void* pNewValue) {
419 struct _NONWINDOW_PROPERTY_FCSTRING
424 _NONWINDOW_PROPERTY_FCSTRING()
427 has_been_set =
false;
430 void SetValue(
FCString* pNewString) {
435 void SetIntegerValue(
int anint) {
440 void SetMeasurementValue(
double measurement, twobyte measurementunit) {
446 struct _NONWINDOW_PROPERTY_FCSTRINGS
451 _NONWINDOW_PROPERTY_FCSTRINGS()
454 has_been_set =
false;
457 void AppendString(
FCString* pString)
470 struct _NONWINDOW_PROPERTY_FCNUMBERS
475 _NONWINDOW_PROPERTY_FCNUMBERS()
478 has_been_set =
false;
481 void AppendInt(
int anint)
487 void AppendFloat(
float afloat)
500 struct _NONWINDOW_PROPERTY_BOOL
505 _NONWINDOW_PROPERTY_BOOL()
508 has_been_set =
false;
511 void SetValue(
bool newvalue) {
517 struct _NONWINDOW_PROPERTY_INT
522 _NONWINDOW_PROPERTY_INT()
525 has_been_set =
false;
528 void SetValue(
int newvalue) {
534 struct _NONWINDOW_PROPERTY_FLOAT
539 _NONWINDOW_PROPERTY_FLOAT()
542 has_been_set =
false;
545 void SetValue(
float newvalue) {
559 struct __FCUserWindow_NONWINDOWSTORAGE
561 _NONWINDOW_PROPERTY_FCSTRING title;
562 _NONWINDOW_PROPERTY_FLOAT width;
563 _NONWINDOW_PROPERTY_FLOAT height;
564 _NONWINDOW_PROPERTY_FLOAT clientheight;
565 _NONWINDOW_PROPERTY_FLOAT clientwidth;
579 FLAG_32 _lastcommandmodifierkeys;
582 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
583 #if OPERATING_SYSTEM == WINDOWS
588 float _WinHorizPixelsToPoints(
float value);
591 float _WinVertPixelsToPoints(
float value);
594 float _WinHorizPointsToPixels(
float value);
597 float _WinVertPointsToPixels(
float value);
601 __FCUserWindow_NONWINDOWSTORAGE nonwindow_store;
604 twobyte _modalresult;
606 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
607 #if OPERATING_SYSTEM == MAC_OS
609 _FCWindowController_cocoa* _pCocoaLink;
613 bool _pointsmeasurement;
614 #if OPERATING_SYSTEM == WINDOWS
617 float _maximumresizewidth;
618 float _minimumresizewidth;
619 float _maximumresizeheight;
620 float _minimumresizeheight;
621 float _oldresizewidth;
622 float _oldresizeheight;
625 bool _positionstored;
633 bool _isinwindowshademode;
634 float _nonwindowshadeheight;
636 bool _bufferedcontrolmovement;
637 #if OPERATING_SYSTEM == WINDOWS
638 bool _initwindowcalled;
639 bool _restorepositioncalled;
642 #if PDK_FRAMEWORK_DIAGNOSE
647 void _CheckControls();
651 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
654 void _CreateDynamicControls();
662 virtual void _InitNonWindowHandleStates();
668 void _StoreNonWindowHandleStates();
672 bool _closewindowcalled;
708 _lastcommandmodifierkeys = 0x0;
709 _pointsmeasurement =
false;
710 #if OPERATING_SYSTEM == MAC_OS
717 _closewindowcalled =
false;
718 _maximumresizewidth = _minimumresizewidth =
719 _maximumresizeheight = _minimumresizeheight =
720 _oldresizewidth = _oldresizeheight = 0;
721 _positionstored = _sizestored =
false;
722 _isinwindowshademode =
false;
723 _nonwindowshadeheight = 0;
724 WINCODE(_initwindowcalled =
false;)
725 WINCODE(_restorepositioncalled =
false;)
726 _bufferedcontrolmovement =
false;
736 return _pointsmeasurement;
742 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
744 void _WinStoreModifierKeys();
746 void _SetPointsMeasurement(
bool use_points)
748 _pointsmeasurement = use_points;
752 void _SetModalResult(twobyte modalresultid) { _modalresult = modalresultid; }
754 bool _GetCloseWindowCalled() {
return _closewindowcalled; }
761 void _HandleResizeChange(
int newwidth,
int newheight);
775 #if OPERATING_SYSTEM == WINDOWS
859 return ((_lastcommandmodifierkeys & modifiers) == modifiers);
880 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
881 #if OPERATING_SYSTEM == MAC_OS
883 _FCWindowController_cocoa* _GetCocoaLink()
891 void _SetWindowHandle(EWND hwnd) {
895 EWND GetWindowHandle() {
return _hwnd; }
904 _maximumresizewidth = width;
905 #if OPERATING_SYSTEM == MAC_OS
907 _FCWindowController_cocoa* pCocoaLink = _GetCocoaLink();
908 if (!pCocoaLink)
return;
909 pCocoaLink->SetMaximumResizeWidth(width);
918 _maximumresizeheight = height;
919 #if OPERATING_SYSTEM == MAC_OS
921 _FCWindowController_cocoa* pCocoaLink = _GetCocoaLink();
922 if (!pCocoaLink)
return;
923 pCocoaLink->SetMaximumResizeHeight(height);
930 return _minimumresizewidth;
936 if (_isinwindowshademode)
return 0;
937 return _minimumresizeheight;
943 return _maximumresizewidth;
949 return _maximumresizeheight;
1000 _SetModalResult(IDOK);
1015 _SetModalResult(IDCANCEL);
1074 virtual void HandleResize(
int newwidth,
int newheight,
int oldwidth,
int oldheight) {}
1094 void SetTimer(twobyte timerID, ufourbyte msInterval);
1185 #if OPERATING_SYSTEM == WINDOWS
1189 _initwindowcalled = value;
1195 _restorepositioncalled = value;
1202 if (!_initwindowcalled)
return;
1203 if (!_restorepositioncalled)
return;
1209 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1215 struct __FCControl_NONWINDOWSTORAGE
1217 _NONWINDOW_PROPERTY_FCSTRING text;
1218 _NONWINDOW_PROPERTY_BOOL enabled;
1219 _NONWINDOW_PROPERTY_BOOL visible;
1220 _NONWINDOW_PROPERTY_FLOAT left;
1221 _NONWINDOW_PROPERTY_FLOAT top;
1222 _NONWINDOW_PROPERTY_FLOAT width;
1223 _NONWINDOW_PROPERTY_FLOAT height;
1240 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1241 #if OPERATING_SYSTEM == WINDOWS
1242 HFONT _storednewfont;
1245 float _WinHorizPixelsToPoints(
float value);
1248 float _WinVertPixelsToPoints(
float value);
1251 float _WinHorizPointsToPixels(
float value);
1254 float _WinVertPointsToPixels(
float value);
1270 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1272 __FCControl_NONWINDOWSTORAGE nonwindow_store;
1275 bool _pointsmeasurement;
1277 bool _programmaticallycreate;
1279 bool _bufferedmove, _bufferedresize;
1280 float _bufferedx, _bufferedy, _bufferedwidth, _bufferedheight;
1287 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1291 CONTROLTYPE_UNDEFINED,
1293 CONTROLTYPE_DATALIST,
1296 CONTROLTYPE_CHECKBOX,
1300 CONTROLTYPE_COMBOBOX,
1303 CONTROLTYPE_LISTBOX,
1304 CONTROLTYPE_RADIOBUTTONGROUP,
1305 CONTROLTYPE_SWITCHER,
1320 WINCODE(_storednewfont = 0;)
1322 _pointsmeasurement =
false;
1323 _programmaticallycreate =
false;
1325 _controlaction = ACTION_NONE;
1327 _ResetBufferedMovement();
1333 WINCODE(DeleteObject(_storednewfont);)
1342 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1344 void _SetPointsMeasurement(
bool use_points) { _pointsmeasurement = use_points; }
1347 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_UNDEFINED; }
1353 virtual float _GetAutoCreateWidth() {
return 70; }
1359 virtual float _GetAutoCreateMultilineHeight() {
return 150; }
1361 #if OPERATING_SYSTEM == WINDOWS
1366 bool _WinCreateUIControl(
int height_DU, LPCSTR classnameA, LPWSTR classnameW, DWORD style, DWORD exstyle);
1373 bool _CreateUIControl();
1381 virtual void _InitNonWindowHandleStates();
1389 virtual void _StoreNonWindowHandleStates();
1394 _pParent = parentptr;
1401 void _SetProgrammaticallyCreate(
bool state) { _programmaticallycreate = state; }
1404 bool _GetProgrammaticallyCreate() {
return _programmaticallycreate; }
1414 if (!_pParent)
return false;
1415 #if OPERATING_SYSTEM == WINDOWS
1418 if (!_GetCocoaLink())
return false;
1423 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1424 #if OPERATING_SYSTEM == MAC_OS
1426 _FCWindowController_cocoa* _GetCocoaLink()
1428 return _pParent ? _pParent->_GetCocoaLink() : NULL;
1432 HWND GetWindowHandle() {
return _pParent ? _pParent->GetWindowHandle() : 0; }
1436 #if OPERATING_SYSTEM == WINDOWS
1441 if (!GetWindowHandle())
return 0;
1452 #if OPERATING_SYSTEM == WINDOWS
1516 virtual void SetBold(
bool state);
1524 #if OPERATING_SYSTEM == MAC_OS
1586 virtual void ResizeRelative(
float horizresize,
float vertresize);
1588 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1593 bool _HasBufferedMovement()
1595 return (_bufferedmove || _bufferedresize);
1599 void _ResetBufferedMovement()
1601 _bufferedmove = _bufferedresize =
false;
1605 void _GetBufferedMovement(
bool *pshouldmove,
bool *pshouldresize,
1606 float *px,
float *py,
float *pwidth,
float *pheight)
1608 *pshouldmove = _bufferedmove;
1609 *pshouldresize = _bufferedresize;
1612 *pwidth = _bufferedwidth;
1613 *pheight = _bufferedheight;
1620 void _BufferMove(
float x,
float y)
1622 _bufferedmove =
true;
1631 void _BufferResize(
float width,
float height)
1633 _bufferedresize =
true;
1634 _bufferedwidth = width;
1635 _bufferedheight = height;
1638 #ifdef PDK_FRAMEWORK_DIAGNOSE
1643 bool _ControlExists();
1648 void _ControlClassCheck();
1656 virtual const char* _WinGetUIClassName() {
return "Undefined"; }
1665 virtual const char* _MacGetUIClassName() {
return "Undefined"; }
1683 struct __FCCtrlUpDown_NONWINDOWSTORAGE
1685 _NONWINDOW_PROPERTY_INT steppervalue;
1686 _NONWINDOW_PROPERTY_INT min;
1687 _NONWINDOW_PROPERTY_INT max;
1688 } updown_nonwindow_store;
1691 virtual void _InitNonWindowHandleStates();
1694 virtual void _StoreNonWindowHandleStates();
1699 CONNECTED_MEASUREMENT
1700 } _connectededitmode;
1705 double _minMeasurement;
1706 double _maxMeasurement;
1712 _connectededitmode = CONNECTED_NONE;
1713 _pConnectedEditControl = NULL;
1714 _minInt = _maxInt = 0;
1715 _minMeasurement = _maxMeasurement = 0;
1726 void SetValue(
int value);
1738 void SetRange(
int min,
int max);
1758 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1759 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_UPDOWN; }
1761 virtual float _GetAutoCreateWidth() {
return WINCODE(14;) MACCODE(19;) }
1778 if (!pControl)
return false;
1779 if (max < min)
return false;
1780 _connectededitmode = CONNECTED_INT;
1781 _pConnectedEditControl = pControl;
1784 #if OPERATING_SYSTEM == MAC_OS
1804 if (!pControl)
return false;
1805 if (max < min)
return false;
1806 _connectededitmode = CONNECTED_MEASUREMENT;
1807 _pConnectedEditControl = pControl;
1808 _minMeasurement = min;
1809 _maxMeasurement = max;
1810 #if OPERATING_SYSTEM == MAC_OS
1811 SetRange((
int) min, (
int) max);
1816 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1818 void _HandleConnectedEditEvent(
int delta);
1821 #ifdef PDK_FRAMEWORK_DIAGNOSE
1822 virtual const char* _WinGetUIClassName() {
return "msctls_updown32"; }
1823 virtual const char* _MacGetUIClassName() {
return "NSStepper"; }
1838 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1839 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_LINE; }
1841 virtual float _GetAutoCreateWidth() {
return 150; }
1857 #if OPERATING_SYSTEM == WINDOWS
1864 #if OPERATING_SYSTEM == WINDOWS
1883 #ifdef PDK_FRAMEWORK_DIAGNOSE
1884 virtual const char* _WinGetUIClassName() {
return "Static"; }
1885 virtual const char* _MacGetUIClassName() {
return "NSBox"; }
1895 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1896 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_STATIC; }
1898 virtual float _GetAutoCreateWidth() {
return 100; }
1910 void SetInteger(
int anint);
1912 #ifdef PDK_FRAMEWORK_DIAGNOSE
1913 virtual const char* _WinGetUIClassName() {
return "Static"; }
1914 virtual const char* _MacGetUIClassName() {
return "NSTextField"; }
1926 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
1927 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_EDIT; }
1929 virtual float _GetAutoCreateWidth() {
return 70; }
1954 int GetRangeInteger(
int minimum,
int maximum);
1956 #ifdef PDK_FRAMEWORK_PREFS
1967 double GetMeasurement(_ENUMCODE(
MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
1984 double GetRangeMeasurement(_ENUMCODE(
MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit,
double min,
double max);
2000 float f = GetMeasurement(measurementunit);
2024 float f = GetRangeMeasurement(measurementunit, min / 64, max / 64);
2043 void SetMeasurement(
double value, _ENUMCODE(
MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2060 SetMeasurement(value, measurementunit);
2074 double GetMeasurementInteger(_ENUMCODE(
MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2091 double GetRangeMeasurementInteger(_ENUMCODE(
MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit,
int min,
int max);
2104 void SetMeasurementInteger(
double value, _ENUMCODE(
MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit);
2111 void SetInteger(
int anint);
2114 void SetFloat(
float value);
2117 float GetFloat(
float min,
float max);
2120 void AdjustIntegerWithin(
int min,
int max);
2129 void SetMaxLength(twobyte maxlength);
2132 void SetReadOnly(
bool readonly);
2135 void ScrollToBottom();
2137 #ifdef PDK_FRAMEWORK_DIAGNOSE
2138 virtual const char* _WinGetUIClassName() {
return "Edit"; }
2139 virtual const char* _MacGetUIClassName() {
return "NSTextField;NSSearchField"; }
2151 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_POPUP; }
2153 virtual float _GetAutoCreateWidth() {
return 100; }
2155 struct __FCCtrlPopup_NONWINDOWSTORAGE
2157 _NONWINDOW_PROPERTY_INT selecteditem;
2158 _NONWINDOW_PROPERTY_FCSTRINGS items;
2159 } popup_nonwindow_store;
2162 virtual void _InitNonWindowHandleStates();
2165 virtual void _StoreNonWindowHandleStates();
2185 void InsertString(
int index,
FCString* pString);
2199 if (!pStrings)
return;
2200 for (
int i = 0; i < pStrings->
GetCount(); i++)
2213 void DeleteItem(
int index);
2227 int GetSelectedItem();
2235 void SetSelectedItem(
int index);
2238 void SetItemText(
int index,
FCString* pString);
2240 #ifdef PDK_FRAMEWORK_DIAGNOSE
2241 virtual const char* _WinGetUIClassName() {
return "ComboBox"; }
2242 virtual const char* _MacGetUIClassName() {
return "NSPopUpButton"; }
2256 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_COMBOBOX; }
2258 virtual const char*
ClassName() {
return "FCCtrlComboBox"; }
2282 if (!pStrings)
return;
2283 for (
int i = 0; i < pStrings->
GetCount(); i++)
2295 #ifdef PDK_FRAMEWORK_DIAGNOSE
2296 virtual const char* _WinGetUIClassName() {
return "ComboBox"; }
2297 virtual const char* _MacGetUIClassName() {
return "NSComboBox"; }
2313 int _connectedlineindex;
2317 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2324 void _SetCheckState(
bool state) { _checked = state; }
2331 _connectedlineindex = -1;
2332 _connectedlist = NULL;
2336 void SetCheck(
bool state);
2359 bool _usecheckboxes;
2361 struct __FCDataList_NONWINDOWSTORAGE
2363 _NONWINDOW_PROPERTY_FCSTRINGS columntexts;
2364 _NONWINDOW_PROPERTY_FCNUMBERS columnwidths;
2365 _NONWINDOW_PROPERTY_INT selectedindex;
2366 } datalist_nonwindow_store;
2373 virtual void _InitNonWindowHandleStates();
2376 virtual void _StoreNonWindowHandleStates();
2382 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2384 #if OPERATING_SYSTEM == MAC_OS
2388 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_DATALIST; }
2390 virtual float _GetAutoCreateWidth() {
return 200; }
2392 virtual float _GetAutoCreateMultilineHeight() {
return 150; }
2395 virtual const char*
ClassName() {
return "FCCtrlDataList"; }
2400 _usecheckboxes =
false;
2401 datalist_nonwindow_store.selectedindex.value = -1;
2402 #if OPERATING_SYSTEM == MAC_OS
2418 #if OPERATING_SYSTEM == MAC_OS
2419 _fontsize = fontsize;
2423 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2424 const eUniChar16* _GetCellUnicodeText(
FCDataListRow* pRow,
int columnindex);
2426 const char* _GetCellCText(
FCDataListRow* pRow,
int columnindex);
2434 void SetColumnTitle(
int columnindex,
FCString* pTitle);
2440 bool AddColumn(
FCString* pTitle,
float columnwidth);
2471 bool DeleteRow(
int lineindex);
2480 void DeleteAllColumns();
2506 bool UseLeftCheckboxColumn();
2520 void UseFullRowSelect();
2541 bool SelectLine(
int lineindex,
bool ensurevisible);
2550 void ExpandLastColumn();
2561 int GetSelectedLine();
2599 pRow->_SetCheckState(state);
2609 void ReconnectAll();
2613 bool HasCheckboxes();
2624 int GetDetailedColumnCount(
bool includecheckboxcolumn);
2638 float GetColumnWidth(
int columnindex);
2646 bool Swap(
int rowindex1,
int rowindex2,
bool redraw);
2648 #ifdef PDK_FRAMEWORK_DIAGNOSE
2649 virtual const char* _WinGetUIClassName() {
return "SysListView32"; }
2650 virtual const char* _MacGetUIClassName() {
return "NSTableView"; }
2672 #if OPERATING_SYSTEM == WINDOWS
2679 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2680 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_LISTBOX; }
2682 virtual float _GetAutoCreateWidth() {
return 150; }
2684 virtual float _GetAutoCreateMultilineHeight() {
return 170; }
2688 struct __FCCtrlListBox_NONWINDOWSTORAGE
2690 _NONWINDOW_PROPERTY_INT selecteditem;
2691 _NONWINDOW_PROPERTY_FCSTRINGS items;
2692 } listbox_nonwindow_store;
2695 virtual void _InitNonWindowHandleStates();
2698 virtual void _StoreNonWindowHandleStates();
2700 #if OPERATING_SYSTEM == MAC_OS
2701 void _MacSetupListboxColumn();
2727 int GetSelectedItem();
2741 void SetSelectedItem(
int index);
2752 int count = GetCount();
2753 if (count < 1)
return false;
2754 SetSelectedItem(count - 1);
2759 void ClearSelection();
2767 void SetItemText(
int index,
FCString* pString);
2775 void GetItemText(
int index,
FCString* pString);
2781 void DeleteItem(
int index);
2791 void InsertItem(
int index,
FCString* pString);
2802 #ifdef PDK_FRAMEWORK_DIAGNOSE
2803 virtual const char* _WinGetUIClassName() {
return "ListBox"; }
2824 #if OPERATING_SYSTEM == WINDOWS
2885 if (!pString)
return;
2895 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2898 void _SetIsContainer(
bool state) { _iscontainer = state; }
2905 void _SetExpanded(
bool state) { _expanded = state; }
2912 bool _GetExpanded() {
return _expanded; }
2924 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
2925 void _SetTreeControl(
FCCtrlTree* pTree) { _pTreeControl = pTree; }
2927 FCCtrlTree* _GetTreeControl() {
return _pTreeControl; }
2929 void _SetParentNode(
FCTreeNode* pNode) { _pParentNode = pNode; }
2932 void _SetSelected(
bool selected) { _isselected = selected; }
2935 bool _GetSelected() {
return _isselected; }
2954 if (!_pParentNode)
return -1;
2966 if (!_pParentNode)
return 0;
2971 #if OPERATING_SYSTEM == WINDOWS
2981 void _SetItemHandle(
2982 #
if OPERATING_SYSTEM == WINDOWS
2991 #ifdef PDK_FRAMEWORK_DEBUG
3029 #if OPERATING_SYSTEM == MAC_OS
3030 void _MacSetupTreeColumn();
3039 void _DeleteAllSubNodes(
FCTreeNode* pBaseNode);
3046 #if OPERATING_SYSTEM == MAC_OS
3054 _DeleteAllSubNodes(_pRootNode);
3058 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3059 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_TREE; }
3061 virtual float _GetAutoCreateWidth() {
return 150; }
3063 virtual float _GetAutoCreateMultilineHeight() {
return 170; }
3066 virtual void _InitNonWindowHandleStates();
3069 virtual void _StoreNonWindowHandleStates();
3074 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3212 #if OPERATING_SYSTEM == MAC_OS
3238 void ExpandAllContainers();
3244 void CollapseAllContainers();
3267 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3291 #ifdef PDK_FRAMEWORK_DIAGNOSE
3292 virtual const char* _WinGetUIClassName() {
return "SysTreeView32"; }
3293 virtual const char* _MacGetUIClassName() {
return "NSOutlineView"; }
3316 struct __FCCtrlSwitcher_NONWINDOWSTORAGE
3318 _NONWINDOW_PROPERTY_INT selectedindex;
3319 _NONWINDOW_PROPERTY_FCSTRINGS items;
3320 } switcher_nonwindow_store;
3322 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3323 virtual float _GetAutoCreateWidth() {
return 200; }
3326 virtual void _InitNonWindowHandleStates();
3329 virtual void _StoreNonWindowHandleStates();
3332 bool _FindControlIDReference(
int theid);
3337 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3338 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_SWITCHER; }
3360 bool AttachControl(
FCControl* pControl,
int index);
3367 void HandleVisibleStates(
int index);
3380 int GetSelectedPage();
3388 void SetSelectedPage(
int index);
3390 #ifdef PDK_FRAMEWORK_DIAGNOSE
3391 virtual const char* _WinGetUIClassName() {
return "SysTabControl32"; }
3392 virtual const char* _MacGetUIClassName() {
return "NSSegmentedControl"; }
3406 struct __FCCtrlCheckbox_NONWINDOWSTORAGE
3408 _NONWINDOW_PROPERTY_BOOL checkstate;
3409 } radiobutton_nonwindow_store;
3411 virtual float _GetAutoCreateWidth() {
return 100; }
3414 virtual void _InitNonWindowHandleStates();
3417 virtual void _StoreNonWindowHandleStates();
3428 void SetCheck(
bool checked);
3433 #ifdef PDK_FRAMEWORK_DIAGNOSE
3434 virtual const char* _WinGetUIClassName() {
return "Button"; }
3435 virtual const char* _MacGetUIClassName() {
return "NSButton"; }
3443 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_RADIOBUTTONGROUP; }
3460 struct __FCCtrlCheckbox_NONWINDOWSTORAGE
3462 _NONWINDOW_PROPERTY_INT checkstate;
3463 _NONWINDOW_PROPERTY_BOOL threestate;
3464 } checkbox_nonwindow_store;
3467 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_CHECKBOX; }
3469 virtual float _GetAutoCreateWidth() {
return 100; }
3472 virtual void _InitNonWindowHandleStates();
3475 virtual void _StoreNonWindowHandleStates();
3486 virtual void SetCheck(twobyte checked);
3492 virtual twobyte GetCheck();
3508 checkbox_nonwindow_store.threestate.value = allow3states;
3517 return checkbox_nonwindow_store.threestate.value;
3520 #ifdef PDK_FRAMEWORK_DIAGNOSE
3521 virtual const char* _WinGetUIClassName() {
return "Button"; }
3522 virtual const char* _MacGetUIClassName() {
return "NSButton"; }
3534 WINCODE(HFONT _storednewfont;)
3537 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_BUTTON; }
3539 virtual float _GetAutoCreateWidth() {
return 60; }
3544 WINCODE(_storednewfont = 0;)
3551 void ClearShortcutKey();
3561 void SetFontSize(
int fontsize);
3563 #ifdef PDK_FRAMEWORK_DIAGNOSE
3564 virtual const char* _WinGetUIClassName() {
return "Button"; }
3565 virtual const char* _MacGetUIClassName() {
return "NSButton"; }
3579 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_SLIDER; }
3581 virtual float _GetAutoCreateWidth() {
return 150; }
3583 struct __FCCtrlSlider_NONWINDOWSTORAGE
3585 _NONWINDOW_PROPERTY_INT minvalue;
3586 _NONWINDOW_PROPERTY_INT maxvalue;
3587 _NONWINDOW_PROPERTY_INT thumbpos;
3588 } slider_nonwindow_store;
3591 virtual void _InitNonWindowHandleStates();
3594 virtual void _StoreNonWindowHandleStates();
3609 void SetMinValue(
int min);
3621 void SetMaxValue(
int max);
3627 void SetThumbPosition(
int position);
3635 int GetThumbPosition();
3637 #ifdef PDK_FRAMEWORK_DIAGNOSE
3638 virtual const char* _WinGetUIClassName() {
return "msctls_trackbar32"; }
3639 virtual const char* _MacGetUIClassName() {
return "NSSlider"; }
3644 #ifdef PDK_FRAMEWORK_CANVASCTRL
3653 struct __FCCtrlSlider_NONWINDOWSTORAGE
3655 _NONWINDOW_PROPERTY_VOIDPTR instructions;
3656 } canvas_nonwindow_store;
3659 virtual _CONTROL_TYPE _GetControlType() {
return CONTROLTYPE_CANVAS; }
3661 virtual float _GetAutoCreateWidth() {
return 80; }
3663 virtual float _GetAutoCreateMultilineHeight() {
return 80; }
3666 virtual void _InitNonWindowHandleStates();
3669 virtual void _StoreNonWindowHandleStates();
3672 FCCtrlCanvas(twobyte
id) :
FCControl(id) {}
3676 void RebuildInstructions(FCVirtualCanvasInstructions* pInstructions);
3678 #ifdef PDK_FRAMEWORK_DIAGNOSE
3679 virtual const char* _WinGetUIClassName() {
return "Static"; }
3680 virtual const char* _MacGetUIClassName() {
return "NSFCCtrlCanvas"; }
3693 #if OPERATING_SYSTEM == WINDOWS
3694 FF_DialogHandlerUPP _handler;
3706 EXECMODAL_CLOSE = 0,
3712 EXECMODAL_CANCEL = 2
3726 void DestroyWindow();
3729 virtual void InitWindow();
3734 virtual void CloseWindow();
3740 void ShowModeless(EWND hParent);
3753 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
3758 ExecuteModal_EWND(EWND hParent);
3774 #ifndef PDK_FRAMEWORK_LUAFRIENDLY
3781 #if OPERATING_SYSTEM == WINDOWS
3783 virtual bool HandleWMNotify(WPARAM wparam, LPARAM lparam);
3788 void _SetupInternalWindowCode();
3794 pControl->SetParent(
this);
3869 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
3870 #define __IDRESOURCE_CUSTOMWINDOW 5001
3903 int _CalcAvailableCtrlID()
3906 for (
int i = 0; i < GetCount(); i++)
3910 if ((testid >= tryid) && (testid < 20000))
3921 if (!pControl)
return pControl;
3923 pControl->_SetPointsMeasurement(
true);
3924 pControl->SetParent(
this);
3925 pControl->_SetProgrammaticallyCreate(
true);
3937 if (!pControl)
return pControl;
3939 pControl->_SetPointsMeasurement(
true);
3940 pControl->SetParent(
this);
3941 pControl->_SetProgrammaticallyCreate(
true);
3949 void _MoveAllControls(
int horizoffset,
int vertoffset);
3955 void _CalcControlsExtent(
float *pLeftMin,
float* pTopMin,
float* pRightMax,
float* pBottomMax);
3961 virtual void _InitNonWindowHandleStates();
3969 _SetPointsMeasurement(
true);
4031 if (FindControl(1))
return NULL;
4033 pOkButton->
SetAction(FCControl::ACTION_OK);
4050 if (FindControl(2))
return NULL;
4052 pCancelButton->
SetAction(FCControl::ACTION_CANCEL);
4054 pCancelButton->
SetText(&canceltext);
4055 return pCancelButton;
4159 if (no_of_items < 1)
return NULL;
4160 if (no_of_items > 20)
return NULL;
4188 #ifdef PDK_FRAMEWORK_CANVASCTRL
4189 FCCtrlCanvas* CreateCanvas(
float x,
float y) {
return (FCCtrlCanvas*) _AddCreatedCtrl(
new FCCtrlCanvas(_CalcAvailableCtrlID()), x, y); }
void SetLeft(float pos)
Sets the left position of the control.
Definition: finaleframework.cpp:22503
A control to switch between multiple pages.
Definition: ff_dialogs.h:3310
FCCtrlEdit * AddEdit(twobyte id)
Links an edit field object to the dialog resource.
Definition: ff_dialogs.h:3816
Control class for sliders.
Definition: ff_dialogs.h:3576
__FCBase * GetItemAt(int index)
Returns the object at the index position. Index is 0-based.
Definition: finaleframework.cpp:12797
void SetTop(float pos)
Sets the top position of the control.
Definition: finaleframework.cpp:22535
static void DebugOutString(const char *pszPrefixText, const char *thestring)
Static method that outputs a line for debugging purposes (C string version). The text appears with th...
Definition: finaleframework.cpp:375
FCCtrlComboBox * AddComboBox(twobyte id)
Links a combo box object to the dialog resource.
Definition: ff_dialogs.h:3810
FCCtrlUpDown * CreateUpDown(float x, float y)
Creates and connects a up/down (stepper) control to the window.
Definition: ff_dialogs.h:4144
void ClearAll()
Destroys all the objects in the collection and empties the collection.
Definition: ff_basecollection.h:130
int GetSiblingCount()
Returns the number of childen that the node's parent has.
Definition: ff_dialogs.h:2964
FCFolderBrowseDialog(FCUI *pUI)
The constructor.
Definition: ff_dialogs.h:303
void SetClientWidth(float newwidth)
Changes the width of the window client area.
Definition: finaleframework.cpp:23233
int GetColumnCount()
Returns the number of columns.
Definition: ff_dialogs.h:2630
int GetAssignedID()
Gets the connected ID regardless of platform.
Definition: ff_dialogs.h:1477
bool WindowExists()
Returns true if a valid parent window handle (and control handle) is available.
Definition: ff_dialogs.h:1412
virtual void SetVisible(bool bShow)
Sets the visibility of the control.
Definition: finaleframework.cpp:22419
FCControl * GetItemAt(int index)
Overloaded implementation of GetItemAt().
Definition: ff_dialogs.h:773
void SetTitle(FCString *pTitle)
Sets the caption (title) for the window.
Definition: finaleframework.cpp:23333
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:1932
virtual void ResizeRelative(float horizresize, float vertresize)
Resizes the control relatively to the current size. Top left corner will stay fixed.
Definition: finaleframework.cpp:22727
virtual void HandleResize(int newwidth, int newheight, int oldwidth, int oldheight)
Handler called when user resizes the window.
Definition: ff_dialogs.h:1074
float GetStoredWidth()
Returns the stored width. -1 if no width has been stored.
Definition: finaleframework.cpp:23426
void SetFontSize(int size)
Sets the font size of the tree control.
Definition: ff_dialogs.h:3210
float GetMaximumResizeHeight()
Returns the maximum resize height for resizable dialogs/windows.
Definition: ff_dialogs.h:947
FCCtrlCheckbox(twobyte id)
The constructor.
Definition: ff_dialogs.h:3478
virtual void SetKeyboardFocus()
Sets the keyboard focus to the control.
Definition: finaleframework.cpp:22491
bool TryToCloseWindow()
Tries to close the window. This method calls the CanClose() virtual method before calling CloseWindow...
Definition: ff_dialogs.h:873
float GetLeft()
Returns the left position of the control.
Definition: finaleframework.cpp:22513
A list box control.
Definition: ff_dialogs.h:2673
FCControl * AddCtrl(FCControl *pControl)
Adds a control object to the dialog collection.
Definition: ff_dialogs.h:3791
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:317
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:1042
void SetFontSize(int fontsize)
Sets the font size for the data list. This affects Cocoa only.
Definition: ff_dialogs.h:2416
FCCtrlLine * AddLine(twobyte id)
Links a line object to the dialog resource.
Definition: ff_dialogs.h:3799
__FCUserWindow * GetParent()
Returns the parent window object for the control.
Definition: ff_dialogs.h:1408
void SetThreeStatesMode(bool allow3states)
Enables the 3-states mode for a checkbox.
Definition: ff_dialogs.h:3506
void SetInitFolder(FCString *pString)
Sets the initial starting folder for the dialog box.
Definition: ff_dialogs.h:132
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:1068
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:1847
void SetHeight(float height)
Sets the height of the control.
Definition: finaleframework.cpp:22624
bool AddCopy(FCString *pString)
Adds a copy of the FCString object to the string collection.
Definition: ff_basecollection.h:943
void SetWindowTitle(FCString *pString)
Sets the title for the dialog box.
Definition: ff_dialogs.h:325
void _SetFileNames(FCStrings *pStrings)
For internal use only!
Definition: ff_dialogs.h:243
FCCtrlDataList(twobyte id)
The constructor.
Definition: ff_dialogs.h:2398
CONTROL_ACTIONS
Predefined actions for controls.
Definition: ff_dialogs.h:1262
void Clear()
Creates an empty string.
Definition: ff_base.h:1831
FCCtrlRadioButton * AddRadioButton(twobyte id)
Links a radio button object to the dialog resource.
Definition: ff_dialogs.h:3841
FCCtrlStatic * CreateStatic(float x, float y)
Adds a static text object to the window.
Definition: ff_dialogs.h:3982
FCCtrlUpDown(twobyte id)
The constructor.
Definition: ff_dialogs.h:1710
void StartBufferControlMovement()
Marks a start of buffered movement for the controls in the dialog.
Definition: finaleframework.cpp:23600
FCCustomWindow()
The constructor.
Definition: ff_dialogs.h:3967
FCCtrlLine(twobyte id)
The constructor.
Definition: ff_dialogs.h:1850
float GetTop()
Returns the top position of the control.
Definition: finaleframework.cpp:22545
void GetWindowTitle(FCString *pString)
Copies the initialized window title to a FCString object.
Definition: ff_dialogs.h:142
void SetTextAndResize(FCString *pString)
Cocoa only: Sets the text and resizes the view inside a NSScrollView.
Definition: finaleframework.cpp:22321
bool GetIsContainer()
Returns true if the node is set to be a container (that can contain subnodes).
Definition: ff_dialogs.h:2922
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:23053
virtual void SetEnable(bool state)
Sets the enable/grayed state of the control (if user input should be allowed or not).
Definition: ff_dialogs.h:1855
HWND _GetWinControlHandle()
For internal use only. Returns to handle for the control.
Definition: ff_dialogs.h:1439
virtual void GetText(FCString *pString)
Gets the text of the control.
Definition: finaleframework.cpp:22382
float GetMinimumResizeWidth()
Returns the minimum resize width for resizable dialogs/windows.
Definition: ff_dialogs.h:928
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:177
void Hide()
Hides the window.
Definition: finaleframework.cpp:22970
float GetHeight()
Returns the height of the control.
Definition: finaleframework.cpp:22566
Class that handles a contol with multiple lines of data, arranged in columns.
Definition: ff_dialogs.h:2357
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:1719
void _SetModelessEnabledState()
For internal use only.
Definition: finaleframework.cpp:23116
void SetHorizontal(bool horiz)
Sets the line style to horizontal or vertical. This is only used for programmatically created lines...
Definition: ff_dialogs.h:1875
FCCtrlCheckbox * CreateCheckbox(float x, float y)
Creates and connects a checkbox control to the window.
Definition: ff_dialogs.h:4018
virtual bool GetEnable()
Returns the enable/grayed state of the control (if user input should be allowed or not)...
Definition: finaleframework.cpp:22305
FCCtrlStatic(twobyte id)
The constructor.
Definition: ff_dialogs.h:1904
FCStrings * _GetFilters()
For internal use only!
Definition: ff_dialogs.h:87
UI class that handles a combo box, which is a combination of a edit field and a popup list...
Definition: ff_dialogs.h:2254
void SetStrings(FCStrings *pStrings)
Sets a string collection to the popup part of the combo box.
Definition: ff_dialogs.h:2279
FCCtrlPopup * AddPopup(twobyte id)
Links a popup object to the dialog resource.
Definition: ff_dialogs.h:3821
void AddFilter(FCString *pFilter, FCString *pFilterDescription)
Adds a file filter with description. Multiple filters can be added.
Definition: ff_dialogs.h:72
bool GetVisible()
Returns the visibility state of a control.
Definition: finaleframework.cpp:22478
FCControl(twobyte id)
The constructor.
Definition: ff_dialogs.h:1318
Control class for a checkbox control.
Definition: ff_dialogs.h:3458
Simple collection class for FCNumber class objects.
Definition: ff_basecollection.h:329
bool GetThreeStatesMode() const
Returns the 3-states mode for the checkbox.
Definition: ff_dialogs.h:3515
FCCtrlStatic * AddStatic(twobyte id)
Links a static text object to the dialog resource.
Definition: ff_dialogs.h:3804
bool IsInBufferMode()
Returns true if buffered movement has been started with StartBufferControlMovement.
Definition: ff_dialogs.h:1183
FCCtrlEdit(twobyte id)
The constructor.
Definition: ff_dialogs.h:1935
int GetRootCount()
Returns the number of container nodes in the tree.
Definition: ff_dialogs.h:3252
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:2704
void MoveRelative(float horizmove, float vertmove)
Moves the control relatively to the current position.
Definition: finaleframework.cpp:22647
FCCtrlPopup * CreatePopup(float x, float y)
Creates and connects a popup/drop-down list control to the window.
Definition: ff_dialogs.h:4068
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:2258
Definition: ff_dialogs.h:1237
virtual bool CanClose()
Virtual method that decides if the window can close or not.
Definition: ff_dialogs.h:1113
void SetEnabled(bool state)
Sets the enabled state of the window.
Definition: finaleframework.cpp:23107
void _WinSetRestorePositionCalled(bool value)
For internal use only - Windows only!
Definition: ff_dialogs.h:1193
void _SetLastCommandModifierKeys(FLAG_32 value)
For internal use only.
Definition: ff_dialogs.h:680
virtual void SetText(FCString *pString)
Sets the text for the control.
Definition: finaleframework.cpp:22338
void SetWindowAlpha(twobyte alphapercent)
Sets the transparency for the window.
Definition: finaleframework.cpp:23568
void SetTimer(twobyte timerID, ufourbyte msInterval)
Creates a timer with the supplied ID and the timeout/refresh interval. (Timers are not supported in m...
Definition: finaleframework.cpp:23070
float GetWidth()
Returns the width of the control.
Definition: finaleframework.cpp:22583
int GetRootIndexOf(FCTreeNode *pNode)
Returns the index of a node that appears at root level.
Definition: ff_dialogs.h:3283
virtual bool HandleCommand(FCControl *pControl)
Virtual method that is called when a user command occurs, such as a button press. ...
Definition: ff_dialogs.h:1024
Class to display the operating system's "Open File" modal dialog box.
Definition: ff_dialogs.h:199
int GetCount() const
Returns the number of elements of the collection.
Definition: ff_basecollection.h:86
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:338
FCCtrlButton * CreateOkButton()
Creates an "Ok" push button, with default positioning and appearance/behaviour.
Definition: ff_dialogs.h:4029
void StopTimer(twobyte timerID)
Destroys a previously created timer (created with SetTimer()).
Definition: finaleframework.cpp:23091
bool GetPointsMeasurement()
Returns if the measurements and positioning is in points or in a system-native unit for this window...
Definition: ff_dialogs.h:734
void SetRestorePositionData(float x, float y, float width, float height)
Sets the restore position and size.
Definition: finaleframework.cpp:23392
void SetString(FCString *pString)
Copies a string.
Definition: finaleframework.cpp:2132
__FCUserWindow()
The constuctor.
Definition: ff_dialogs.h:706
__FCFileDialogBase(FCUI *pUI)
The constructor.
Definition: ff_dialogs.h:54
virtual ~FCControl()
Destructor.
Definition: ff_dialogs.h:1331
virtual void InitWindow()
Called once just when the window/dialog has been created.
Definition: finaleframework.cpp:23009
FCCtrlSlider * CreateSlider(float x, float y)
Creates and connects a horizontal slider control to the window.
Definition: ff_dialogs.h:4120
FCString * GetItemAt(int index)
Overridden GetItemAt() method.
Definition: ff_basecollection.h:958
COMMAND_MOD_KEYS
Constants for the QueryLastCommandModifierKeys() method.
Definition: ff_dialogs.h:686
void SetWidth(float width)
Sets the width of the control.
Definition: finaleframework.cpp:22600
void GetWindowTitle(FCString *pString)
Gets the assigned dialog title.
Definition: ff_dialogs.h:358
int GetIndex()
Returns the index of the item within the parent container.
Definition: ff_dialogs.h:2952
bool Execute()
Displays the dialog box to the user.
Definition: finaleframework.cpp:26838
FCCtrlSlider(twobyte id)
The costructor.
Definition: ff_dialogs.h:3597
Definition: ff_dialogs.h:701
void SetMultiSelect(bool value)
Sets the dialog to allow multiple selections.
Definition: ff_dialogs.h:219
float GetMinimumResizeHeight()
Returns the minimum resize height for resizable dialogs/windows.
Definition: ff_dialogs.h:934
Base class that contains the basic functionality for the operating system's modal dialog boxes for se...
Definition: ff_dialogs.h:40
int GetConnectedLineIndex()
Returns the connected 0-based line index in the control.
Definition: ff_dialogs.h:2342
FCCtrlSwitcher(twobyte id)
The constructor.
Definition: ff_dialogs.h:3335
void SetAction(CONTROL_ACTIONS action)
Sets the dialog acction assigned to the control.
Definition: ff_dialogs.h:1489
FCCtrlDataList * CreateDataList(float x, float y)
Creates and connects a data list view control to the window.
Definition: ff_dialogs.h:4202
FCControl * FindControl(int controlid)
Finds a control based on the control's ID.
Definition: finaleframework.cpp:23060
Standard class for basic user interface functionality.
Definition: ff_ui.h:25
virtual void SetEnable(bool state)
Sets the enable/grayed state of the control (if user input should be allowed or not).
Definition: finaleframework.cpp:22287
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:998
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:1062
float GetMaximumResizeWidth()
Returns the maximum resize width for resizable dialogs/windows.
Definition: ff_dialogs.h:941
int GetIndexOf(__FCBase *pObject)
Returns the 0-based order index for the object within the collection.
Definition: finaleframework.cpp:12805
FCCtrlCheckbox * AddCheckbox(twobyte id)
Links a checkbox object to the dialog resource.
Definition: ff_dialogs.h:3846
FCFileOpenDialog(FCUI *pUI)
The constructor.
Definition: ff_dialogs.h:210
twobyte GetModalResult()
Definition: ff_dialogs.h:677
CONTROL_ACTIONS GetAction()
Returns the dialog acction assigned to the control.
Definition: ff_dialogs.h:1483
void AddFloat(float afloat)
Appends an integer number to the collection.
Definition: ff_basecollection.h:379
FCCtrlEdit * CreateEdit(float x, float y)
Adds an edit control object to the window.
Definition: ff_dialogs.h:3994
void ShowAndActivate()
Makes the window visible and sets it focused.
Definition: finaleframework.cpp:22980
void SetClientHeight(float newheight)
Changes the height of the window client area (excluding the title bar).
Definition: finaleframework.cpp:23277
void GetTitle(FCString *pTitle)
Gets the caption (title) for the window.
Definition: finaleframework.cpp:23351
Base class for the Finale Framework classes.
Definition: ff_base.h:47
virtual bool Execute()=0
Virtual method that's overridden in all child methods. Executes the dialog box.
float GetStoredHeight()
Returns the stored height. -1 if no height has been stored.
Definition: finaleframework.cpp:23432
float GetWidth()
Returns the current width of the window frame.
Definition: finaleframework.cpp:23170
UI class representing a graphical line.
Definition: ff_dialogs.h:1836
FCCtrlListBox * CreateListBox(float x, float y)
Creates and connects a list box control to the window.
Definition: ff_dialogs.h:4132
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:857
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:2595
virtual void CloseWindow()=0
Closes the window. Functionality is provided by the child classes.
Definition: ff_dialogs.h:689
bool GetPointsMeasurement()
Returns if the measurements and positioning is in points or in a system-native unit.
Definition: ff_dialogs.h:1340
FCCtrlSwitcher * CreateSwitcher(float x, float y)
Creates and connects a page switcher control to the window.
Definition: ff_dialogs.h:4186
void SetWidth(float newwidth)
Changes the width of the window frame.
Definition: finaleframework.cpp:23137
bool IsVisible()
Returns true if the window is visible.
Definition: finaleframework.cpp:23043
FCCtrlUpDown * AddUpDown(twobyte id)
Links a up/down object to the dialog resource.
Definition: ff_dialogs.h:3851
void GetText(FCString *pString)
Gets the node's text and copies it to a FCString object.
Definition: ff_dialogs.h:2883
bool GetHorizontal()
Returns the line style to horizontal or vertical. This is only used for programmatically created line...
Definition: ff_dialogs.h:1881
bool GetCheck()
Returns the check state of the row.
Definition: ff_dialogs.h:2339
Class for modeless and modal dialogs that are visually designed as a resource. This class is also a p...
Definition: ff_dialogs.h:3691
MEASUREMENTUNITS
Constants for Finale's standard measurement units.
Definition: ff_base.h:212
virtual void HandleUnselect()
Called every time nothing is selected.
Definition: ff_dialogs.h:2588
FCCtrlTree * CreateTree(float x, float y)
Creates and connects a tree view control to the window.
Definition: ff_dialogs.h:4174
HANDLE _GetItemHandle()
For internal use only!
Definition: ff_dialogs.h:2978
static void DebugOutBool(const char *pszPrefixText, bool state)
Static method that outputs a line for debugging purposes. The boolean state appears afterwards as eit...
Definition: finaleframework.cpp:390
virtual void Repaint()
Force a visual update of the control.
Definition: ff_dialogs.h:1450
void Activate()
Activates the window and sets it in user focus.
Definition: finaleframework.cpp:23380
void SetMaximumResizeWidth(int width)
Sets the maximum resize width for resizable dialogs/windows.
Definition: ff_dialogs.h:902
void _WinPostRestorePosition()
For internal use only! On Windows, a position restore has to be made after InitWindow() ...
Definition: ff_dialogs.h:1200
bool WindowExists()
Returns true if the window exists in the user interface.
Definition: finaleframework.cpp:22961
void SetMeasurement(float value, twobyte unit)
Sets the string to an EVPU measurement value, formatted to a specific unit.
Definition: finaleframework.cpp:1902
EXECMODAL_RETURNS
The return codes for the ExecuteModal() method.
Definition: ff_dialogs.h:3704
FCTreeNode * GetItemAt(int index)
Overridden version of GetItemAt().
Definition: ff_dialogs.h:2858
UI class that handles a control with static text.
Definition: ff_dialogs.h:1893
void SetWindowTitle(FCString *pString)
Sets the caption of the window title.
Definition: ff_dialogs.h:106
void SetFileName(FCString *pString)
Sets the initial file name string. The string contains the full path to the file name.
Definition: ff_dialogs.h:116
bool ConnectMeasurementEdit(FCCtrlEdit *pControl, double min, double max)
Connects a measurement edit field to an up/down control.
Definition: ff_dialogs.h:1802
void SetHeight(float newheight)
Changes the height of the window frame.
Definition: finaleframework.cpp:23185
void _WinSetInitWindowCalled(bool value)
For internal use only - Windows only!
Definition: ff_dialogs.h:1187
Class to display the operating system's modal folder browser dialog box.
Definition: ff_dialogs.h:290
bool IsModal()
Returns true if the dialog currently is running in a modal state.
Definition: ff_dialogs.h:740
FCCtrlTree * AddTree(twobyte id)
Links a data list to the dialog resource.
Definition: ff_dialogs.h:3862
int GetControlID()
Returns the control ID for the control.
Definition: ff_dialogs.h:1467
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:2497
void CopyFrom(FCStrings *pSourceStrings)
Recreates a string collection. Any existing strings in the collection are cleared. NULL entries in the string table are also supported.
Definition: ff_basecollection.h:1123
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:3072
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:23511
FCCtrlRadioButtonGroup * CreateRadioButtonGroup(float x, float y, int no_of_items)
Creates and connects a radio button group to the window.
Definition: ff_dialogs.h:4157
Base class for all other dialog/window classes.
Definition: ff_dialogs.h:576
Class that provides storage for text. This is to achieve platform-transparent text handling...
Definition: ff_base.h:1473
void SetDefaultFilter(int index)
Sets the 0-based default filter.
Definition: ff_dialogs.h:95
Class that handles edit controls.
Definition: ff_dialogs.h:1924
bool SetSelectedLast()
Selects the last item in the list box.
Definition: ff_dialogs.h:2749
void GetFolderPath(FCString *pString)
Gets the folder path.
Definition: ff_dialogs.h:346
FCTreeNode * GetRootItemAt(int index)
Returns the root node at the 0-based index position.
Definition: ff_dialogs.h:3262
Definition: ff_dialogs.h:692
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:1901
bool GetUseFinaleAPI() const
Returns if the native Finale API for folder browsing should be used on Finale 25 and above...
Definition: ff_dialogs.h:375
virtual void SetBold(bool state)
Sets the boldface appearance for the control.
Definition: finaleframework.cpp:22437
FCCtrlListBox * AddListBox(twobyte id)
Links a list box object to the dialog resource.
Definition: ff_dialogs.h:3826
bool GetMultiSelect() const
Returns the state controlling if the dialog will allow multiple selections.
Definition: ff_dialogs.h:226
virtual void CloseButtonPressed()
Virtual method that is called when a control with a "Close" action is pressed by the user...
Definition: ff_dialogs.h:983
void SetRestorePositionOnlyData(float x, float y)
Sets the restore position, but with no size.
Definition: finaleframework.cpp:23403
virtual void HandleSelectChange(int lineindex)
Called every time there's a user row selection change on any of the items.
Definition: ff_dialogs.h:2575
bool GetUseCheckboxes() const
Returns if checkboxes should be used for the data list.
Definition: ff_dialogs.h:2488
float GetClientWidth()
Returns the current width of the window client area.
Definition: finaleframework.cpp:23264
FCCtrlButton * CreateCancelButton()
Creates a "Cancel" push button, with default positioning and appearance/behaviour.
Definition: ff_dialogs.h:4048
float GetStoredX()
Returns the stored horizonal position, for use in the restore feature.
Definition: finaleframework.cpp:23414
Definition: ff_dialogs.h:698
void GetFileName(FCString *pString)
Copies the file name to a FCString object.
Definition: ff_dialogs.h:153
FCCtrlEdit * GetConnectedEdit()
Returns the connected edit control (if any).
Definition: ff_dialogs.h:1756
FCCtrlButton * AddButton(twobyte id)
Links a button object to the dialog resource.
Definition: ff_dialogs.h:3831
FCCtrlDataList * AddDataList(twobyte id)
Links a tree view to the dialog resource.
Definition: ff_dialogs.h:3856
float GetMeasurementEfix(_ENUMCODE(MEASUREMENTUNITS) _LUACODE(twobyte) measurementunit)
Gets the measurement value in EFIXes from the edit field.
Definition: ff_dialogs.h:1997
Collection class for FCString class objects.
Definition: ff_basecollection.h:924
FCFileSaveAsDialog(FCUI *pUI)
The constructor.
Definition: ff_dialogs.h:269
__FCUserWindow * GetParent()
Returns the parent window object.
Definition: ff_dialogs.h:3737
Class to display the operating system's "Save File As" modal dialog box.
Definition: ff_dialogs.h:263
void SetText(FCString *pText)
Sets the text for the node. This method will also visually update the node.
Definition: ff_dialogs.h:2868
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:2021
FCDataListRow()
The constructor.
Definition: ff_dialogs.h:2328
FCCtrlLine * CreateHorizontalLine(float x, float y, float width)
Creates and connects a horizontal line control to the window.
Definition: ff_dialogs.h:4082
FCCtrlTree(twobyte id)
The constructor.
Definition: ff_dialogs.h:3044
FCTreeNode * GetParentNode()
Returns the tree node's owner object.
Definition: ff_dialogs.h:2944
FCString * GetTextPtr()
Returns the direct pointer to the text object.
Definition: ff_dialogs.h:2890
virtual bool GetEnable()
Returns the enable/grayed state of the control (if user input should be allowed or not)...
Definition: ff_dialogs.h:1862
virtual void HandleDataListSelect(FCCtrlDataList *pControl, int lineindex)
Virtual handler method for when FCCtrlDataList selection state changes. Overwrite to provide function...
Definition: ff_dialogs.h:1051
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:2057
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:236
void MoveAbsolute(float x, float y)
Moves the control in absolute coordinates.
Definition: finaleframework.cpp:22693
void Add(__FCBase *pNewItem)
Adds an element to the end of the collection.
Definition: finaleframework.cpp:12756
A class that represents one row of data in a FCCtrlDataList UI control.
Definition: ff_dialogs.h:2310
void GetInitFolder(FCString *pString)
Copies the init folder to a FCString object.
Definition: ff_dialogs.h:163
virtual void HandleTimer(twobyte timerID)
Virtual handler method that is called on timer events. Overwrite in child classes.
Definition: ff_dialogs.h:1065
void AppendCString(const char *pOtherString)
Appends a C-style string to the string.
Definition: finaleframework.cpp:1636
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:1013
virtual void DebugDump()
Outputs the class data/information for debugging purposes.
Definition: ff_dialogs.h:2992
bool ConnectIntegerEdit(FCCtrlEdit *pControl, int min, int max)
Connects an integer edit field to an up/down control.
Definition: ff_dialogs.h:1776
FCCtrlComboBox(twobyte id)
The constructor.
Definition: ff_dialogs.h:2261
Definition: ff_dialogs.h:695
FCCtrlSlider * AddSlider(twobyte id)
Links a slider object to the dialog resource.
Definition: ff_dialogs.h:3836
void StorePosition(bool storesize)
Stores the window position for use with RestorePosition.
Definition: finaleframework.cpp:23438
FCCtrlDataList * GetConnectedList()
Returns the connected FCCtrlDataList control.
Definition: ff_dialogs.h:2345
void ExtractFileExtension()
Removes everything except the file extension part of a file name.
Definition: ff_base.h:2097
bool EndBufferControlMovement()
Resizes/moves all buffered control movements made since the StartBufferControlMovement call...
Definition: finaleframework.cpp:23611
bool RestorePosition()
Restores the window's position and size (if the size is stored).
Definition: finaleframework.cpp:23462
Class representing a single node item in a FCCtrlTree control.
Definition: ff_dialogs.h:2816
float GetClientHeight()
Returns the current height of the window client area, excluding the title bar.
Definition: finaleframework.cpp:23318
bool IsWindowshade()
Returns true if the window is in window shade mode.
Definition: ff_dialogs.h:1150
float GetHeight()
Returns the current height of the window frame.
Definition: finaleframework.cpp:23218
void AddInt(int intvalue)
Appends an integer number to the collection.
Definition: ff_basecollection.h:373
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:2395
A UI class that handles an Up/Down control. The control has 2 arrows, one pointing up and one down...
Definition: ff_dialogs.h:1681
virtual bool Execute()
Displays the dialog box to the user.
Definition: finaleframework.cpp:26770
void SetInteger(int i)
Sets the string to an integer.
Definition: finaleframework.cpp:1875
void SetMaximumResizeHeight(int height)
Sets the maximum resize height for resizable dialogs/windows.
Definition: ff_dialogs.h:916
virtual void HandleDoubleClick()
Called every time there's a double-click inside the data list.
Definition: ff_dialogs.h:2605
Base class for all collection classes. A collection is a storage that can store multiple objects of s...
Definition: ff_basecollection.h:24
FCCtrlButton * CreateButton(float x, float y)
Creates and connects a push button to the window.
Definition: ff_dialogs.h:4006
A tree UI control.
Definition: ff_dialogs.h:3020
float GetStoredY()
Returns the stored vertical position, for use in the restore feature.
Definition: finaleframework.cpp:23420
FCCtrlLine * CreateVerticalLine(float x, float y, float height)
Creates and connects a vertical line control to the window.
Definition: ff_dialogs.h:4102
bool IsEmpty()
Returns true if the string is empty.
Definition: ff_base.h:2461
virtual const char * ClassName()
Returns the name of the class, for diagnostic purposes. This method MUST be overwritten in each child...
Definition: ff_dialogs.h:1310
A class that supports programmatically created controls (that are not defined in resource files)...
Definition: ff_dialogs.h:3896
virtual bool Execute()
Displays the dialog box to the user.
Definition: finaleframework.cpp:26664