Class AnsiComponentFactory
IComponentFactory<TInputRecord> implementation for the pure ANSI Driver.
public class AnsiComponentFactory : ComponentFactoryImpl<char>, IComponentFactory<char>, IComponentFactory
- Inheritance
-
AnsiComponentFactory
- Implements
- Inherited Members
Remarks
The ANSI driver demonstrates proper use of Terminal.Gui.Drivers.AnsiResponseParser for querying terminal capabilities via ANSI escape sequences. It showcases:
- Sending ANSI queries (e.g., CSI_ReportWindowSizeInChars)
- Registering response expectations with Terminal.Gui.Drivers.AnsiResponseParser
- Handling responses asynchronously through callbacks
- Coordinating between input (response parsing) and output (query sending)
Constructors
- AnsiComponentFactory(AnsiInput?, IOutput?, ISizeMonitor?)
Creates a new ANSIComponentFactory with optional output capture.
Methods
- CreateInput()
Create IInput<TInputRecord> class for the current driver implementation i.e. the class responsible for reading user input from the console.
- CreateInputProcessor(ConcurrentQueue<char>, ITimeProvider?)
Creates the InputProcessorImpl<TInputRecord> class for the current driver implementation i.e. the class responsible for translating raw console input into Terminal.Gui common event Key and Mouse.
- CreateOutput()
Create the IOutput class for the current driver implementation i.e. the class responsible for rendering IOutputBuffer into the console.
- CreateSizeMonitor(IOutput, IOutputBuffer)
Creates ISizeMonitor class for the current driver implementation i.e. the class responsible for reporting the current size of the terminal.
- GetDriverName()
Gets the name of the driver this factory creates components for. This is the single source of truth for driver identification.