Class Builder
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class Builder : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
Builder
- Implements
- Inherited Members
Constructors
Builder(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Builder(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Builder(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Builder(CreationData data)
Parameters
dataCreationData
Builder(BuilderHandle)
protected Builder(BuilderHandle handle)
Parameters
handleBuilderHandle
Fields
CurrentObjectPropertyDefinition
public static readonly Property<Object?, Builder> CurrentObjectPropertyDefinition
Field Value
ScopePropertyDefinition
public static readonly Property<BuilderScope, Builder> ScopePropertyDefinition
Field Value
TranslationDomainPropertyDefinition
public static readonly Property<string?, Builder> TranslationDomainPropertyDefinition
Field Value
Properties
CurrentObject
public Object? CurrentObject { get; set; }
Property Value
Scope
public BuilderScope Scope { get; set; }
Property Value
TranslationDomain
public string? TranslationDomain { get; set; }
Property Value
Methods
AddFromFile(string)
public bool AddFromFile(string filename)
Parameters
filenamestring
Returns
AddFromResource(string)
public bool AddFromResource(string resourcePath)
Parameters
resourcePathstring
Returns
AddFromString(string, nint)
public bool AddFromString(string buffer, nint length)
Parameters
Returns
AddObjectsFromFile(string, string[])
public bool AddObjectsFromFile(string filename, string[] objectIds)
Parameters
Returns
AddObjectsFromResource(string, string[])
public bool AddObjectsFromResource(string resourcePath, string[] objectIds)
Parameters
Returns
AddObjectsFromString(string, nint, string[])
public bool AddObjectsFromString(string buffer, nint length, string[] objectIds)
Parameters
Returns
CreateClosure(string, BuilderClosureFlags, Object?)
public Closure? CreateClosure(string functionName, BuilderClosureFlags flags, Object? @object)
Parameters
functionNamestringflagsBuilderClosureFlagsobjectObject
Returns
ExposeObject(string, Object)
public void ExposeObject(string name, Object @object)
Parameters
ExtendWithTemplate(Object, Type, string, nint)
public bool ExtendWithTemplate(Object @object, Type templateType, string buffer, nint length)
Parameters
Returns
GetCurrentObject()
public Object? GetCurrentObject()
Returns
GetGType()
public static Type GetGType()
Returns
GetObject(string)
public Object? GetObject(string name)
Parameters
namestring
Returns
GetScope()
public BuilderScope GetScope()
Returns
GetTranslationDomain()
public string? GetTranslationDomain()
Returns
GetTypeFromName(string)
public Type GetTypeFromName(string typeName)
Parameters
typeNamestring
Returns
New()
public static Builder New()
Returns
NewFromFile(string)
public static Builder NewFromFile(string filename)
Parameters
filenamestring
Returns
NewFromPointer(nint, bool)
Creates a new managed Builder instance for a given pointer.
public static Builder NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewFromResource(string)
public static Builder NewFromResource(string resourcePath)
Parameters
resourcePathstring
Returns
NewFromString(string, nint)
public static Builder NewFromString(string @string, nint length)
Parameters
Returns
NewWithProperties(ConstructArgument[])
Creates a new Builder and sets the properties specified by the construct arguments.
public static Builder NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
SetCurrentObject(Object?)
public void SetCurrentObject(Object? currentObject)
Parameters
currentObjectObject
SetScope(BuilderScope?)
public void SetScope(BuilderScope? scope)
Parameters
scopeBuilderScope
SetTranslationDomain(string?)
public void SetTranslationDomain(string? domain)
Parameters
domainstring
ValueFromString(ParamSpec, string, out Value)
public bool ValueFromString(ParamSpec pspec, string @string, out Value value)
Parameters
Returns
ValueFromStringType(Type, string, out Value)
public bool ValueFromStringType(Type type, string @string, out Value value)