Newer
Older
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
module Fox
#
# The four-way splitter is a layout manager which manages
# four children like four panes in a window.
# You can use a four-way splitter for example in a CAD program
# where you may want to maintain three orthographic views, and
# one oblique view of a model.
# The four-way splitter allows interactive repartitioning of the
# panes by means of moving the central splitter bars.
# When the four-way splitter is itself resized, each child is
# proportionally resized, maintaining the same split-percentage.
#
# === Events
#
# The following messages are sent by FX4Splitter to its target:
#
# +SEL_LEFTBUTTONPRESS+:: sent when the left mouse button goes down; the message data is an FXEvent instance.
# +SEL_LEFTBUTTONRELEASE+:: sent when the left mouse button goes up; the message data is an FXEvent instance.
# +SEL_COMMAND+:: sent at the end of a resize operation, to signal that the resize is complete
# +SEL_CHANGED+:: sent continuously while a resize operation is occurring
#
# === Splitter options
#
# +FOURSPLITTER_TRACKING+:: Track continuously during split
# +FOURSPLITTER_NORMAL+:: Normal mode (no continuous tracking)
#
# === Expansion options
#
# +ExpandNone+:: None expanded
# +ExpandTopLeft+:: Expand top left child
# +ExpandTopRight+:: Expand top right child
# +ExpandBottomLeft+:: Expand bottom left child
# +ExpandBottomRight+:: Expand bottom right child
# +ExpandTop+:: Expand top children
# +ExpandBottom+:: Expand bottom children
# +ExpandLeft+:: Expand left children
# +ExpandRight+:: Expand right children
# +ExpandAll+:: Expand all children
#
# === Message identifiers
#
# +ID_EXPAND_NONE+:: None expanded
# +ID_EXPAND_TOP+:: Expand top left and top right panes
# +ID_EXPAND_BOTTOM+:: Expand bottom left and bottom right panes
# +ID_EXPAND_LEFT+:: Expand leftmost panes
# +ID_EXPAND_RIGHT+:: Expand rightmost panes
# +ID_EXPAND_TOPLEFT+:: Expand top left pane
# +ID_EXPAND_TOPRIGHT+:: Expand top right pane
# +ID_EXPAND_BOTTOMLEFT+:: Expand bottom left pane
# +ID_EXPAND_BOTTOMRIGHT+:: Expand bottom right pane
# +ID_EXPAND_ALL+:: Expand all panes
#
class FX4Splitter < FXComposite
# Horizontal split fraction [Integer]
attr_accessor :hSplit
# Vertical split fraction [Integer]
attr_accessor :vSplit
# Current splitter style, either +FOURSPLITTER_TRACKING+ or +FOURSPLITTER_NORMAL+
attr_accessor :splitterStyle
# Splitter bar width, in pixels [Integer]
attr_accessor :barSize
# Currently expanded child (some combination of the expansion flags, or zero if no panes are expanded)
attr_accessor :expanded
# Top left child window, if any [FXWindow]
attr_reader :topLeft
# Top right child window, if any [FXWindow]
attr_reader :topRight
# Bottom left child window, if any [FXWindow]
attr_reader :bottomLeft
# Bottom right child window, if any [FXWindow]
attr_reader :bottomRight
#
# Return an initialized FX4Splitter instance, initially shown as four unexpanded panes
#
# ==== Parameters:
#
# +p+:: the parent widget for this splitter [FXComposite]
# +opts+:: the options [Integer]
# +x+:: initial x-position [Integer]
# +y+:: initial y-position [Integer]
# +width+:: initial width [Integer]
# +height+:: initial height [Integer]
#
def initialize(p, opts=FOURSPLITTER_NORMAL, x=0, y=0, width=0, height=0) # :yields: theSplitter
end
#
# Return an initialized FX4Splitter instance, initially shown as four unexpanded panes;
# notifies _tgt_ about size changes.
#
# ==== Parameters:
#
# +p+:: the parent widget for this splitter [FXComposite]
# +target+:: message target [FXObject]
# +selector+:: message identifier [Integer]
# +opts+:: the options [Integer]
# +x+:: initial x-position [Integer]
# +y+:: initial y-position [Integer]
# +width+:: initial width [Integer]
# +height+:: initial height [Integer]
#
def initialize(p, tgt, sel, opts=FOURSPLITTER_NORMAL, x=0, y=0, width=0, height=0) # :yields: theSplitter
end
#
# Change horizontal split fraction. The split fraction _s_ is
# an integer value between 0 and 10000 (inclusive), indicating
# how much space to allocate to the leftmost panes. For example,
# to split the panes at 35 percent, use:
#
# fourSplitter.setHSplit(3500)
#
# or just:
#
# fourSplitter.hSplit = 3500
#
def setHSplit(s); end
#
# Return the horizontal split fraction, an integer between 0 and
# 10000 inclusive. See FX4Splitter#setHSplit for more information.
#
def getHSplit(); end
#
# Change vertical split fraction. The split fraction _s_ is
# an integer value between 0 and 10000 (inclusive), indicating
# how much space to allocate to the topmost panes. For example,
# to split the panes at 35 percent, use:
#
# fourSplitter.setVSplit(3500)
#
# or just:
#
# fourSplitter.vSplit = 3500
#
def setVSplit(s); end
#
# Return the vertical split fraction, an integer between 0 and
# 10000 inclusive. See FX4Splitter#setVSplit for more information.
#
def getVSplit(); end
end
end