Skip to content

T_WolfCurses_Form_Form_1

Maxwolf edited this page Jan 2, 2016 · 2 revisions

Form(TData) Class

Forms are attached to windows.

Inheritance Hierarchy

System.Object
  System.Collections.Generic.Comparer(Form(TData))
    WolfCurses.Form.Form(TData)
      WolfCurses.Form.Input.InputForm(T)
Namespace: WolfCurses.Form
Assembly: WolfCurses (in WolfCurses.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public abstract class Form<TData> : Comparer<Form<TData>>, 
	IComparable<Form<TData>>, IEquatable<Form<TData>>, 
	IEqualityComparer<Form<TData>>, IForm, IComparer<IForm>, 
	IComparable<IForm>, ITick
where TData : new(), WindowData

Type Parameters

 

TData
UserData type.
  The Form(TData) type exposes the following members.

Constructors

 

Name Description
Protected method Form(TData) Initializes a new instance of the Form(TData) class. This constructor will be used by the other one
  Back to Top

Properties

 

Name Description
Public property AllowInput Determines if this dialog state is allowed to receive any input at all, even empty line returns. This is useful for preventing the player from leaving a particular dialog until you are ready or finished processing some data.
Public property InputFillsBuffer Determines if user input is currently allowed to be typed and filled into the input buffer.
Protected property ParentWindow Current parent game Windows which this state is binded to and is doing work on behalf of.
Public property UserData Intended to be overridden in abstract class by generics to provide method to return object that contains all the data for parent game Windows.
  Back to Top

Methods

 

Name Description
Protected method ClearForm Removes the current state from the active game Windows.
Public method Compare(Form(TData), Form(TData)) When overridden in a derived class, performs a comparison of two objects of the same type and returns a value indicating whether one object is less than, equal to, or greater than the other. (Overrides Comparer(T).Compare(T, T).)
Public method Compare(IForm, IForm) Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Public method CompareTo(Form(TData)) Compares the current object with another object of the same type.
Public method CompareTo(IForm) Compares the current object with another object of the same type.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Equals(Form(TData)) Indicates whether the current object is equal to another object of the same type.
Public method Equals(Form(TData), Form(TData)) Determines whether the specified objects are equal.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode() Serves as a hash function for a particular type. (Overrides Object.GetHashCode().)
Public method GetHashCode(Form(TData)) Returns a hash code for the specified object.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method OnFormActivate Fired when the window is activated and or refocused after another window was removed from being on-top of it. Useful for re-initializing form data after something like a random event runs which might kill people or alter the vehicle inventory.
Public method OnFormPostCreate Fired after the state has been completely attached to the simulation letting the state know it can browse the user data and other properties below it.
Public method OnInputBufferReturned Fired when the game Windows current state is not null and input buffer does not match any known command.
Public method OnRenderForm Returns a text only representation of the current game Windows state. Could be a statement, information, question waiting input, etc.
Public method OnTick Called when the simulation is ticked by underlying operating system, game engine, or potato. Each of these system ticks is called at unpredictable rates, however if not a system tick that means the simulation has processed enough of them to fire off event for fixed interval that is set in the core simulation by constant in milliseconds.
Public method SetForm Creates and adds the specified type of state to currently active game Windows.
Public method ToString Returns a string that represents the current object. (Overrides Object.ToString().)
  Back to Top

Extension Methods

 

Name Description
Public Extension Method ToDescriptionAttribute Attempts to grab description attribute from any object. (Defined by AttributeExtensions.)
  Back to Top

Version Information

Wolf Curses

Supported in: 0.1

See Also

Reference

WolfCurses.Form Namespace

Clone this wiki locally