@@ -52,7 +52,8 @@ namespace Beefy
5252 AcceptFiles = 0x1000 '0000 ,
5353 NoShow = 0x2000 '0000 ,
5454 NoMouse = 0x4000 '0000 ,
55- Tooltip = 0x8000 '0000
55+ Tooltip = 0x8000 '0000 ,
56+ LogicalCoords = 0x1 '0000 '0000 ,
5657 } ;
5758
5859 [ AllowDuplicates ]
@@ -85,7 +86,7 @@ namespace Beefy
8586 TopRight = 14 ,
8687 Transparent = - 1 ,
8788 VScroll = 7 ,
88- Zoom = 9
89+ Zoom = 9
8990 }
9091
9192 public enum ShowKind
@@ -106,7 +107,7 @@ namespace Beefy
106107
107108 public virtual void Draw ( Graphics g )
108109 {
109-
110+
110111 }
111112
112113 public virtual void PreDraw ( Graphics g )
@@ -177,7 +178,7 @@ namespace Beefy
177178 public float mAlpha = 1.0f ;
178179 public Flags mWindowFlags ;
179180 private bool mMouseVisible ;
180- public bool mHasFocus = false ;
181+ public bool mHasFocus = false ;
181182 public bool mHasClosed ;
182183 public bool mIsDirty = true ;
183184 public BFWindow mParent ;
@@ -204,13 +205,13 @@ namespace Beefy
204205 static NativeDragDropFileDelegate sNativeDragDropFileDelegate ~ delete _;
205206
206207 [ CallingConvention ( . Stdcall ) , CLink ]
207- static extern void* BFApp_CreateWindow ( void * parent , char8 * title , int32 x , int32 y , int32 width , int32 height , int32 windowFlags ) ;
208+ static extern void* BFApp_CreateWindow ( void * parent , char8 * title , int32 x , int32 y , int32 width , int32 height , int64 windowFlags ) ;
208209
209210 [ CallingConvention ( . Stdcall ) , CLink ]
210211 static extern void * BFWindow_GetNativeUnderlying ( void * window ) ;
211212
212213 [ CallingConvention ( . Stdcall ) , CLink ]
213- static extern void BFWindow_SetCallbacks( void * window, void * movedDelegate, void * closeQueryDelegate, void * closedDelegate,
214+ static extern void BFWindow_SetCallbacks( void * window, void * movedDelegate, void * closeQueryDelegate, void * closedDelegate,
214215 void * gotFocusDelegate, void * lostFocusDelegate,
215216 void * keyCharDelegate, void * keyDownDelegate, void * keyUpDelegate, void * hitTestDelegate,
216217 void * mouseMoveDelegate, void * mouseProxyMoveDelegate, void * mouseDownDelegate, void * mouseUpDelegate, void * mouseWheelDelegate, void * mouseLeaveDelegate,
@@ -318,7 +319,7 @@ namespace Beefy
318319 static void Static_NativeKeyCharDelegate ( void * window , char32 c ) { GetBFWindow ( window ) . KeyChar ( c ) ; }
319320 static bool Static_NativeKeyDownDelegate ( void * window , int32 key , int32 isRepeat ) { return GetBFWindow ( window ) . KeyDown ( key , isRepeat ) ; }
320321 static void Static_NativeKeyUpDelegate ( void * window , int32 key ) { GetBFWindow ( window ) . KeyUp ( key ) ; }
321- static int32 Static_NativeHitTestDelegate ( void * window , int32 x , int32 y ) { return ( int32 ) GetBFWindow ( window ) . HitTest ( x , y ) ; }
322+ static int32 Static_NativeHitTestDelegate ( void * window , int32 x , int32 y ) { return ( int32 ) GetBFWindow ( window ) . HitTest ( x , y ) ; }
322323 static void Static_NativeMouseMoveDelegate ( void * window , int32 mouseX , int32 mouseY ) { GetBFWindow ( window ) . MouseMove ( mouseX , mouseY ) ; }
323324 static void Static_NativeMouseProxyMoveDelegate ( void * window , int32 mouseX , int32 mouseY ) { GetBFWindow ( window ) . MouseProxyMove ( mouseX , mouseY ) ; }
324325 static void Static_NativeMouseDownDelegate ( void * window , int32 mouseX , int32 mouseY , int32 btnNum , int32 btnCount ) { GetBFWindow ( window ) . MouseDown ( mouseX , mouseY , btnNum , btnCount ) ; }
@@ -331,7 +332,7 @@ namespace Beefy
331332
332333 public Rect < int32 > ClientRect => . ( mClientX , mClientY , mClientWidth , mClientHeight ) ;
333334 public Rect < int32 > WindowRect => . ( mX , mY , mWindowWidth , mWindowHeight ) ;
334-
335+
335336 public this ( )
336337 {
337338 }
@@ -364,7 +365,7 @@ namespace Beefy
364365 if ( windowFlags . HasFlag ( . NoShow ) )
365366 mVisible = false ;
366367
367- mNativeWindow = BFApp_CreateWindow ( ( parent != null ) ? ( parent . mNativeWindow ) : null , title , ( int32 ) x , ( int32 ) y , ( int32 ) width , ( int32 ) height , ( int32 ) useFlags ) ;
368+ mNativeWindow = BFApp_CreateWindow ( ( parent != null ) ? ( parent . mNativeWindow ) : null , title , ( int32 ) x , ( int32 ) y , ( int32 ) width , ( int32 ) height , ( . ) useFlags ) ;
368369 sWindowDictionary [ ( int ) mNativeWindow ] = this ;
369370
370371 if ( sNativeMovedDelegate == null )
@@ -391,15 +392,15 @@ namespace Beefy
391392 BFWindow_SetCallbacks ( mNativeWindow , sNativeMovedDelegate . GetFuncPtr ( ) , sNativeCloseQueryDelegate . GetFuncPtr ( ) , sNativeClosedDelegate . GetFuncPtr ( ) , sNativeGotFocusDelegate . GetFuncPtr ( ) , sNativeLostFocusDelegate . GetFuncPtr ( ) ,
392393 sNativeKeyCharDelegate . GetFuncPtr ( ) , sNativeKeyDownDelegate . GetFuncPtr ( ) , sNativeKeyUpDelegate . GetFuncPtr ( ) , sNativeHitTestDelegate . GetFuncPtr ( ) ,
393394 sNativeMouseMoveDelegate . GetFuncPtr ( ) , sNativeMouseProxyMoveDelegate . GetFuncPtr ( ) , sNativeMouseDownDelegate . GetFuncPtr ( ) , sNativeMouseUpDelegate . GetFuncPtr ( ) , sNativeMouseWheelDelegate . GetFuncPtr ( ) , sNativeMouseLeaveDelegate . GetFuncPtr ( ) ,
394- sNativeMenuItemSelectedDelegate . GetFuncPtr ( ) , sNativeDragDropFileDelegate . GetFuncPtr ( ) ) ;
395+ sNativeMenuItemSelectedDelegate . GetFuncPtr ( ) , sNativeDragDropFileDelegate . GetFuncPtr ( ) ) ;
395396 BFApp . sApp . mWindows . Add ( this ) ;
396397
397398 mDefaultDrawLayer = new DrawLayer ( this ) ;
398399
399400 if ( windowFlags . HasFlag ( Flags . Menu ) )
400401 {
401402 mSysMenu = new SysMenu ( ) ;
402- mSysMenu . mWindow = this ;
403+ mSysMenu . mWindow = this ;
403404 }
404405 mWindowFlags = windowFlags ;
405406
@@ -445,8 +446,8 @@ namespace Beefy
445446 }
446447
447448 public virtual void Dispose ( )
448- {
449- Close ( true ) ;
449+ {
450+ Close ( true ) ;
450451 }
451452
452453 public virtual int32 CloseQuery ( )
@@ -462,7 +463,7 @@ namespace Beefy
462463 return;
463464 mNativeWindowClosed = true;*/
464465
465- while ( mChildWindows . Count > 0 )
466+ while ( mChildWindows . Count > 0 )
466467 mChildWindows [ mChildWindows . Count - 1 ] . Close ( force ) ;
467468
468469 //for (var childWindow in mChildWindows)
@@ -506,7 +507,7 @@ namespace Beefy
506507 {
507508 // Does checking of mouse coords against all window even when this window has mouse capture,
508509 // helps some dragging scenarios. Gets turned off automatically on mouse up.
509- BFWindow_SetNonExclusiveMouseCapture ( mNativeWindow ) ;
510+ BFWindow_SetNonExclusiveMouseCapture ( mNativeWindow ) ;
510511 }
511512
512513 public bool HasParent ( BFWindow widgetWindow )
@@ -533,7 +534,7 @@ namespace Beefy
533534
534535 if ( mWindowFlags . HasFlag ( Flags . QuitOnClose ) )
535536 BFApp . sApp . Stop ( ) ;
536-
537+
537538 if ( mParent != null )
538539 {
539540 mParent . mChildWindows . Remove ( this ) ;
@@ -562,7 +563,7 @@ namespace Beefy
562563 }
563564
564565 public virtual void Moved ( )
565- {
566+ {
566567 RehupSize ( ) ;
567568 }
568569
@@ -618,7 +619,7 @@ namespace Beefy
618619 public virtual void NativeMenuItemSelected ( void * menu )
619620 {
620621 SysMenu aSysMenu = mSysMenuMap [ ( int ) menu ] ;
621- MenuItemSelected ( aSysMenu ) ;
622+ MenuItemSelected ( aSysMenu ) ;
622623 }
623624
624625 public virtual void DragDropFile ( StringView filePath )
@@ -639,12 +640,12 @@ namespace Beefy
639640 }
640641
641642 public virtual void LostFocus ( BFWindow newFocus )
642- {
643+ {
643644 if ( ! mHasFocus )
644645 return ;
645646 mHasFocus = false ;
646647 if ( mNativeWindow != null )
647- BFWindow_LostFocus ( mNativeWindow , ( newFocus != null ) ? newFocus . mNativeWindow : null ) ;
648+ BFWindow_LostFocus ( mNativeWindow , ( newFocus != null ) ? newFocus . mNativeWindow : null ) ;
648649
649650 //TODO: REMOVE
650651 //Debug.WriteLine("LostFocus {0}", mTitle);
@@ -654,7 +655,7 @@ namespace Beefy
654655 {
655656 return BFWindow_GetDPI ( mNativeWindow ) ;
656657 }
657-
658+
658659 public virtual void KeyChar ( char32 theChar )
659660 {
660661 }
@@ -666,7 +667,7 @@ namespace Beefy
666667
667668 public virtual void KeyUp ( int32 keyCode )
668669 {
669-
670+
670671 }
671672
672673 public virtual HitTestResult HitTest ( int32 x , int32 y )
@@ -703,7 +704,7 @@ namespace Beefy
703704 }
704705
705706 public virtual void Update ( )
706- {
707+ {
707708 }
708709
709710 public virtual void UpdateF ( float updatePct )
@@ -713,7 +714,7 @@ namespace Beefy
713714 }
714715#else
715716 public class BFWindow : BFWindowBase , IStudioClientWindow
716- {
717+ {
717718 //IStudioWidgetWindow mProxy;
718719 public int mClientWidth ;
719720 public int mClientHeight ;
@@ -722,7 +723,7 @@ namespace Beefy
722723 public float mAlpha = 1.0f ;
723724 public bool mVisible = true ;
724725 public Flags mWindowFlags ;
725-
726+
726727 public IPCProxy < IStudioHostWindow > mRemoteWindow ;
727728 public IPCEndpoint < IStudioClientWindow > mStudioClientWindow ;
728729
@@ -816,7 +817,7 @@ namespace Beefy
816817
817818 public virtual void KeyChar ( char32 theChar )
818819 {
819- }
820+ }
820821
821822 public virtual void KeyDown ( int keyCode , int isRepeat )
822823 {
@@ -849,13 +850,13 @@ namespace Beefy
849850 public virtual void MouseLeave ( )
850851 {
851852 }
852-
853+
853854 public virtual void Update ( )
854855 {
855856 }
856857
857858 public override void PreDraw ( Graphics g )
858- {
859+ {
859860 base . PreDraw ( g ) ;
860861 mRemoteWindow . Proxy . RemoteDrawingStarted ( ) ;
861862 }
0 commit comments