DayZ 1.24
Loading...
Searching...
No Matches
ScriptConsoleOutputTab Class Reference
Inheritance diagram for ScriptConsoleOutputTab:
[legend]
Collaboration diagram for ScriptConsoleOutputTab:
[legend]

Protected Member Functions

void ScriptConsoleOutputTab (Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
 
void ~ScriptConsoleOutputTab ()
 
override bool OnClick (Widget w, int x, int y, int button)
 
override bool OnChange (Widget w, int x, int y, bool finished)
 
void Clear (bool clearFile=false)
 
void Add (string message, bool isReload=false)
 
void ReloadOutput ()
 

Protected Attributes

TextListboxWidget m_ClientLogListbox
 
ButtonWidget m_ClientLogClearButton
 
CheckBoxWidget m_ClientLogScrollCheckbox
 

Additional Inherited Members

- Private Member Functions inherited from ScriptConsoleTabBase
void ScriptConsoleTabBase (Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
 
void Init (int id)
 
int GetID ()
 
Widget GetRoot ()
 
bool IsSelected ()
 
void Select (bool select, ScriptConsoleTabBase selectedHandler)
 
void OnSelected ()
 
void Show (bool show, ScriptConsoleTabBase selectedHandler)
 
Widget GetButton ()
 
void Update (float timeslice)
 
bool OnChange (Widget w, int x, int y, bool finished)
 
bool OnClick (Widget w, int x, int y, int button)
 
bool OnItemSelected (Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
 
bool OnKeyDown (Widget w, int x, int y, int key)
 
bool OnDoubleClick (Widget w, int x, int y, int button)
 
void OnRPCEx (int rpc_type, ParamsReadContext ctx)
 
bool OnMouseButtonDown (Widget w, int x, int y, int button)
 
bool OnKeyPress (Widget w, int x, int y, int key)
 
void AddItemToClipboard (TextListboxWidget text_listbox_widget)
 
- Private Attributes inherited from ScriptConsoleTabBase
int m_Id
 
bool m_IsSelected
 
Widget m_ParentRoot
 
Widget m_Root
 
Widget m_Button
 
ScriptConsole m_ScriptConsole
 
ScriptConsoleTabBase m_Parent
 
PluginConfigDebugProfile m_ConfigDebugProfile
 
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
 

Detailed Description

Definition at line 1 of file ScriptConsoleOutputTab.c.

Constructor & Destructor Documentation

◆ ScriptConsoleOutputTab()

void ScriptConsoleOutputTab::ScriptConsoleOutputTab ( Widget root,
ScriptConsole console,
Widget button,
ScriptConsoleTabBase parent = null )
inlineprotected

Definition at line 7 of file ScriptConsoleOutputTab.c.

8 {
9 m_ClientLogListbox = TextListboxWidget.Cast(root.FindAnyWidget("TextListbox"));
10 m_ClientLogClearButton = ButtonWidget.Cast(root.FindAnyWidget("ButtonClear"));
11 m_ClientLogScrollCheckbox = CheckBoxWidget.Cast(root.FindAnyWidget("CheckBoxAutoScroll"));
13 }
TextListboxWidget m_ClientLogListbox
CheckBoxWidget m_ClientLogScrollCheckbox

References m_ClientLogClearButton, m_ClientLogListbox, m_ClientLogScrollCheckbox, and ReloadOutput().

◆ ~ScriptConsoleOutputTab()

void ScriptConsoleOutputTab::~ScriptConsoleOutputTab ( )
inlineprotected

Definition at line 15 of file ScriptConsoleOutputTab.c.

16 {
17 }

Member Function Documentation

◆ Add()

void ScriptConsoleOutputTab::Add ( string message,
bool isReload = false )
inlineprotected

Definition at line 45 of file ScriptConsoleOutputTab.c.

46 {
48 {
50
51 if (m_ClientLogScrollCheckbox.IsChecked())
52 m_ClientLogListbox.EnsureVisible(m_ClientLogListbox.GetNumItems());
53 }
54 }
string String(string s)
Helper for passing string expression to functions with void parameter. Example: Print(String("Hello "...
Definition EnScript.c:338

References m_ClientLogListbox, m_ClientLogScrollCheckbox, and String().

Referenced by ReloadOutput().

◆ Clear()

void ScriptConsoleOutputTab::Clear ( bool clearFile = false)
inlineprotected

Definition at line 38 of file ScriptConsoleOutputTab.c.

39 {
40 if (clearFile)
42 m_ClientLogListbox.ClearItems();
43 }
Definition Debug.c:14
static void ClearLogs()
Definition Debug.c:638

References Debug::ClearLogs(), and m_ClientLogListbox.

Referenced by OnClick(), and ReloadOutput().

◆ OnChange()

override bool ScriptConsoleOutputTab::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprotected

Definition at line 31 of file ScriptConsoleOutputTab.c.

32 {
33 super.OnChange(w, x, y, finished);
34 return false;
35 }
Icon x
Icon y

References x, and y.

◆ OnClick()

override bool ScriptConsoleOutputTab::OnClick ( Widget w,
int x,
int y,
int button )
inlineprotected

Definition at line 19 of file ScriptConsoleOutputTab.c.

20 {
21 super.OnClick(w, x, y, button);
22
24 {
25 Clear(true);
26 return true;
27 }
28 return false;
29 }
void Clear(bool clearFile=false)

References Clear(), m_ClientLogClearButton, x, and y.

◆ ReloadOutput()

void ScriptConsoleOutputTab::ReloadOutput ( )
inlineprotected

Definition at line 56 of file ScriptConsoleOutputTab.c.

57 {
58 Clear();
60
61 if (file_index)
62 {
63 string line_content;
64 while (FGets(file_index, line_content) != -1)
65 Add(line_content, true);
66
68 }
69 }
static string GetFileName()
Definition Debug.c:651
void Add(string message, bool isReload=false)
FileMode
Definition EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.

References Add(), Clear(), CloseFile(), FGets(), Debug::GetFileName(), and OpenFile().

Referenced by ScriptConsoleOutputTab().

Member Data Documentation

◆ m_ClientLogClearButton

ButtonWidget ScriptConsoleOutputTab::m_ClientLogClearButton
protected

Definition at line 4 of file ScriptConsoleOutputTab.c.

Referenced by OnClick(), and ScriptConsoleOutputTab().

◆ m_ClientLogListbox

TextListboxWidget ScriptConsoleOutputTab::m_ClientLogListbox
protected

Definition at line 3 of file ScriptConsoleOutputTab.c.

Referenced by Add(), Clear(), and ScriptConsoleOutputTab().

◆ m_ClientLogScrollCheckbox

CheckBoxWidget ScriptConsoleOutputTab::m_ClientLogScrollCheckbox
protected

Definition at line 5 of file ScriptConsoleOutputTab.c.

Referenced by Add(), and ScriptConsoleOutputTab().


The documentation for this class was generated from the following file: