Добавил:
korayakov
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабы / 2 / lab.05.by mice / spice / src / csp_list
.h/*******************************************************************************
* file: csp_list.h *
* version: 0.0.1 *
* author: d-evil [tmd] (mailto:d-evil.tmd@mail.ru) *
* description: not available *
*******************************************************************************/
#ifndef CSP_LIST_INCLUDED
#define CSP_LIST_INCLUDED
////////////////////////////////////////////////////////////////////////////////
// headers
#include <time.h>
#include <afx.h>
#include <afxwin.h>
#include <afxdlgs.h>
#include <afxcmn.h>
#include "csp_file.h"
#include "csp_parser.h"
#include "win_errors.h"
#include "resource.h"
////////////////////////////////////////////////////////////////////////////////
// csp_list declaration
class csp_list: public CDialog {
public:
////////////////////////////////////////////////////////////////////////////
// csp_list public constants
static const int SPM_LST_CLOSE_ME = WM_USER + 0xC0E;
static const int SPM_LST_UPDATE = WM_USER + 0xDAE;
csp_list();
~csp_list();
HICON get_icon() const { return _icon; }
void set_icon(const HICON icon) { _icon = icon; }
void set_app_path(const char *const path) { _app_path = path; }
int create(CWnd *const parent);
virtual BOOL OnInitDialog();
virtual void OnOK() {}
virtual void OnCancel() {}
virtual void OnClose();
int use_csp_file(const HANDLE hfile);
int update();
protected:
////////////////////////////////////////////////////////////////////////////
// csp_list protected constants
static const int _MX_DTGM_SIZE = 0xFFFF;
static const int _REDRAW_DELAY_MS = 250;
static const char *_DEF_TMP_FILE_BASE;
static const char *_HTML_INTRO;
static const char *_HTML_OUTRO;
////////////////////////////////////////////////////////////////////////////
// csp_list protected controls
CButton *_btn_view;
CButton *_btn_close;
CButton *_btn_send_vseh_nahuj;
CButton *_btn_resolve;
CTreeCtrl *_tree;
////////////////////////////////////////////////////////////////////////////
// csp_list protected event handlers
DECLARE_MESSAGE_MAP();
void _on_btn_view();
void _on_btn_close();
void _on_btn_send_vseh_nahuj();
LRESULT _on_list_update(WPARAM pch, LPARAM hz);
////////////////////////////////////////////////////////////////////////////
// csp_list protected functions
int _update_tree();
int _write_arch(const int arch_num);
int _write_dtgm(const int arch_num, const int num);
private:
csp_file _csp_file; // 03:01 now... I want to sleep...
int _last_arch_num;
int _last_item_num;
HTREEITEM _last_tree_item;
csp_parser _csp_parser;
CString _app_path;
CString _tmp_file_name;
HANDLE _tmp_file;
HICON _icon;
clock_t _last_redraw;
};
#endif
Соседние файлы в папке src