Esempio n. 1
0
BOOL CMenuButton::OnClicked()
{
	SetCurrentEntry(GetCurrentEntry());

	// let the parent handle the message the usual way
	return FALSE;
}
DialogNodeExecutionStatus ResponseHandlerDialogNode::Execute (
    IDialogManager& dialogManager,
    DialogNodeExecutionContext& executionContext)
{
    for (EntryCollectionType::SizeType count = 0;
            count < entries_.Count ();
            ++count)
    {
        ResponseHandlerDialogNodeEntry* entry = entries_[count];

        if (!entry->RequirementIsFulfilled ())
            continue;

        ID entryID = ID (count);

        SetCurrentEntry (entryID);

        executionContext = DialogNodeExecutionContext (
                               entryID,
                               entry->GetMessages (),
                               entry->Action,
                               nullptr);

        dialogManager.TreatResponseProvider (*this);

        return DialogNodeExecutionStatus::Waiting;
    }

    return DialogNodeExecutionStatus::Over;
}
Esempio n. 3
0
INT_PTR CMenuButton::AddEntry(const CString& sEntry)
{
	INT_PTR ret = m_sEntries.Add(sEntry);
	m_btnMenu.AppendMenu(MF_STRING | MF_BYCOMMAND, m_sEntries.GetCount(), sEntry);
	if (m_sEntries.GetCount() == 2)
		m_bMenuIsActive = FALSE;

	if (ret == 0)
		SetCurrentEntry(ret);
	return ret;
}
Esempio n. 4
0
INT_PTR CMenuButton::AddEntry(const CString& sEntry, UINT uIcon /*= 0U*/)
{
	INT_PTR ret = m_sEntries.Add(sEntry);
	m_btnMenu.AppendMenuIcon(m_sEntries.GetCount(), sEntry, uIcon);
	if (m_sEntries.GetCount() == 2)
		m_bMenuIsActive = FALSE;

	if (ret == 0)
		SetCurrentEntry(ret);
	return ret;
}
void            LogStream::AppendToEntry(const string entry, const char* txt, ...){
    SetCurrentEntry(entry);
    
    char buffer[512];

    va_list args;
    va_start( args, txt );
    vsnprintf( buffer, 512, txt, args );
    va_end( args );

    Append(string(buffer));
}
void            LogStream::Clear(const string entry){
  SetCurrentEntry(entry);
  Clear(); 
}
void            LogStream::SetOStream(const string entry, std::ostream & ostr){
  SetCurrentEntry(entry);
  SetOStream(ostr);
}
void            LogStream::SetDeltaIndent(const string entry, int dIndent){
  SetCurrentEntry(entry);
  SetDeltaIndent(dIndent);
}
void            LogStream::SetAutoPrint(const string entry, bool bAuto){
  SetCurrentEntry(entry);
  SetAutoPrint(bAuto);
}
void            LogStream::Print(const string entry, int nbLines){
  SetCurrentEntry(entry);
  Print(nbLines);
}
string          LogStream::GetLastString(const string entry){
  SetCurrentEntry(entry);
  return GetLastString();
}
StringVector&   LogStream::GetStrings(const string entry, int nbLines){
  SetCurrentEntry(entry);
  return GetStrings(nbLines);  
}
void            LogStream::AppendToEntry(const string entry, const string data){
  SetCurrentEntry(entry);
  Append(data); 
}