Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CAddScreen.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2003 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package 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
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef CADDSCREEN_H
00016 #define CADDSCREEN_H
00017 
00018 #include "CString.h"
00019 
00020 #define WINDOWS_LEAN_AND_MEAN
00021 #include <windows.h>
00022 
00023 class CConfig;
00024 
00026 class CAddScreen {
00027 public:
00028     CAddScreen(HWND parent, CConfig*, const CString& name);
00029     ~CAddScreen();
00030 
00032 
00033 
00035 
00039     bool                doModal();
00040 
00042 
00043 
00044 
00045     CString             getName() const;
00046 
00048 
00049 private:
00050     typedef std::vector<CString> CStringList;
00051 
00052     void                getAliases(CStringList&) const;
00053     void                getOptions(CConfig::CScreenOptions&) const;
00054 
00055     static void         tokenize(CStringList& tokens, const CString& src);
00056     static bool         isNameInList(const CStringList& tokens,
00057                             const CString& src);
00058 
00059     void                init(HWND hwnd);
00060     bool                save(HWND hwnd);
00061 
00062     // message handling
00063     BOOL                doDlgProc(HWND, UINT, WPARAM, LPARAM);
00064     static BOOL CALLBACK dlgProc(HWND, UINT, WPARAM, LPARAM);
00065 
00066 private:
00067     static CAddScreen*  s_singleton;
00068 
00069     HWND                m_parent;
00070     CConfig*            m_config;
00071     CString             m_name;
00072 };
00073 
00074 #endif

Generated on Fri Nov 6 00:21:13 2009 for synergy-plus by  doxygen 1.3.9.1