Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

XInterface.GUISplitter


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
// ====================================================================
//  Class:  UT2K4UI.GUISplitter
//
//	GUISplitters allow the user to size two other controls (usually Panels)
//
//  Written by Jack Porter
//	Updated by Ron Prestenback
//  (c) 2002, Epic Games, Inc.  All Rights Reserved
// ====================================================================
class GUISplitter extends GUIPanel
	native;

cpptext
{
		void PreDraw(UCanvas* Canvas);
		void Draw(UCanvas* Canvas);
		UBOOL MouseMove(INT XDelta, INT YDelta);
		UBOOL MousePressed(UBOOL IsRepeat);
        UBOOL MouseReleased();
		UBOOL MouseHover();
		void SplitterUpdatePositions();
}

enum EGUISplitterType
{
	SPLIT_Vertical,
	SPLIT_Horizontal,
};

var()  EGUISplitterType  SplitOrientation;
var()  float             SplitPosition;			// 0.0 - 1.0
var()  bool              bFixedSplitter;		// Can splitter be moved?
var()  bool              bDrawSplitter;			// Draw the actual splitter bar
var()  float             SplitAreaSize;			// size of splitter thing

var()  string            DefaultPanels[2];		// Names of the default panels
var()  GUIComponent      Panels[2];				// Quick Reference
var()  float             MaxPercentage;			// How big can any 1 panel get

delegate OnReleaseSplitter(GUIComponent Sender, float NewPosition);	// Notification that finished resizing splitter

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
	Super.Initcomponent(MyController, MyOwner);

    if (DefaultPanels[0]!="")
	{
		Panels[0] = AddComponent(DefaultPanels[0], DefaultPanels[1] != "");
		if (DefaultPanels[1]!="")
			Panels[1] = Addcomponent(DefaultPanels[1]);
    }
}

event GUIComponent AppendComponent(GUIComponent NewComp, optional bool SkipRemap)
{
    OnCreateComponent(NewComp, Self);
    Controls[Controls.Length] = NewComp;

    NewComp.InitComponent(Controller, Self);
	NewComp.bBoundToParent = true;
    NewComp.bScaleToParent = true;

    if (!SkipRemap)
	    RemapComponents();
    return NewComp;

}

native function SplitterUpdatePositions();

defaultproperties
{
	StyleName="SquareButton"
	SplitOrientation=SPLIT_Vertical
	bCaptureTabs=False
	bNeverFocus=True
	bTabStop=False
	bAcceptsInput=True
	SplitPosition=0.5
	SplitAreaSize=8
	bDrawSplitter=True
    MaxPercentage=0.0
    bRequiresStyle=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:36:28.000 - Creation time: Do 14.8.2014 09:58:40.268 - Created with UnCodeX