debugging_console_window.h

Go to the documentation of this file.
00001 #ifndef DEBUGGING_CONSOLE_WINDOW_CLASS
00002 #define DEBUGGING_CONSOLE_WINDOW_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : debugging_console_window                                          *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *  Purpose:                                                                   *
00010 *                                                                             *
00011 *    Provides a scratch pad window that accepts debugging messages generated  *
00012 *  by a debugger object and prints them out.                                  *
00013 *                                                                             *
00014 *******************************************************************************
00015 * Copyright (c) 1995-$now By Author.  This program is free software; you can  *
00016 * redistribute it and/or modify it under the terms of the GNU General Public  *
00017 * License as published by the Free Software Foundation; either version 2 of   *
00018 * the License or (at your option) any later version.  This is online at:      *
00019 *     http://www.fsf.org/copyleft/gpl.html                                    *
00020 * Please send any updates to: fred@gruntose.com                               *
00021 \*****************************************************************************/
00022 
00023 #include "debugging_base.h"
00024 
00025 #include <basis/portable.h>
00026 
00027 class MFC_EXTENSIONS_CLASS_STYLE debugging_console_window
00028 : public CWnd,
00029   public debugging_base
00030 {
00031 public:
00032   debugging_console_window(int file_size = int(1.2 * MEGABYTE));
00033   virtual ~debugging_console_window();
00034 
00035   virtual BOOL Create(LPCTSTR class_name, LPCTSTR title, DWORD win_style,
00036           const RECT &dimensions, CWnd *parent, UINT id,
00037           CCreateContext *context = NIL);
00038     // creates a console window with the "parent" window and "title" specified.
00039     // as per the CWnd Create function, the "class_name" will be used for the
00040     // window class (NIL is acceptable for this), the "win_style" defines the
00041     // style for the window, the "dimensions" specify the initial size, "id"
00042     // is the window's id and the "context" is the optional creation context.
00043     // true is returned for successful creation.
00044     // Note: if win_style is "WS_CHILD", then the window will inhabit the full
00045     // client area of its parent.
00046 
00047   void hide();
00048     // hides the debugging window.
00049   void show();
00050     // shows the debugging window.
00051 
00052   bool is_hidden() const;
00053     // returns true if the console window is hidden.
00054   bool is_visible() const;
00055     // returns true if the console window is visible.
00056 
00057   afx_msg LRESULT display_debug_message(WPARAM wparam, LPARAM lparam);
00058     // prints the debugging information that is sent to a window.  this can
00059     // be invoked by windows that are receiving debugging messages.
00060 
00061 private:
00062   CEdit _editor;  // the edit window object.
00063 
00064   // MFC mechanisms below...
00065   DECLARE_MESSAGE_MAP()
00066   // Virtual functions inserted by Class Weasel.
00067   afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00068   afx_msg void OnClose();
00069   afx_msg void OnSize(UINT nType, int cx, int cy);
00070   afx_msg void OnMove(int x, int y);
00071   afx_msg void OnSetFocus(CWnd *old_window);
00072 };
00073 
00074 #endif
00075 

Generated on Thu Nov 20 04:28:49 2008 for HOOPLE Libraries by  doxygen 1.5.1