📄 ctext.cls
字号:
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
Persistable = 0 'NotPersistable
DataBindingBehavior = 0 'vbNone
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
Attribute VB_Name = "CText"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Option Explicit
Implements CGElement
Private m_ID_Text As Integer
Private m_z As Double
Private m_x As Double
Private m_Height As Double
Private m_Wide As Double
Private m_Content As String
Private m_geColor As Integer
Public Property Let ID_Text(ByVal vData As Integer)
m_ID_Text = vData
End Property
Public Property Get ID_Text() As Integer
ID_Text = m_ID_Text
End Property
Public Property Let geColor(ByVal vData As Integer)
m_geColor = vData
End Property
Public Property Get geColor() As Integer
geColor = m_geColor
End Property
Public Property Let Content(ByVal vData As String)
m_Content = vData
End Property
Public Property Get Content() As String
Content = m_Content
End Property
Public Property Let Wide(ByVal vData As Double)
m_Wide = vData
End Property
Public Property Get Wide() As Double
Wide = m_Wide
End Property
Public Property Let Height(ByVal vData As Double)
m_Height = vData
End Property
Public Property Get Height() As Double
Height = m_Height
End Property
Public Property Let x(ByVal vData As Double)
m_x = vData
End Property
Public Property Get x() As Double
x = m_x
End Property
Public Property Let z(ByVal vData As Double)
m_z = vData
End Property
Public Property Get z() As Double
z = m_z
End Property
Private Sub CGElement_Draw(eDrawMode As GEDrawMode)
Dim oldForeColor As Long
oldForeColor = DrawMain.picDraw.ForeColor
With DrawMain
With .picDraw
Select Case eDrawMode
Case edmNormal
.ForeColor = RGB(0, 0, 0)
Case edmSelect
.ForeColor = RGB(255, 0, 0)
Case edmDelete
.ForeColor = RGB(255, 255, 255)
End Select
.CurrentX = m_z
.CurrentY = m_x
End With
End With
DrawMain.picDraw.DrawMode = 13
DrawMain.picDraw.Print m_Content
DrawMain.picDraw.ForeColor = oldForeColor
End Sub
Private Sub CGElement_GetBox(pBox As Box)
Dim newBox As New Box
With newBox
.minZ = m_z
.minX = m_x - m_Height
.maxZ = m_z + m_Wide
.maxX = m_x
End With
Set pBox = newBox
End Sub
Private Property Get CGElement_ID() As Integer
End Property
Private Property Let CGElement_ID(ByVal RHS As Integer)
End Property
Private Sub CGElement_Mirror(Pos1 As Position, Pos2 As Position)
End Sub
Private Sub CGElement_Move(basePos As Position, desPos As Position)
End Sub
Private Function CGElement_Pick(pos As Position, PickRadius As Double) As Boolean
Dim pBox As New Box
Call CGElement_GetBox(pBox)
If InBox(pBox, pos) Then
CGElement_Pick = True
Else
CGElement_Pick = False
End If
End Function
Private Sub CGElement_Rotate(basePos As Position, Angle As Double)
End Sub
Private Sub CGElement_ScaleTransform(scalez As Double, scalex As Double)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -