Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[6a7162]: PWFindToolBar.h Maximize Restore History

Download this file

PWFindToolBar.h    81 lines (64 with data), 2.4 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
/*
* Copyright (c) 2003-2008 Rony Shapiro <ronys@users.sourceforge.net>.
* All rights reserved. Use of the code is allowed under the
* Artistic License 2.0 terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license-2.0.php
*/
#pragma once
// CPWFindToolBar
#include "ControlExtns.h"
#include <vector>
class CPWFindToolBar : public CToolBar
{
DECLARE_DYNAMIC(CPWFindToolBar)
public:
CPWFindToolBar();
virtual ~CPWFindToolBar();
void Init(const int NumBits, CWnd *pMessageWindow, int iWMSGID);
void LoadDefaultToolBar(const int toolbarMode);
void AddExtraControls();
void ChangeImages(const int toolbarMode);
void Reset();
void ShowFindToolBar(bool bShow);
bool IsVisible() {return m_bVisible;}
void GetSearchText(CString &csFindString)
{m_findedit.GetWindowText(csFindString);}
void Find();
void ClearFind();
void ShowFindAdvanced();
void ToggleToolBarFindCase();
BOOL IsFindCaseSet()
{return m_bCaseSensitive ? TRUE : FALSE;}
void RefreshImages();
CEditExtn m_findedit;
CStaticExtn m_findresults;
protected:
//{{AFX_MSG(CPWFindToolBar)
//}}AFX_MSG
BOOL PreTranslateMessage(MSG* pMsg);
DECLARE_MESSAGE_MAP()
private:
static const UINT m_FindToolBarIDs[];
static const UINT m_FindToolBarClassicBMs[];
static const UINT m_FindToolBarNewBMs[];
CImageList m_ImageLists[3]; // 1st = Classic; 2nd = New 8; 3rd = New 32;
TBBUTTON *m_pOriginalTBinfo;
CWnd *m_pDbx;
CFont m_FindTextFont;
int m_iMaxNumButtons, m_iNum_Bitmaps, m_NumBits;
int m_iWMSGID;
int m_toolbarMode, m_bitmode;
bool m_bVisible, m_bCaseSensitive, m_bAdvanced;
std::vector<int> m_indices; // array of found items
bool m_cs_search, m_last_cs_search;
CMyString m_search_text, m_last_search_text;
CItemData::FieldBits m_bsFields, m_last_bsFields;
CString m_subgroup_name, m_last_subgroup_name;
int m_subgroup_set, m_last_subgroup_set;
int m_subgroup_object, m_last_subgroup_object;
int m_subgroup_function, m_last_subgroup_function;
size_t m_lastshown; // last index selected, -1 indicates no search done yet
size_t m_numFound; // number of matched items, as returned by DboxMain::FindAll
int m_iCase_Insensitive_BM_offset, m_iCase_Sensitive_BM_offset;
};