DDraceNetwork Docs
CMapSettingsBackend::CContext Class Reference

#include <editor_server_settings.h>

Collaboration diagram for CMapSettingsBackend::CContext:
[legend]

Public Member Functions

bool CommandIsValid () const
 
int CurrentArg () const
 
const char * CurrentArgName () const
 
float CurrentArgPos () const
 
size_t CurrentArgOffset () const
 
const char * CurrentArgValue () const
 
const std::vector< SPossibleValueMatch > & PossibleMatches () const
 
bool HasError () const
 
size_t ErrorOffset () const
 
const char * Error () const
 
int ArgCount () const
 
const SCurrentSettingArgArg (int Index) const
 
const std::shared_ptr< IMapSetting > & Setting () const
 
CLineInputLineInput () const
 
void SetFontSize (float FontSize)
 
int CommentOffset () const
 
int CheckCollision (ECollisionCheckResult &Result) const
 
int CheckCollision (const std::vector< CEditorMapSetting > &vSettings, ECollisionCheckResult &Result) const
 
int CheckCollision (const char *pInputString, const std::vector< CEditorMapSetting > &vSettings, ECollisionCheckResult &Result) const
 
void Update ()
 
void UpdateFromString (const char *pStr)
 
bool UpdateCursor (bool Force=false)
 
void Reset ()
 
void GetCommandHelpText (char *pStr, int Length) const
 
bool Valid () const
 
void ColorArguments (std::vector< STextColorSplit > &vColorSplits) const
 

Public Attributes

bool m_AllowUnknownCommands
 
SEditBoxDropdownContext m_DropdownContext
 
int m_CurrentCompletionIndex
 

Private Member Functions

 CContext (CMapSettingsBackend *pMaster, CLineInput *pLineinput)
 
void ClearError ()
 
EValidationResult ValidateArg (int Index, const char *pArg)
 
void UpdatePossibleMatches ()
 
void ParseArgs (const char *pLineInputStr, const char *pStr)
 
bool OnInput (const IInput::CEvent &Event)
 
const char * InputString () const
 
void UpdateCompositionString ()
 
template<int N>
void FormatDisplayValue (const char *pValue, char(&aOut)[N])
 

Private Attributes

std::shared_ptr< IMapSettingm_pCurrentSetting
 
std::vector< SCurrentSettingArgm_vCurrentArgs
 
int m_CursorArgIndex
 
std::vector< SPossibleValueMatchm_vPossibleMatches
 
size_t m_LastCursorOffset
 
CLineInputm_pLineInput
 
char m_aCommand [128]
 
SCommandParseError m_Error
 
int m_CommentOffset
 
CMapSettingsBackendm_pBackend
 
std::string m_CompositionStringBuffer
 
float m_FontSize
 

Static Private Attributes

static const ColorRGBA ms_ArgumentStringColor = ColorRGBA(84 / 255.0f, 1.0f, 1.0f, 1.0f)
 
static const ColorRGBA ms_ArgumentNumberColor = ColorRGBA(0.1f, 0.9f, 0.05f, 1.0f)
 
static const ColorRGBA ms_ArgumentUnknownColor = ColorRGBA(0.6f, 0.6f, 0.6f, 1.0f)
 
static const ColorRGBA ms_CommentColor = ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f)
 
static const ColorRGBA ms_ErrorColor = ColorRGBA(240 / 255.0f, 70 / 255.0f, 70 / 255.0f, 1.0f)
 

Friends

class CMapSettingsBackend
 

Constructor & Destructor Documentation

◆ CContext()

CMapSettingsBackend::CContext::CContext ( CMapSettingsBackend pMaster,
CLineInput pLineinput 
)
inlineprivate

Member Function Documentation

◆ Arg()

const SCurrentSettingArg & CMapSettingsBackend::CContext::Arg ( int  Index) const
inline

◆ ArgCount()

int CMapSettingsBackend::CContext::ArgCount ( ) const
inline

◆ CheckCollision() [1/3]

int CMapSettingsBackend::CContext::CheckCollision ( const char *  pInputString,
const std::vector< CEditorMapSetting > &  vSettings,
ECollisionCheckResult Result 
) const

◆ CheckCollision() [2/3]

int CMapSettingsBackend::CContext::CheckCollision ( const std::vector< CEditorMapSetting > &  vSettings,
ECollisionCheckResult Result 
) const

◆ CheckCollision() [3/3]

int CMapSettingsBackend::CContext::CheckCollision ( ECollisionCheckResult Result) const

◆ ClearError()

void CMapSettingsBackend::CContext::ClearError ( )
private

◆ ColorArguments()

void CMapSettingsBackend::CContext::ColorArguments ( std::vector< STextColorSplit > &  vColorSplits) const

◆ CommandIsValid()

bool CMapSettingsBackend::CContext::CommandIsValid ( ) const
inline

◆ CommentOffset()

int CMapSettingsBackend::CContext::CommentOffset ( ) const
inline

◆ CurrentArg()

int CMapSettingsBackend::CContext::CurrentArg ( ) const
inline

◆ CurrentArgName()

const char * CMapSettingsBackend::CContext::CurrentArgName ( ) const
inline

◆ CurrentArgOffset()

size_t CMapSettingsBackend::CContext::CurrentArgOffset ( ) const
inline

◆ CurrentArgPos()

float CMapSettingsBackend::CContext::CurrentArgPos ( ) const
inline

◆ CurrentArgValue()

const char * CMapSettingsBackend::CContext::CurrentArgValue ( ) const
inline

◆ Error()

const char * CMapSettingsBackend::CContext::Error ( ) const
inline

◆ ErrorOffset()

size_t CMapSettingsBackend::CContext::ErrorOffset ( ) const
inline

◆ FormatDisplayValue()

template<int N>
void CMapSettingsBackend::CContext::FormatDisplayValue ( const char *  pValue,
char(&)  aOut[N] 
)
private

◆ GetCommandHelpText()

void CMapSettingsBackend::CContext::GetCommandHelpText ( char *  pStr,
int  Length 
) const

◆ HasError()

bool CMapSettingsBackend::CContext::HasError ( ) const
inline

◆ InputString()

const char * CMapSettingsBackend::CContext::InputString ( ) const
private

◆ LineInput()

CLineInput * CMapSettingsBackend::CContext::LineInput ( ) const
inline

◆ OnInput()

bool CMapSettingsBackend::CContext::OnInput ( const IInput::CEvent Event)
private

◆ ParseArgs()

void CMapSettingsBackend::CContext::ParseArgs ( const char *  pLineInputStr,
const char *  pStr 
)
private

◆ PossibleMatches()

const std::vector< SPossibleValueMatch > & CMapSettingsBackend::CContext::PossibleMatches ( ) const
inline

◆ Reset()

void CMapSettingsBackend::CContext::Reset ( )

◆ SetFontSize()

void CMapSettingsBackend::CContext::SetFontSize ( float  FontSize)
inline

◆ Setting()

const std::shared_ptr< IMapSetting > & CMapSettingsBackend::CContext::Setting ( ) const
inline

◆ Update()

void CMapSettingsBackend::CContext::Update ( )

◆ UpdateCompositionString()

void CMapSettingsBackend::CContext::UpdateCompositionString ( )
private

◆ UpdateCursor()

bool CMapSettingsBackend::CContext::UpdateCursor ( bool  Force = false)

◆ UpdateFromString()

void CMapSettingsBackend::CContext::UpdateFromString ( const char *  pStr)

◆ UpdatePossibleMatches()

void CMapSettingsBackend::CContext::UpdatePossibleMatches ( )
private

◆ Valid()

bool CMapSettingsBackend::CContext::Valid ( ) const

◆ ValidateArg()

EValidationResult CMapSettingsBackend::CContext::ValidateArg ( int  Index,
const char *  pArg 
)
private

Friends And Related Function Documentation

◆ CMapSettingsBackend

friend class CMapSettingsBackend
friend

Member Data Documentation

◆ m_aCommand

char CMapSettingsBackend::CContext::m_aCommand[128]
private

◆ m_AllowUnknownCommands

bool CMapSettingsBackend::CContext::m_AllowUnknownCommands

◆ m_CommentOffset

int CMapSettingsBackend::CContext::m_CommentOffset
private

◆ m_CompositionStringBuffer

std::string CMapSettingsBackend::CContext::m_CompositionStringBuffer
private

◆ m_CurrentCompletionIndex

int CMapSettingsBackend::CContext::m_CurrentCompletionIndex

◆ m_CursorArgIndex

int CMapSettingsBackend::CContext::m_CursorArgIndex
private

◆ m_DropdownContext

SEditBoxDropdownContext CMapSettingsBackend::CContext::m_DropdownContext

◆ m_Error

SCommandParseError CMapSettingsBackend::CContext::m_Error
private

◆ m_FontSize

float CMapSettingsBackend::CContext::m_FontSize
private

◆ m_LastCursorOffset

size_t CMapSettingsBackend::CContext::m_LastCursorOffset
private

◆ m_pBackend

CMapSettingsBackend* CMapSettingsBackend::CContext::m_pBackend
private

◆ m_pCurrentSetting

std::shared_ptr<IMapSetting> CMapSettingsBackend::CContext::m_pCurrentSetting
private

◆ m_pLineInput

CLineInput* CMapSettingsBackend::CContext::m_pLineInput
private

◆ m_vCurrentArgs

std::vector<SCurrentSettingArg> CMapSettingsBackend::CContext::m_vCurrentArgs
private

◆ m_vPossibleMatches

std::vector<SPossibleValueMatch> CMapSettingsBackend::CContext::m_vPossibleMatches
private

◆ ms_ArgumentNumberColor

const ColorRGBA CMapSettingsBackend::CContext::ms_ArgumentNumberColor = ColorRGBA(0.1f, 0.9f, 0.05f, 1.0f)
staticprivate

◆ ms_ArgumentStringColor

const ColorRGBA CMapSettingsBackend::CContext::ms_ArgumentStringColor = ColorRGBA(84 / 255.0f, 1.0f, 1.0f, 1.0f)
staticprivate

◆ ms_ArgumentUnknownColor

const ColorRGBA CMapSettingsBackend::CContext::ms_ArgumentUnknownColor = ColorRGBA(0.6f, 0.6f, 0.6f, 1.0f)
staticprivate

◆ ms_CommentColor

const ColorRGBA CMapSettingsBackend::CContext::ms_CommentColor = ColorRGBA(0.5f, 0.5f, 0.5f, 1.0f)
staticprivate

◆ ms_ErrorColor

const ColorRGBA CMapSettingsBackend::CContext::ms_ErrorColor = ColorRGBA(240 / 255.0f, 70 / 255.0f, 70 / 255.0f, 1.0f)
staticprivate

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