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

searchprogram.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2003, 2004 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 clone
00022  //
00023  // dialogs/searchprogram.h
00024  //
00025  // Explorer dialogs
00026  //
00027  // Martin Fuchs, 02.10.2003
00028  //
00029 
00030 
00031 typedef void (*COLLECT_CALLBACK)(Entry* entry, void* param);
00032 typedef stack<ShellDirectory*> ShellDirectoryStack;
00033 
00035 struct CollectProgramsThread : public Thread
00036 {
00037     CollectProgramsThread(COLLECT_CALLBACK callback, HWND hwnd, void* para)
00038      :  _cache_valid(false),
00039         _callback(callback),
00040         _hwnd(hwnd),
00041         _para(para)
00042     {
00043     }
00044 
00045     ~CollectProgramsThread()
00046     {
00047         free_dirs();
00048     }
00049 
00050     int     Run();
00051     void    free_dirs();
00052 
00053     bool    _cache_valid;
00054 
00055 protected:
00056     COLLECT_CALLBACK _callback;
00057     HWND    _hwnd;
00058     void*   _para;
00059     ShellDirectoryStack _dirs;
00060 
00061     void    collect_programs(const ShellPath& path);
00062 };
00063 
00064 
00066 struct FPDEntry
00067 {
00068     Entry*  _entry;
00069     int     _idxIcon;
00070     String  _menu_path;
00071     String  _path;
00072 };
00073 
00074 typedef list<FPDEntry> FPDCache;
00075 
00076 
00078 struct FindProgramDlg : public ResizeController<Dialog>
00079 {
00080     typedef ResizeController<Dialog> super;
00081 
00082     FindProgramDlg(HWND hwnd);
00083     ~FindProgramDlg();
00084 
00085 protected:
00086     HWND    _list_ctrl;
00087     HACCEL  _haccel;
00088     String  _lwr_filter;
00089 
00090     CollectProgramsThread _thread;
00091     FPDCache _cache;
00092 
00093     String  _common_programs, _user_programs;
00094 
00095     ListSort _sort;
00096 
00097     virtual LRESULT WndProc(UINT, WPARAM, LPARAM);
00098     virtual int Command(int id, int code);
00099     virtual int Notify(int id, NMHDR* pnmh);
00100 
00101     void    Refresh(bool delete_cache=false);
00102     void    add_entry(const FPDEntry& cache_entry);
00103     void    LaunchSelected();
00104     void    CheckEntries();
00105 
00106     static void collect_programs_callback(Entry* entry, void* param);
00107     static int CALLBACK CompareFunc(LPARAM lparam1, LPARAM lparam2, LPARAM lparamSort);
00108 };

Generated on Sat May 26 2012 04:17:27 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.