Commit eb5abd36 authored by Jeffrey Lee's avatar Jeffrey Lee Committed by ROOL
Browse files

Add "extended scroll request" setting

This adds an extra option to the window properties / window flags
window, to control whether extended scroll requests are delivered to the
window work area. Under the hood, this just toggles bit 1 of the window
extra flags byte.

Version 1.14. Tagged as 'WinEdit-1_14'
parent 32770c2a
......@@ -157,6 +157,7 @@ Hlp3.OPT_REAL:Select this icon for GCOL colours (as opposed to WIMP ones).
Hlp3.OPT_BACKDROP:Select this icon if this is a backdrop window.
Hlp3.OPT_HOTKEYS:Select this icon if this window needs to receive hot keys.
Hlp3.OPT_AUTODRAW:Select this icon if the WIMP can redraw this window automatically.
Hlp3.OPT_EXTSCROLL:Select this icon if you want the window work area to receive Extended Scroll requests.
Hlp3.RAD_OFF:Select this icon if the WIMP should handle scrolling automatically.
Hlp3.RAD_AUTO:Select this icon if the program wants to handle scrolling itself, and the scroll action is to autorepeat.
Hlp3.RAD_DEBOUNCED:Select this icon if the program wants to handle scrolling itself, and the scroll action is not to autorepeat.
......
/* (1.13)
/* (1.14)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 1.13
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 11 Aug 2018
#define Module_MajorVersion_CMHG 1.14
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 May 2020
#define Module_MajorVersion "1.13"
#define Module_Version 113
#define Module_MajorVersion "1.14"
#define Module_Version 114
#define Module_MinorVersion ""
#define Module_Date "11 Aug 2018"
#define Module_Date "09 May 2020"
#define Module_ApplicationDate "11-Aug-18"
#define Module_ApplicationDate "09-May-20"
#define Module_ComponentName "WinEdit"
#define Module_ComponentPath "castle/RiscOS/Utilities/WinEdit"
#define Module_FullVersion "1.13"
#define Module_HelpVersion "1.13 (11 Aug 2018)"
#define Module_LibraryVersionInfo "1:13"
#define Module_FullVersion "1.14"
#define Module_HelpVersion "1.14 (09 May 2020)"
#define Module_LibraryVersionInfo "1:14"
......@@ -63,6 +63,7 @@ static struct
I_WINFLAGS_BUTTYPE, 0, 0,
I_WINFLAGS_BUTTYPE_MENU, 0, 0,
I_WINFLAGS_OK, 0, 0,
I_WINFLAGS_OPT_EXTSCROLL, 0, 0,
/* I_WINFLAGS_CANCEL, 0, 0*/
};
......@@ -217,6 +218,9 @@ static error * get_values (ResourcePtr res)
/* And the button type */
winflags_set_but_display (window, I_WINFLAGS_BUTTYPE, IF_GET_FIELD(TYPE, res->window.workareaflags));
/* Extended scroll option */
ER ( dbox_iconflag (window, I_WINFLAGS_OPT_EXTSCROLL, IF_SELECTED, (res->window.colours.extraFlags & WFE_EXTENDEDSCROLL) ? IF_SELECTED : 0));
return enable_disable ();
}
......@@ -299,6 +303,15 @@ static error * set_values (ResourcePtr res)
IF_SET_FIELD(TYPE, res->window.workareaflags, winflags_get_but_display(window, I_WINFLAGS_BUTTYPE));
/*
* Extended scroll option
*/
if (dbox_getflags(window, I_WINFLAGS_OPT_EXTSCROLL) & IF_SELECTED)
res->window.colours.extraFlags |= WFE_EXTENDEDSCROLL;
else
res->window.colours.extraFlags &= ~WFE_EXTENDEDSCROLL;
/*
* Now if the window is open, we need to delete/recreate it
* to effect the change as far as the window manager is concerned.
......
......@@ -28,13 +28,14 @@
#define I_WINFLAGS_OPT_TOGGLE 16
#define I_WINFLAGS_OPT_HSCROLL 17
#define I_WINFLAGS_OPT_HOTKEYS 18
#define I_WINFLAGS_OPT_AUTODRAW 21
#define I_WINFLAGS_OPT_TITLE 22
#define I_WINFLAGS_OK 23
#define I_WINFLAGS_CANCEL 24
#define I_WINFLAGS_BUTTYPE 26
#define I_WINFLAGS_TITLE 27
#define I_WINFLAGS_BUTTYPE_MENU 28
#define I_WINFLAGS_OPT_AUTODRAW 20
#define I_WINFLAGS_OPT_TITLE 21
#define I_WINFLAGS_OK 22
#define I_WINFLAGS_CANCEL 23
#define I_WINFLAGS_BUTTYPE 25
#define I_WINFLAGS_TITLE 26
#define I_WINFLAGS_BUTTYPE_MENU 27
#define I_WINFLAGS_OPT_EXTSCROLL 28
#define I_GRID_SPACING 1
#define I_GRID_LOCK 2
......
......@@ -37,7 +37,7 @@ typedef struct
scrollBG, /* outer */
scrollFG, /* inner */
focusBG, /* title */
reserved; /* == zero */
extraFlags;
} WindowColoursRec, *WindowColoursPtr;
typedef struct
......@@ -218,7 +218,13 @@ typedef struct
#define WF_OLD_GADGETS (WF_OLD_TITLE | WF_OLD_VSCROLL | WF_OLD_HSCROLL | WF_OLD_NO_CLOSE)
#define WF_NEW_GADGETS (WF_BACK | WF_CLOSE | WF_TITLE | WF_TOGGLE | WF_VSCROLL | WF_RESIZE | WF_HSCROLL)
/*
* Extra window flags (colours byte 7)
*/
#define WFE_24BITCOL BIT(0)
#define WFE_EXTENDEDSCROLL BIT(1)
#define WFE_3DDISABLE BIT(2)
#define WFE_3DENABLE BIT(3)
/*
* Icon flags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment