BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Properties | List of all members
BrawlLib.BrawlManagerLib.BrawlSplitter Class Reference
Inheritance diagram for BrawlLib.BrawlManagerLib.BrawlSplitter:

Public Member Functions

 BrawlSplitter ()
 

Protected Member Functions

override void OnPaint (PaintEventArgs e)
 

Properties

Button Button [get]
 
Control ControlToHide [get, set]
 
Color SeparatorColorDark [get, set]
 
Color SeparatorColorLight [get, set]
 
double MaxProportion [get, set]
 
int ButtonLength [get, set]
 
bool AllowResizing [get, set]
 

Constructor & Destructor Documentation

◆ BrawlSplitter()

BrawlLib.BrawlManagerLib.BrawlSplitter.BrawlSplitter ( )
inline
45 {
46 SeparatorColorDark = SystemColors.ControlDark;
47 SeparatorColorLight = SystemColors.ControlLightLight;
48 Height = 11;
49 MaxProportion = 0.5;
50 ButtonLength = 64;
51 AllowResizing = true;
52
53 Button = new Button
54 {
55 Cursor = Cursors.Default,
56 FlatStyle = FlatStyle.Popup
57 };
58 Controls.Add(Button);
59
60 MouseEnter += BrawlSplitter_MouseEnter;
61
62 Resize += BrawlSplitter_Resize;
63 Button.Click += Button_Click;
64 Button.Paint += Button_Paint;
65 }
Color SeparatorColorDark
Definition: BrawlSplitter.cs:20
bool AllowResizing
Definition: BrawlSplitter.cs:42
Color SeparatorColorLight
Definition: BrawlSplitter.cs:25
Button Button
Definition: BrawlSplitter.cs:10
double MaxProportion
Definition: BrawlSplitter.cs:30
int ButtonLength
Definition: BrawlSplitter.cs:35

Member Function Documentation

◆ OnPaint()

override void BrawlLib.BrawlManagerLib.BrawlSplitter.OnPaint ( PaintEventArgs  e)
inlineprotected
198 {
199 base.OnPaint(e);
200
201 Pen pen = new Pen(SeparatorColorDark, 1);
202 Pen pen2 = new Pen(SeparatorColorLight, 1);
203 if (Width > Height)
204 {
205 // wide
206 int middle = Height / 2;
207 e.Graphics.DrawLine(pen, 0, middle, Width, middle);
208 e.Graphics.DrawLine(pen2, 0, middle - 1, Width, middle - 1);
209 }
210 else if (Width < Height)
211 {
212 // tall
213 int middle = Width / 2;
214 e.Graphics.DrawLine(pen, middle, 0, middle, Height);
215 e.Graphics.DrawLine(pen2, middle - 1, 0, middle - 1, Height);
216 }
217 }

Property Documentation

◆ AllowResizing

bool BrawlLib.BrawlManagerLib.BrawlSplitter.AllowResizing
getset
42{ get; set; }

◆ Button

Button BrawlLib.BrawlManagerLib.BrawlSplitter.Button
get
10{ get; private set; }

◆ ButtonLength

int BrawlLib.BrawlManagerLib.BrawlSplitter.ButtonLength
getset
35{ get; set; }

◆ ControlToHide

Control BrawlLib.BrawlManagerLib.BrawlSplitter.ControlToHide
getset
15{ get; set; }

◆ MaxProportion

double BrawlLib.BrawlManagerLib.BrawlSplitter.MaxProportion
getset
30{ get; set; }

◆ SeparatorColorDark

Color BrawlLib.BrawlManagerLib.BrawlSplitter.SeparatorColorDark
getset
20{ get; set; }

◆ SeparatorColorLight

Color BrawlLib.BrawlManagerLib.BrawlSplitter.SeparatorColorLight
getset
25{ get; set; }

The documentation for this class was generated from the following file: