Quantum Fog  0.9.3
C_ETABLE_MULTI_SEL.h
1 #pragma once
2 //******************************************
3 class C_ETABLE_MULTI_SEL : public LTableMultiSelector
4 {
5 protected:
6  USHORT its_first_selectable_col;
7  USHORT its_first_selectable_row;
8 public:
9  C_ETABLE_MULTI_SEL(LTableView * tv_p, USHORT first_scol, USHORT first_srow);
10  virtual ~C_ETABLE_MULTI_SEL();
11 
12 VOID set_anchor_cell(const STableCell & cell);
13 BOOLEAN is_selectable_cell(const STableCell & inCell);
14 USHORT get_sel_size() const;
15 Rect get_sel_rect() const;
16 VOID set_sel_rect(const Rect & rect);
17 
18 
19 
20 VOID SelectAllCells();
21 VOID ClickSelect(const STableCell & inCell, const SMouseDownEvent & inMouseDown);
22 BOOLEAN DragSelect(const STableCell & inCell, const SMouseDownEvent & inMouseDown);
23 
24 };
25 #pragma mark -
26 
27 
28 //******************************************
29 inline
30 VOID C_ETABLE_MULTI_SEL::set_anchor_cell(
31 const STableCell & cell) //in
32 {
33  mAnchorCell = cell;
34 }
35 //******************************************
36 inline
37 BOOLEAN C_ETABLE_MULTI_SEL::is_selectable_cell(
38 const STableCell & cell) //in
39 {
40  //I assume that first N rows and first M columns can be unselectable.
41  //Selectable cells are a subset of valid cells.
42  return mTableView->IsValidCell(cell) &&
43  cell.row>=its_first_selectable_row &&
44  cell.col>=its_first_selectable_col;
45 }
46 //******************************************
47 inline
48 Rect C_ETABLE_MULTI_SEL::get_sel_rect()
49 const
50 {
51  return mSelectionRgn.Bounds();
52 }
53 
Definition: C_ETABLE_MULTI_SEL.h:3