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

XInterface.GUIListBoxBase


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
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
// ====================================================================
//  Class:  UT2K4UI.GUIListBoxBase
//
//  The GUIListBoxBase is a wrapper for a GUIList and it's ScrollBar
//
//  Written by Joe Wilcox
//  (c) 2002, Epic Games, Inc.  All Rights Reserved
// ====================================================================

class GUIListBoxBase extends GUIMultiComponent
        Native;

// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)
// (cpptext)

// Styles
var()           string              SelectedStyleName;      // For propagating selected style to the list
var()           string              SectionStyleName;       // For propagating section style to the list
var()           string              OutlineStyleName;       // For propagating outline styles to the list

var()           string              DefaultListClass;
var automated GUIScrollBarBase      MyScrollBar;
var() editconst                     GUIListBase         MyList;
var()           bool                bVisibleWhenEmpty;      // List box is visible when empty.
var()           bool                bSorted;
var()           bool                bInitializeList;        // Propagated to list

function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
    local bool bTemp;

    // Delay propagation until InitBaseList
    bTemp = PropagateVisibility;
    PropagateVisibility = False;

    Super.InitComponent(MyController, MyOwner);

    PropagateVisibility = bTemp;
}

function InitBaseList(GUIListBase LocalList)
{
    MyList = LocalList;

    LocalList.bNeverScale = True;
    LocalList.StyleName = StyleName;
    LocalList.bVisibleWhenEmpty = bVisibleWhenEmpty;
    LocalList.MyScrollBar = MyScrollBar;
    LocalList.bInitializeList = bInitializeList;
    LocalList.bSorted = bSorted;
    LocalList.FontScale = FontScale;

    MyScrollBar.bTabStop = false;
    MyScrollBar.SetList(LocalList);

    SetVisibility(bVisible);
    SetHint(Hint);
}

function SetHint(string NewHint)
{
    local int i;

    Super.SetHint(NewHint);

    for (i=0;i<Controls.Length;i++)
        Controls[i].SetHint(NewHint);
}

function InternalOnCreateComponent(GUIComponent NewComp, GUIComponent Sender)
{
    if (GUIListBase(NewComp) != None)
    {
        GUIListBase(NewComp).bInitializeList = bInitializeList;
        if (StyleName != "")
            NewComp.StyleName = StyleName;
        if (SelectedStyleName != "")
            GUIListBase(NewComp).SelectedStyleName = SelectedStyleName;
        if (SectionStyleName != "")
            GUIListBase(NewComp).SectionStyleName = SectionStyleName;
        if (OutlineStyleName != "")
            GUIListBase(NewComp).OutlineStyleName = OutlineStyleName;
    }
}

function SetFriendlyLabel( GUILabel NewLabel )
{
    Super.SetFriendlyLabel(NewLabel);

    if ( MyList != None )
        MyList.SetFriendlyLabel(NewLabel);

    if ( MyScrollBar != None )
        MyScrollBar.SetFriendlyLabel(NewLabel);
}

defaultproperties
{
     SectionStyleName="ListSection"
     Begin Object Class=GUIVertScrollBar Name=TheScrollbar
         bVisible=False
         OnPreDraw=TheScrollbar.GripPreDraw
     End Object
     MyScrollBar=GUIVertScrollBar'XInterface.GUIListBoxBase.TheScrollbar'

     bInitializeList=True
     PropagateVisibility=True
     OnCreateComponent=GUIListBoxBase.InternalOnCreateComponent
     FontScale=FNS_Small
     StyleName="NoBackground"
     bAcceptsInput=True
     Begin Object Class=GUIToolTip Name=GUIListBoxBaseToolTip
     End Object
     ToolTip=GUIToolTip'XInterface.GUIListBoxBase.GUIListBoxBaseToolTip'

}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Mon 23/10/2006 20:30:36.000 - Creation time: Wed 7/2/2007 19:16:40.953 - Created with UnCodeX