mirror of
https://github.com/QB64Official/qb64.git
synced 2024-08-22 11:25:08 +00:00
Enables the IDE to accept files via drag/drop (Windows-only).
This commit is contained in:
parent
60d6aa7d27
commit
9a1b8450aa
3 changed files with 21 additions and 1 deletions
|
@ -2237,7 +2237,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_DROPFILES:
|
case WM_DROPFILES:
|
||||||
qb64_custom_event(QB64_EVENT_FILE_DROP,0,0,0,0,0,0,0,0,wParam,NULL);
|
qb64_custom_event(QB64_EVENT_FILE_DROP,0,0,0,0,0,0,0,0,(void*)wParam,NULL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
|
|
|
@ -1275,6 +1275,15 @@ FUNCTION ide2 (ignore)
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
|
IF _TOTALDROPPEDFILES > 0 THEN
|
||||||
|
IF _FILEEXISTS(_DROPPEDFILE$(1)) THEN
|
||||||
|
IdeOpenFile$ = _DROPPEDFILE$(1)
|
||||||
|
_FINISHDROP
|
||||||
|
GOTO ctrlOpen
|
||||||
|
END IF
|
||||||
|
_FINISHDROP
|
||||||
|
END IF
|
||||||
|
|
||||||
'Hover/click (QuickNav)
|
'Hover/click (QuickNav)
|
||||||
IF IdeSystem = 1 AND QuickNavTotal > 0 THEN
|
IF IdeSystem = 1 AND QuickNavTotal > 0 THEN
|
||||||
IF mY = 2 THEN
|
IF mY = 2 THEN
|
||||||
|
@ -7440,6 +7449,14 @@ FUNCTION ideopen$
|
||||||
IF mB THEN change = 1
|
IF mB THEN change = 1
|
||||||
alt = KALT: IF alt <> oldalt THEN change = 1
|
alt = KALT: IF alt <> oldalt THEN change = 1
|
||||||
oldalt = alt
|
oldalt = alt
|
||||||
|
|
||||||
|
IF _TOTALDROPPEDFILES > 0 THEN
|
||||||
|
idetxt(o(1).txt) = _DROPPEDFILE$(1)
|
||||||
|
o(1).v1 = LEN(idetxt(o(1).txt))
|
||||||
|
_FINISHDROP
|
||||||
|
change = 1
|
||||||
|
END IF
|
||||||
|
|
||||||
_LIMIT 100
|
_LIMIT 100
|
||||||
LOOP UNTIL change
|
LOOP UNTIL change
|
||||||
IF alt AND NOT KCTRL THEN idehl = 1 ELSE idehl = 0
|
IF alt AND NOT KCTRL THEN idehl = 1 ELSE idehl = 0
|
||||||
|
|
|
@ -921,6 +921,9 @@ gl_scan_header
|
||||||
'-----------------------QB64 COMPILER ONCE ONLY SETUP CODE ENDS HERE---------------------------------------
|
'-----------------------QB64 COMPILER ONCE ONLY SETUP CODE ENDS HERE---------------------------------------
|
||||||
|
|
||||||
IF NoIDEMode THEN IDE_AutoPosition = 0: GOTO noide
|
IF NoIDEMode THEN IDE_AutoPosition = 0: GOTO noide
|
||||||
|
DIM FileDropEnabled AS _BYTE
|
||||||
|
IF FileDropEnabled = 0 THEN FileDropEnabled = -1: _ACCEPTFILEDROP
|
||||||
|
|
||||||
IF IDE_AutoPosition AND NOT IDE_BypassAutoPosition THEN _SCREENMOVE IDE_LeftPosition, IDE_TopPosition
|
IF IDE_AutoPosition AND NOT IDE_BypassAutoPosition THEN _SCREENMOVE IDE_LeftPosition, IDE_TopPosition
|
||||||
idemode = 1
|
idemode = 1
|
||||||
sendc$ = "" 'no initial message
|
sendc$ = "" 'no initial message
|
||||||
|
|
Loading…
Reference in a new issue