void Lyrics::SetHighlightFont() // for kHighlightLyrics { wxFont newFont(mKaraokeFontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); mHighlightTextCtrl->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, newFont)); mHighlightTextCtrl->SetStyle(0, mHighlightTextCtrl->GetLastPosition(), wxTextAttr(wxNullColour, wxNullColour, newFont)); }
void InstConsoleWindow::AppendMessage(const wxString& msg, MessageType msgT) { // Prevent some red spam if (msg.Contains("[STDOUT]") || msg.Contains("[ForgeModLoader]")) msgT = MSGT_STDOUT; switch (msgT) { case MSGT_SYSTEM: consoleTextCtrl->SetDefaultStyle( wxTextAttr(settings->GetConsoleSysMsgColor())); break; case MSGT_STDOUT: consoleTextCtrl->SetDefaultStyle( wxTextAttr(settings->GetConsoleStdoutColor())); break; case MSGT_STDERR: consoleTextCtrl->SetDefaultStyle( wxTextAttr(settings->GetConsoleStderrColor())); break; } (*consoleTextCtrl) << msg << "\n"; consoleTextCtrl->SetDefaultStyle(wxTextAttr( wxSystemSettings::GetColour(wxSYS_COLOUR_LISTBOXTEXT))); }
//--------------------------------------------------------- void CINFO_Messages::Add_Line(void) { CSG_Colors c; SetDefaultStyle(wxTextAttr(wxNullColour, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW))); _Add_Text(wxT("\n\n")); c.Set_Ramp( Get_Color_asInt(wxSystemSettings::GetColour(wxSYS_COLOUR_ACTIVECAPTION)), Get_Color_asInt(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)) ); c.Set_Count(100); for(int i=0; i<c.Get_Count(); i++) { SetDefaultStyle(wxTextAttr( Get_Color_asWX(c.Get_Color(c.Get_Count() - 1 - i)), Get_Color_asWX(c.Get_Color(i)) )); _Add_Text(wxT(" ")); } SetDefaultStyle(wxTextAttr(wxNullColour, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW))); }
void CreditsDialog::AddCredit(wxString person,wxString message) { wxFont* heavyFont = new wxFont(10, wxDEFAULT, wxNORMAL, wxBOLD); text_ctrl->SetDefaultStyle(wxTextAttr(wxNullColour,wxNullColour,*heavyFont)); text_ctrl->AppendText(person + _T(": ")); text_ctrl->SetDefaultStyle(wxTextAttr(wxNullColour,wxNullColour,*wxNORMAL_FONT)); text_ctrl->AppendText(message + _T("\n\n")); }
void TextCtrlTestCase::Style() { #ifndef __WXOSX__ delete m_text; // We need wxTE_RICH under windows for style support m_text = new wxTextCtrl(wxTheApp->GetTopWindow(), wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_RICH); // Red text on a white background m_text->SetDefaultStyle(wxTextAttr(*wxRED, *wxWHITE)); CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetTextColour(), *wxRED); CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetBackgroundColour(), *wxWHITE); m_text->AppendText("red on white "); // Red text on a grey background m_text->SetDefaultStyle(wxTextAttr(wxNullColour, *wxLIGHT_GREY)); CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetTextColour(), *wxRED); CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetBackgroundColour(), *wxLIGHT_GREY); m_text->AppendText("red on grey "); // Blue text on a grey background m_text->SetDefaultStyle(wxTextAttr(*wxBLUE)); CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetTextColour(), *wxBLUE); CPPUNIT_ASSERT_EQUAL(m_text->GetDefaultStyle().GetBackgroundColour(), *wxLIGHT_GREY); m_text->AppendText("blue on grey"); // Get getting the style at a specific location wxTextAttr style; // We have to check that styles are supported if(m_text->GetStyle(3, style)) { CPPUNIT_ASSERT_EQUAL(style.GetTextColour(), *wxRED); CPPUNIT_ASSERT_EQUAL(style.GetBackgroundColour(), *wxWHITE); } // And then setting the style if(m_text->SetStyle(15, 18, style)) { m_text->GetStyle(17, style); CPPUNIT_ASSERT_EQUAL(style.GetTextColour(), *wxRED); CPPUNIT_ASSERT_EQUAL(style.GetBackgroundColour(), *wxWHITE); } #endif }
void CLogWindow::OnFontChange(wxCommandEvent& event) { // Update selected font LogFont[LogFont.size() - 1] = DebuggerFont; m_Log->SetStyle(0, m_Log->GetLastPosition(), wxTextAttr(wxNullColour, wxNullColour, LogFont[event.GetSelection()])); m_Log->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, LogFont[event.GetSelection()])); SaveSettings(); }
//------------------------------------------------------------------------------ // void OnTextEnterPressed(wxCommandEvent& event) //------------------------------------------------------------------------------ void ScriptPanel::OnTextEnterPressed(wxCommandEvent& event) { if (event.GetEventObject() == mFileContentsTextCtrl) { mUserModified = true; } else if (event.GetEventObject() == mLineNumberTextCtrl) { #ifdef DEBUG_SCRIPTPANEL_TEXT MessageInterface::ShowMessage ("ScriptPanel::OnTextEnterPressed() mDefBgColor=%ld, mBgColor=%ld\n", mDefBgColor.GetPixel(), mBgColor.GetPixel()); #endif int lineLength = 0; long pos = 0; // unshow old line number if (mOldLineNumber > 0) { lineLength = mFileContentsTextCtrl->GetLineLength(mOldLineNumber-1); pos = mFileContentsTextCtrl->XYToPosition(0, mOldLineNumber-1); #ifdef DEBUG_SCRIPTPANEL_TEXT MessageInterface::ShowMessage ("===> mOldLineNumber=%d, pos=%d\n", mOldLineNumber, pos); #endif mFileContentsTextCtrl-> SetStyle(pos, pos+lineLength, wxTextAttr(wxNullColour, mDefBgColor)); } // show new line number long lineNumber; wxString str = mLineNumberTextCtrl->GetValue(); str.ToLong(&lineNumber); pos = mFileContentsTextCtrl->XYToPosition(0, lineNumber-1); lineLength = mFileContentsTextCtrl->GetLineLength(lineNumber-1); #ifdef DEBUG_SCRIPTPANEL_TEXT MessageInterface::ShowMessage("===> lineNumber=%d, pos=%d\n", lineNumber, pos); #endif // This causes wxEVT_COMMAND_TEXT_UPDATED event generated. // Notice that this event will always be sent when the text controls // contents changes - whether this is due to user input or comes from the // program itself (for example, if SetValue() is called) mFileContentsTextCtrl-> SetStyle(pos, pos+lineLength, wxTextAttr(wxNullColour, mBgColor)); mFileContentsTextCtrl->ShowPosition(pos); mOldLineNumber = lineNumber; } }
void CreditsDialog::AddCredit(wxString person, wxString message) { wxFont heavyFont(10, wxDEFAULT, wxNORMAL, wxBOLD); text_ctrl->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, heavyFont)); text_ctrl->AppendText(person); if (!message.IsEmpty()) { text_ctrl->AppendText(_T(": ")); text_ctrl->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, *wxNORMAL_FONT)); text_ctrl->AppendText(message); } text_ctrl->AppendText(_T("\n\n")); }
DrawSimulator::DrawSimulator () : wxFrame (0, -1, wxT ("Anarch Revolt - Draw Simulator"), wxDefaultPosition, wxSize (320, 200)), m_oDrawnCards (), m_oDrawnVampires (), m_oRemainingCards (), m_oRemainingVampires (), m_pDrawnCardsText (NULL), m_pDrawnVampiresText (NULL), m_pRemainingCardsText (NULL), m_pRemainingVampiresText (NULL) { SetIcon (*g_pIcon); // create sizer wxFlexGridSizer *pGridSizer = new wxFlexGridSizer (2, 5, 5); SetAutoLayout (TRUE); SetSizer (pGridSizer); wxStaticText *pLabel = new wxStaticText (this, -1, wxT ("Uncontrolled region :")); pGridSizer->Add (pLabel); pLabel = new wxStaticText (this, -1, wxT ("Cards in hand :")); pGridSizer->Add (pLabel); m_pDrawnVampiresText = new wxTextCtrl (this, -1, wxT (""), wxDefaultPosition, wxSize (250, 130), wxTE_READONLY | wxTE_MULTILINE); pGridSizer->Add (m_pDrawnVampiresText); m_pDrawnCardsText = new wxTextCtrl (this, -1, wxT (""), wxDefaultPosition, wxSize (250, 130), wxTE_READONLY | wxTE_MULTILINE); pGridSizer->Add (m_pDrawnCardsText); pLabel = new wxStaticText (this, -1, wxT ("Crypt :")); pGridSizer->Add (pLabel); pLabel = new wxStaticText (this, -1, wxT ("Library :")); pGridSizer->Add (pLabel); m_pRemainingVampiresText = new wxTextCtrl (this, -1, wxT (""), wxDefaultPosition, wxSize (250, 130), wxTE_READONLY | wxTE_MULTILINE); m_pRemainingVampiresText->SetDefaultStyle (wxTextAttr (wxColour (100, 100, 100))); pGridSizer->Add (m_pRemainingVampiresText); m_pRemainingCardsText = new wxTextCtrl (this, -1, wxT (""), wxDefaultPosition, wxSize (250, 130), wxTE_READONLY | wxTE_MULTILINE); m_pRemainingCardsText->SetDefaultStyle (wxTextAttr (wxColour (100, 100, 100))); pGridSizer->Add (m_pRemainingCardsText); wxButton *pDrawButton = new wxButton (this, ID_DRAW_BUTTON, wxT ("Redraw")); pGridSizer->Add (pDrawButton); wxButton *pCloseButton = new wxButton (this, ID_CLOSE_BUTTON, wxT ("Close")); pGridSizer->Add (pCloseButton, wxALIGN_RIGHT); pGridSizer->Fit (this); SetSizeHints (GetSize ().GetWidth (), GetSize ().GetHeight (), GetSize ().GetWidth (), GetSize ().GetHeight ()); Draw (); }
void MyFrame::onNewTask(wxCommandEvent& evt){ wxString str (wxDateTime::Now().Format(wxT("[%F %H-%M-%S]"))); NewTaskReq* req = reinterpret_cast<NewTaskReq*>(evt.GetClientData()); str << wxString::Format(wxT(" (TID#%ld) "), req->owner);//->GetId()); //str << *(req->psTaskName); WriteText(str, wxTextAttr(*wxBLUE)); unsigned long TID; if (!startTask(*req->psTaskName, TID)) return; req->TID = TID; req->ready.Post(); WriteText(wxString::Format(wxT("has started a new task (TID#%ld)\n"), TID), wxTextAttr(*wxBLUE)); }
void CliCtrl::AppendMsg(const wxString& msg) { this->SetDefaultStyle(wxTextAttr(cResultFgColour, cResultBgColour)); this->AppendText("\n" + msg); this->AppendCliPrompt(); }
void NetPlayDialog::AddChatMessage(ChatMessageType type, const std::string& msg) { wxColour colour = *wxBLACK; std::string printed_msg = msg; switch (type) { case ChatMessageType::Info: colour = wxColour(0, 150, 150); // cyan break; case ChatMessageType::Error: colour = *wxRED; break; case ChatMessageType::UserIn: colour = wxColour(0, 150, 0); // green printed_msg = "▶ " + msg; break; case ChatMessageType::UserOut: colour = wxColour(100, 100, 100); // grey printed_msg = "◀ " + msg; break; } if (type == ChatMessageType::Info || type == ChatMessageType::Error) printed_msg = "― " + msg + " ―"; m_chat_text->SetDefaultStyle(wxTextAttr(colour)); m_chat_text->AppendText(StrToWxStr(printed_msg + "\n")); }
// 単色で文字列を 追加する void CLogTextCtrl::writeColoredText(const wxString& str, const wxColour& colour) { // 文字列の挿入 BeginStyle(wxTextAttr(colour)); writeLinkableText(str); this->EndAllStyles(); }
void CLogWindow::OnWrapLineCheck(wxCommandEvent& event) { #ifdef __WXGTK__ // Clear the old word wrap state and set the new m_Log->SetWindowStyleFlag(m_Log->GetWindowStyleFlag() ^ (wxTE_WORDWRAP | wxTE_DONTWRAP)); #else wxString Text; // Unfortunately wrapping styles can only be changed dynamically with wxGTK // Notice: To retain the colors when changing word wrapping we need to // loop through every letter with GetStyle and then reapply them letter by letter // Prevent m_Log access while it's being destroyed m_LogAccess = false; UnPopulateBottom(); Text = m_Log->GetValue(); m_Log->Destroy(); if (event.IsChecked()) m_Log = CreateTextCtrl(this, wxID_ANY, wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP); else m_Log = CreateTextCtrl(this, wxID_ANY, wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP); m_Log->SetDefaultStyle(wxTextAttr(*wxWHITE)); m_Log->AppendText(Text); PopulateBottom(); m_LogAccess = true; #endif SaveSettings(); }
//------------------------------------------------------------------------------ // void LoadData() //------------------------------------------------------------------------------ void ScriptPanel::LoadData() { #ifdef DEBUG_SCRIPTPANEL_LOAD MessageInterface::ShowMessage("ScriptPanel::LoadData() entered\n"); #endif wxFile *file = new wxFile(); bool mFileExists = file->Exists(mScriptFilename); if (mFileExists) mFileContentsTextCtrl->LoadFile(mScriptFilename); else mFileContentsTextCtrl->SetValue(""); theSaveAsButton->Enable(true); theSaveButton->Enable(true); GmatAppData::Instance()->GetMainFrame()->SetActiveChildDirty(false); mEditorModified = false; hasFileLoaded = true; mFileContentsTextCtrl->SetDefaultStyle(wxTextAttr(wxNullColour, *wxWHITE)); wxTextAttr defStyle = mFileContentsTextCtrl->GetDefaultStyle(); mDefBgColor = defStyle.GetBackgroundColour(); mOldLastPos = mFileContentsTextCtrl->GetLastPosition(); #ifdef DEBUG_SCRIPTPANEL_LOAD MessageInterface::ShowMessage("ScriptPanel::LoadData() exiting\n"); #endif }
bool MyFrame::startTask(wxString str,unsigned long &TID){ if (!CreateThread(this,str, TID)) return false; if ( vciMailingList[TID]->Run() != wxTHREAD_NO_ERROR ){ wxLogError(wxT("Can't start thread!")); WriteText(wxT("Error starting a new task\n"), wxTextAttr(*wxRED)); } return true; }
void CSpyUserPanel::AddFeedback(const char* pszFeedback) { if (pszFeedback != NULL) { m_pConsoleTextCtrl->SetDefaultStyle(wxTextAttr(*wxRED)); m_pConsoleTextCtrl->AppendText(pszFeedback); } }
void SkypeWindow::Ontimer_messageEventsTrigger(wxTimerEvent& event) { if (SF->messageEvent() && userName.compare(SF->contact_event) == 0) { chat_log->SetDefaultStyle(wxTextAttr(*wxRED)); chat_log->AppendText(wxString(SF->textEvent().c_str(), wxConvUTF8)); SF->allowNewMessageEvent(); } }
void RichTextCtrlTestCase::StyleEvent() { EventCounter stylechanged(m_rich, wxEVT_RICHTEXT_STYLE_CHANGED); m_rich->SetValue("Sometext"); m_rich->SetStyle(0, 8, wxTextAttr(*wxRED, *wxWHITE)); CPPUNIT_ASSERT_EQUAL(1, stylechanged.GetCount()); }
void TApp::Printf(const char* format, ...) { wxString message; va_list marker; va_start(marker, format); message.PrintfV(format, marker); frame->log.text->SetDefaultStyle(wxTextAttr(*wxWHITE)); frame->log.Append(message); }
void Console::logToConsole(const LogMessage& message) { long start = m_textCtrl->GetLastPosition(); m_textCtrl->AppendText(message.string()); m_textCtrl->AppendText("\n"); long end = m_textCtrl->GetLastPosition(); switch (message.level()) { case LLDebug: m_textCtrl->SetStyle(start, end, wxTextAttr(*wxLIGHT_GREY, *wxBLACK)); // SetDefaultStyle doesn't work on OS X / Cocoa break; case LLInfo: m_textCtrl->SetStyle(start, end, wxTextAttr(*wxWHITE, *wxBLACK)); // SetDefaultStyle doesn't work on OS X / Cocoa break; case LLWarn: m_textCtrl->SetStyle(start, end, wxTextAttr(*wxYELLOW, *wxBLACK)); // SetDefaultStyle doesn't work on OS X / Cocoa break; case LLError: m_textCtrl->SetStyle(start, end, wxTextAttr(*wxRED, *wxBLACK)); // SetDefaultStyle doesn't work on OS X / Cocoa break; } }
MaxTextAttr * bmx_wxtextattr_create(MaxColour * colText, MaxColour * colBack, MaxFont * font, wxTextAttrAlignment alignment) { wxTextAttr attr; if (colBack) { if (font) { attr = wxTextAttr(colText->Colour(), colBack->Colour(), font->Font(), alignment); } else { attr = wxTextAttr(colText->Colour(), colBack->Colour(), wxNullFont, alignment); } } else { if (font) { attr = wxTextAttr(colText->Colour(), wxNullColour, font->Font(), alignment); } else { attr = wxTextAttr(colText->Colour(), wxNullColour, wxNullFont, alignment); } } return new MaxTextAttr(attr); }
void HexEditorCtrl::SetStyle( ) { wxString Colour; wxColour Foreground,Background; wxTextAttr Style; //Normal style set if( wxConfig::Get()->Read( _T("ColourHexForeground"), &Colour) ) Foreground.Set( Colour ); else Foreground = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) ; if( wxConfig::Get()->Read( _T("ColourHexBackground"), &Colour) ) Background.Set( Colour ); else Background = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ; Style = wxTextAttr( Foreground, Background, stdfont ); offset_ctrl->SetDefaultStyle( Style ); hex_ctrl->SetDefaultStyle( Style ); wxString cp; wxConfigBase::Get()->Read( _T("CharacterEncoding"), &cp, wxT("DOS OEM") ); text_ctrl->PrepareCodepageTable(cp); text_ctrl->SetDefaultStyle( Style ); //Selection style set if(wxConfig::Get()->Read( _T("ColourHexSelectionForeground"), &Colour) ) Foreground.Set( Colour ); else Foreground = wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ); if( wxConfig::Get()->Read( _T("ColourHexSelectionBackground"), &Colour) ) Background.Set( Colour ); else Background = wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ); Style = wxTextAttr( Foreground, Background, stdfont ); offset_ctrl->SetSelectionStyle( Style ); hex_ctrl->SetSelectionStyle( Style ); text_ctrl->SetSelectionStyle( Style ); }
void CLogWindow::UpdateLog() { if (!m_LogAccess) return; if (!m_Log) return; // m_LogTimer->Stop(); // instead of stopping the timer, let's simply ignore its calls during UpdateLog, // because repeatedly stopping and starting a timer churns memory (and potentially leaks it). m_ignoreLogTimer = true; if (!msgQueue.empty()) { std::lock_guard<std::mutex> lk(m_LogSection); int msgQueueSize = (int)msgQueue.size(); for (int i = 0; i < msgQueueSize; i++) { switch (msgQueue.front().first) { case ERROR_LEVEL: m_Log->SetDefaultStyle(wxTextAttr(*wxRED)); break; case WARNING_LEVEL: m_Log->SetDefaultStyle(wxTextAttr(wxColour(255, 255, 0))); // YELLOW break; case NOTICE_LEVEL: m_Log->SetDefaultStyle(wxTextAttr(*wxGREEN)); break; case INFO_LEVEL: m_Log->SetDefaultStyle(wxTextAttr(*wxCYAN)); break; case DEBUG_LEVEL: m_Log->SetDefaultStyle(wxTextAttr(*wxLIGHT_GREY)); break; default: m_Log->SetDefaultStyle(wxTextAttr(*wxWHITE)); break; } if (msgQueue.front().second.size()) { int j = m_Log->GetLastPosition(); m_Log->AppendText(msgQueue.front().second); // White timestamp m_Log->SetStyle(j, j + 9, wxTextAttr(*wxWHITE)); } msgQueue.pop(); } } // unlock log // m_LogTimer->Start(UPDATETIME); m_ignoreLogTimer = false; }
void Console::logToConsole(const LogLevel level, const wxString& message) { const long start = m_textView->GetLastPosition(); m_textView->AppendText(message); m_textView->AppendText("\n"); const long end = m_textView->GetLastPosition(); switch (level) { case LogLevel_Debug: m_textView->SetStyle(start, end, wxTextAttr(wxColor(128, 128, 128), *wxWHITE)); break; case LogLevel_Info: m_textView->SetStyle(start, end, wxTextAttr(*wxBLACK, *wxWHITE)); break; case LogLevel_Warn: m_textView->SetStyle(start, end, wxTextAttr(wxColor(250, 150, 25), *wxWHITE)); break; case LogLevel_Error: m_textView->SetStyle(start, end, wxTextAttr(wxColor(250, 30, 60), *wxWHITE)); break; } }
void SkypeWindow::Onchat_sendTextEnter(wxCommandEvent& event) { std::string text = std::string((chat_send->GetValue()).mb_str()); std::string aux; aux = "me: "+ text + "\n"; chat_log->SetDefaultStyle(wxTextAttr(*wxBLUE)); chat_log->AppendText(wxString(aux.c_str(), wxConvUTF8)); SF->sendText(userName.c_str(), text); chat_send->Clear(); }
void TApp::Errorf(const char* format, ...) { wxString message; va_list marker; va_start(marker, format); message.PrintfV(format, marker); frame->log.text->SetDefaultStyle(wxTextAttr(*wxRED)); frame->log.Append(message); if (frame->GetMenuBar() && !frame->IsChecked(Id::ViewInfoLog)) message += " (info log might have more details)"; frame->SetStatusText(message, 0); }
LogWindow::LogWindow(agi::Context *c) : wxDialog(c->parent, -1, _("Log window"), wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX | wxRESIZE_BORDER) { wxTextCtrl *text_ctrl = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxSize(700,300), wxTE_MULTILINE|wxTE_READONLY); text_ctrl->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, wxFont(8, wxMODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL))); wxSizer *sizer = new wxBoxSizer(wxVERTICAL); sizer->Add(text_ctrl, wxSizerFlags(1).Expand().Border()); sizer->Add(new wxButton(this, wxID_OK), wxSizerFlags(0).Border().Right()); SetSizerAndFit(sizer); agi::log::log->Subscribe(emit_log = new EmitLog(text_ctrl)); }
wxTextCtrl* CLogWindow::CreateTextCtrl(wxPanel* parent, wxWindowID id, long Style) { wxTextCtrl* TC = new wxTextCtrl(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, Style); #ifdef __APPLE__ TC->SetBackgroundColour(*wxLIGHT_GREY); #else TC->SetBackgroundColour(*wxBLACK); #endif if (m_FontChoice && m_FontChoice->GetSelection() < (int)LogFont.size() && m_FontChoice->GetSelection() >= 0) TC->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, LogFont[m_FontChoice->GetSelection()])); return TC; }
void CSpyUserPanel::OnSpyConsoleCommandEnter( wxCommandEvent& /*event*/ ) { wxString command = m_pConsoleInputTextCtrl->GetValue(); if (command.Len() > 0) { m_pConsoleTextCtrl->SetDefaultStyle(wxTextAttr(*wxBLACK)); m_pConsoleTextCtrl->AppendText(command + _T("\n")); m_pConsoleInputTextCtrl->Clear(); SendCommand(command); SendCommand("cd"); m_historyCommand.push_back(command.ToStdString()); m_uCurSelectHistoryIndex = m_historyCommand.size(); } }