-
Notifications
You must be signed in to change notification settings - Fork 3
/
RibbonModifier.bas
41 lines (32 loc) · 1.04 KB
/
RibbonModifier.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Attribute VB_Name = "RibbonModifier"
Option Explicit
Option Private Module
Private Type THelper
UIRibbon As IRibbonUI
RibbonMonitorer As RibbonUIUpdater
RibbonUpdater As RibbonUIUpdater
End Type
Private this As THelper
Public Sub InitializeUIAddin(ByRef ribbon As IRibbonUI) 'Callback for customUI.onLoad
Set this.RibbonMonitorer = New RibbonUIUpdater
Set this.RibbonUpdater = New RibbonUIUpdater
Set this.UIRibbon = ribbon
End Sub
Public Sub SyncUIControls()
UIRibbon.Invalidate
End Sub
Public Property Get UIRibbon() As IRibbonUI
Set UIRibbon = this.UIRibbon
End Property
Public Property Get RibbonUpdater() As RibbonUIUpdater
If this.RibbonUpdater Is Nothing Then
Set this.RibbonUpdater = New RibbonUIUpdater
End If
Set RibbonUpdater = this.RibbonUpdater
End Property
Public Property Let RibbonUpdater(ByVal newUpdater As RibbonUIUpdater)
Set RibbonUpdater = newUpdater
End Property
Public Property Get RibbonMonitorer() As RibbonUIUpdater
RibbonMonitorer = this.RibbonMonitorer
End Property