Menu

[r366]: / trunk / src / MainDlg.h  Maximize  Restore  History

Download this file

111 lines (89 with data), 3.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
// CommitMonitor - simple checker for new commits in svn repositories
// Copyright (C) 2007-2009 - Stefan Kueng
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
#pragma once
#include <string>
#include "basedialog.h"
#include "ListCtrl.h"
#include "UrlInfo.h"
#define REPOBROWSER_CTRL_MIN_WIDTH 50
#define REPOBROWSER_CTRL_MIN_HEIGHT 40
#define DRAGMODE_NONE 0
#define DRAGMODE_HORIZONTAL 1
#define DRAGMODE_VERTICAL 2
#define TIMER_REFRESH 101
#define TIMER_LABEL 102
using namespace std;
/**
* main dialog.
*/
class CMainDlg : public CDialog
{
public:
CMainDlg(HWND hParent);
~CMainDlg(void);
void SetUrlInfos(CUrlInfos * pUrlInfos) {m_pURLInfos = pUrlInfos;}
void SetUpdateAvailable(bool bUpdate) {m_bNewerVersionAvailable = bUpdate;}
protected:
LRESULT CALLBACK DlgFunc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT DoCommand(int id);
private:
bool OnSetCursor(HWND hWnd, UINT nHitTest, UINT message);
bool OnMouseMove(UINT nFlags, POINT point);
bool OnLButtonDown(UINT nFlags, POINT point);
bool OnLButtonUp(UINT nFlags, POINT point);
void DrawXorBar(HDC hDC, LONG x1, LONG y1, LONG width, LONG height);
void PositionChildWindows(POINT point, bool bHorz, bool bShowBar);
void DoResize(int width, int height);
bool CreateToolbar();
void RefreshURLTree(bool bSelectUnread);
HTREEITEM FindParentTreeNode(const wstring& url);
HTREEITEM FindTreeNode(const wstring& url, HTREEITEM hItem = TVI_ROOT);
bool SelectNextWithUnread(HTREEITEM hItem = TVI_ROOT);
void OnSelectTreeItem(LPNMTREEVIEW lpNMTreeView);
void OnSelectListItem(LPNMLISTVIEW lpNMListView);
LRESULT OnCustomDrawListItem(LPNMLVCUSTOMDRAW lpNMCustomDraw);
LRESULT OnCustomDrawTreeItem(LPNMLVCUSTOMDRAW lpNMCustomDraw);
void OnKeyDownListItem(LPNMLVKEYDOWN pnkd);
void OnDblClickListItem(LPNMITEMACTIVATE lpnmitem);
void TreeItemSelected(HWND hTreeControl, HTREEITEM hSelectedItem);
void RemoveSelectedListItems();
void MarkAllAsRead(HTREEITEM hItem, bool includingChildren);
void SetRemoveButtonState();
bool ShowDiff(bool bUseTSVN);
void SaveWndPosition();
/// window procedure of the sub classed tree view control
static LRESULT CALLBACK TreeProc(HWND hWnd, UINT uMessage, WPARAM wParam, LPARAM lParam);
WNDPROC m_oldTreeWndProc; ///< pointer to the original window proc of the tree view control
private:
HWND m_hTreeControl;
HWND m_hListControl;
HWND m_hLogMsgControl;
HFONT m_font;
CListCtrl m_ListCtrl;
HWND m_hParent;
HWND m_hwndToolbar;
HIMAGELIST m_hToolbarImages;
HIMAGELIST m_hImgList;
int m_nDragMode;
LONG m_oldx, m_oldy;
LONG m_topmarg;
LONG m_xSliderPos;
LONG m_ySliderPos;
LONG m_bottommarg;
HFONT m_boldFont;
CUrlInfos * m_pURLInfos;
bool m_bBlockListCtrlUI;
bool m_bNewerVersionAvailable;
};
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.