wx_debugging_console_panel.cpp

Go to the documentation of this file.
00001 #ifndef WX_DEBUGGING_CONSOLE_PANEL_IMPLEMENTATION_FILE
00002 #define WX_DEBUGGING_CONSOLE_PANEL_IMPLEMENTATION_FILE
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : wx_debugging_console_panel                                        *
00007 *  Author : Aaron Buchanan                                                    *
00008 *  Author : Chris Koeritz                                                     *
00009 *                                                                             *
00010 *******************************************************************************
00011 * Copyright (c) 1995-$now By Author.  This program is free software; you can  *
00012 * redistribute it and/or modify it under the terms of the GNU General Public  *
00013 * License as published by the Free Software Foundation; either version 2 of   *
00014 * the License or (at your option) any later version.  This is online at:      *
00015 *     http://www.fsf.org/copyleft/gpl.html                                    *
00016 * Please send any updates to: fred@gruntose.com                               *
00017 \*****************************************************************************/
00018 
00019 #include "wx_debugging_console_panel.h"
00020 
00021 #include <basis/byte_array.h>
00022 #include <basis/convert_utf.h>
00023 #include <basis/istring.h>
00024 
00025 #undef GetClassInfo
00026 #include <wx/sizer.h>
00027 
00029 wx_debugging_console_panel::wx_debugging_console_panel(wxWindow *parent, int file_size)
00030 : wxPanel(parent),
00031   wx_debugging_base(_text, 2 * MEGABYTE, file_size),
00032   _text()
00033 {
00034   wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
00035 
00036   _text.Create(this, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxHSCROLL);
00037 #ifdef __WIN32__
00038   wxFont fixedFont(10, wxMODERN, wxNORMAL, wxBOLD);
00039 #else
00040   wxFont fixedFont(12, wxMODERN, wxNORMAL, wxBOLD);
00041 #endif
00042   _text.SetFont(fixedFont);
00043   topsizer->Add(&_text, 1,            // make vertically stretchable
00044                 wxEXPAND |    // make horizontally stretchable
00045                 wxALL,        //   and make border all around
00046                 3 );         // set border width to 10
00047   wx_debugging_base::setup();
00048   SetSizer(topsizer);
00049 }
00050 
00051 wx_debugging_console_panel::~wx_debugging_console_panel()
00052 {
00053   wx_debugging_base::shut_down();
00054 }
00055 
00056 void wx_debugging_console_panel::display_debug_message(wxCommandEvent &event)
00057 {
00058   byte_array *data = (byte_array *)(event.GetClientData());
00059   if( NULL != data )
00060     wx_debugging_base::display_message(*data);
00061   event.SetClientData(NULL);
00062 }
00063 
00064 #endif //WX_DEBUGGING_CONSOLE_PANEL_IMPLEMENTATION_FILE
00065 

Generated on Fri Nov 28 04:29:06 2008 for HOOPLE Libraries by  doxygen 1.5.1