Skip to content

Commit

Permalink
Changed: ToolTips
Browse files Browse the repository at this point in the history
  • Loading branch information
XusinboyBekchanov committed Apr 17, 2022
1 parent 65e54a8 commit 3b923f8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
57 changes: 30 additions & 27 deletions mff/ToolTips.bas
Expand Up @@ -7,25 +7,28 @@
#include once "ToolTips.bi"

Namespace My.Sys.Forms
' #IfNDef __USE_GTK__
' Sub ToolTips.HandleIsAllocated(ByRef Sender As My.Sys.Forms.Control)
' If Sender.Child Then
' With QToolTips(Sender.Child)
'
' End With
' End If
' End Sub
'
' Sub ToolTips.WndProc(ByRef Message As Message)
' End Sub
'
' Sub ToolTips.ProcessMessage(ByRef Message As Message)
' Base.ProcessMessage(Message)
' End Sub
' #EndIf
#ifndef __USE_GTK__
Sub ToolTips.HandleIsAllocated(ByRef Sender As Control)
With QToolTips(@Sender)

End With
End Sub

Sub ToolTips.WndProc(ByRef Message As Message)
End Sub

Sub ToolTips.ProcessMessage(ByRef Message As Message)
Select Case Message.Msg
Case WM_MOUSEMOVE
Message.Result = -1
Return
End Select
Base.ProcessMessage(Message)
End Sub
#endif

Private Operator ToolTips.Cast As My.Sys.ComponentModel.Component Ptr
Return Cast(My.Sys.ComponentModel.Component Ptr, @This)
Private Operator ToolTips.Cast As Control Ptr
Return Cast(Control Ptr, @This)
End Operator

Private Constructor ToolTips
Expand All @@ -35,21 +38,21 @@ Namespace My.Sys.Forms
#ifdef __USE_GTK__
'Widget = gtk_tooltips_new()
#else
' .RegisterClass "ToolTips","tooltips_class32"
' .Style = TTS_ALWAYSTIP Or WS_POPUP
' .ExStyle = WS_EX_TOPMOST
' .ChildProc = @WndProc
' .OnHandleIsAllocated = @HandleIsAllocated
.RegisterClass "ToolTips", "tooltips_class32"
.Style = WS_POPUP
.ExStyle = WS_EX_TOPMOST
.ChildProc = @WndProc
.OnHandleIsAllocated = @HandleIsAllocated
#endif
' .Width = 175
' .Height = 21
' .Child = @This
.Width = 175
.Height = 21
.Child = @This
End With
End Constructor

Private Destructor ToolTips
#ifndef __USE_GTK__
' UnregisterClass "ToolTips",GetModuleHandle(NULL)
UnregisterClass "ToolTips", GetModuleHandle(NULL)
#endif
End Destructor
End Namespace
16 changes: 8 additions & 8 deletions mff/ToolTips.bi
Expand Up @@ -4,20 +4,20 @@
'# Authors: Xusinboy Bekchanov (2018-2019) #
'################################################################################

#include once "Component.bi"
#include once "Control.bi"

Namespace My.Sys.Forms
#define QToolTips(__Ptr__) *Cast(ToolTips Ptr, __Ptr__)

Private Type ToolTips Extends My.Sys.ComponentModel.Component
Private Type ToolTips Extends Control
Private:
' #IfNDef __USE_GTK__
' Declare Static Sub WndProc(ByRef Message As Message)
' Declare Virtual Sub ProcessMessage(ByRef Message As Message)
' Declare Static Sub HandleIsAllocated(ByRef Sender As My.Sys.Forms.Control)
' #EndIf
#ifndef __USE_GTK__
Declare Static Sub WndProc(ByRef Message As Message)
Declare Virtual Sub ProcessMessage(ByRef Message As Message)
Declare Static Sub HandleIsAllocated(ByRef Sender As Control)
#endif
Public:
Declare Operator Cast As My.Sys.ComponentModel.Component Ptr
Declare Operator Cast As Control Ptr
Declare Constructor
Declare Destructor
End Type
Expand Down

0 comments on commit 3b923f8

Please sign in to comment.