ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

taskbar.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2003, 2004, 2005 Martin Fuchs
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00017  */
00018 
00019 
00020  //
00021  // Explorer and Desktop clone
00022  //
00023  // taskbar.h
00024  //
00025  // Martin Fuchs, 16.08.2003
00026  //
00027 
00028 
00029 //#include "shellhook.h"
00030 
00031 
00032 #define CLASSNAME_TASKBAR       TEXT("MSTaskSwWClass")
00033 #define TITLE_TASKBAR           TEXT("Running Applications")
00034 
00035 #define IDC_FIRST_APP   0x2000
00036 
00037 //#define TASKBAR_AT_TOP
00038 
00039 #define TASKBUTTONWIDTH_MIN     38
00040 #define TASKBUTTONWIDTH_MAX     160
00041 
00042 
00043 #define IDW_TASKTOOLBAR 100
00044 
00045 
00046 #define PM_GET_LAST_ACTIVE  (WM_APP+0x1D)
00047 
00048 
00050 struct TaskBarEntry
00051 {
00052     TaskBarEntry();
00053 
00054     int     _id;    // ID for WM_COMMAND
00055     HBITMAP _hbmp;
00056     int     _bmp_idx;
00057     int     _used;
00058     int     _btn_idx;
00059     String  _title;
00060     BYTE    _fsState;
00061 };
00062 
00064 struct TaskBarMap : public map<HWND, TaskBarEntry>
00065 {
00066     ~TaskBarMap();
00067 
00068     iterator find_id(int id);
00069 };
00070 
00071 
00073 struct TaskBar : public Window
00074 {
00075     typedef Window super;
00076 
00077     TaskBar(HWND hwnd);
00078     ~TaskBar();
00079 
00080     static HWND Create(HWND hwndParent);
00081 
00082 protected:
00083     WindowHandle _htoolbar;
00084     TaskBarMap  _map;
00085     int         _next_id;
00086     WindowHandle _last_foreground_wnd;
00087     int         _last_btn_width;
00088     MINIMIZEDMETRICS _mmMetrics_org;
00089 
00090     const UINT WM_SHELLHOOK;
00091 
00092     LRESULT Init(LPCREATESTRUCT pcs);
00093     LRESULT WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam);
00094     int     Command(int id, int code);
00095     int     Notify(int id, NMHDR* pnmh);
00096 
00097     void    ActivateApp(TaskBarMap::iterator it, bool can_minimize=true, bool can_restore=true);
00098     void    ShowAppSystemMenu(TaskBarMap::iterator it);
00099 
00100     static BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lparam);
00101 
00102     void    Refresh();
00103     void    ResizeButtons();
00104 };

Generated on Fri May 25 2012 04:16:48 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.