ReactOS 0.4.15-dev-5865-g640e228
|
#include <toolsmodel.h>
Public Member Functions | |
ToolsModel () | |
~ToolsModel () | |
int | GetLineWidth () const |
void | SetLineWidth (int nLineWidth) |
int | GetShapeStyle () const |
void | SetShapeStyle (int nShapeStyle) |
int | GetBrushStyle () const |
void | SetBrushStyle (int nBrushStyle) |
TOOLTYPE | GetActiveTool () const |
TOOLTYPE | GetOldActiveTool () const |
void | SetActiveTool (TOOLTYPE nActiveTool) |
int | GetAirBrushWidth () const |
void | SetAirBrushWidth (int nAirBrushWidth) |
int | GetRubberRadius () const |
void | SetRubberRadius (int nRubberRadius) |
BOOL | IsBackgroundTransparent () const |
void | SetBackgroundTransparent (BOOL bTransparent) |
int | GetZoom () const |
void | SetZoom (int nZoom) |
void | OnButtonDown (BOOL bLeftButton, LONG x, LONG y, BOOL bDoubleClick) |
void | OnMouseMove (BOOL bLeftButton, LONG x, LONG y) |
void | OnButtonUp (BOOL bLeftButton, LONG x, LONG y) |
void | OnCancelDraw () |
void | OnFinishDraw () |
void | resetTool () |
void | selectAll () |
void | NotifyToolChanged () |
void | NotifyToolSettingsChanged () |
void | NotifyZoomChanged () |
Private Member Functions | |
ToolBase * | GetOrCreateTool (TOOLTYPE nTool) |
Private Attributes | |
int | m_lineWidth |
int | m_shapeStyle |
int | m_brushStyle |
TOOLTYPE | m_activeTool |
TOOLTYPE | m_oldActiveTool |
int | m_airBrushWidth |
int | m_rubberRadius |
BOOL | m_transpBg |
int | m_zoom |
ToolBase * | m_tools [TOOL_MAX+1] |
ToolBase * | m_pToolObject |
Definition at line 72 of file toolsmodel.h.
ToolsModel::ToolsModel | ( | ) |
Definition at line 15 of file toolsmodel.cpp.
ToolsModel::~ToolsModel | ( | ) |
Definition at line 29 of file toolsmodel.cpp.
TOOLTYPE ToolsModel::GetActiveTool | ( | ) | const |
Definition at line 76 of file toolsmodel.cpp.
Referenced by ImageModel::DrawSelectionBackground(), CSelectionWindow::OnCaptureChanged(), CMainWindow::OnCommand(), CImgAreaWindow::OnEraseBkGnd(), CMainWindow::OnInitMenuPopup(), CCanvasWindow::OnLButtonDown(), CToolSettingsWindow::OnLButtonDown(), CSelectionWindow::OnLButtonUp(), CImgAreaWindow::OnMouseLeave(), CImgAreaWindow::OnMouseMove(), CToolSettingsWindow::OnPaint(), CImgAreaWindow::OnSetCursor(), and CToolBox::OnToolsModelToolChanged().
int ToolsModel::GetAirBrushWidth | ( | ) | const |
Definition at line 113 of file toolsmodel.cpp.
Referenced by AirBrushTool::draw(), and CToolSettingsWindow::drawAirBrush().
int ToolsModel::GetBrushStyle | ( | ) | const |
Definition at line 65 of file toolsmodel.cpp.
Referenced by BrushTool::draw(), and CToolSettingsWindow::drawBrush().
int ToolsModel::GetLineWidth | ( | ) | const |
Definition at line 43 of file toolsmodel.cpp.
Referenced by BezierTool::draw(), LineTool::draw(), RectTool::draw(), EllipseTool::draw(), RRectTool::draw(), ShapeTool::draw(), CToolSettingsWindow::drawLine(), and nearlyEqualPoints().
TOOLTYPE ToolsModel::GetOldActiveTool | ( | ) | const |
Definition at line 81 of file toolsmodel.cpp.
Referenced by ColorTool::OnButtonUp().
Definition at line 35 of file toolsmodel.cpp.
Referenced by SetActiveTool(), and ToolsModel().
int ToolsModel::GetRubberRadius | ( | ) | const |
Definition at line 124 of file toolsmodel.cpp.
Referenced by RubberTool::draw(), and CToolSettingsWindow::drawRubber().
int ToolsModel::GetShapeStyle | ( | ) | const |
Definition at line 54 of file toolsmodel.cpp.
Referenced by RectTool::draw(), EllipseTool::draw(), RRectTool::draw(), ShapeTool::draw(), and CToolSettingsWindow::drawBox().
int ToolsModel::GetZoom | ( | ) | const |
Definition at line 148 of file toolsmodel.cpp.
Referenced by ZoomTool::OnButtonDown(), CMainWindow::OnInitMenuPopup(), CSelectionWindow::OnMouseMove(), CMainWindow::OnMouseWheel(), CImgAreaWindow::OnPaint(), CToolSettingsWindow::OnToolsModelZoomChanged(), UnZoomed(), Zoomed(), and zoomTo().
BOOL ToolsModel::IsBackgroundTransparent | ( | ) | const |
Definition at line 135 of file toolsmodel.cpp.
Referenced by CTextEditWindow::DoFillBack(), CToolSettingsWindow::drawTrans(), CSelectionWindow::ForceRefreshSelectionContents(), TextTool::OnButtonUp(), CMainWindow::OnCommand(), CImgAreaWindow::OnEraseBkGnd(), CTextEditWindow::OnEraseBkGnd(), CMainWindow::OnInitMenuPopup(), and CSelectionWindow::OnMouseMove().
void ToolsModel::NotifyToolChanged | ( | ) |
Definition at line 159 of file toolsmodel.cpp.
Referenced by CFontsDialog::OnCommand(), CFontsDialog::OnFontName(), CFontsDialog::OnFontSize(), and SetActiveTool().
void ToolsModel::NotifyToolSettingsChanged | ( | ) |
Definition at line 171 of file toolsmodel.cpp.
Referenced by SetAirBrushWidth(), SetBackgroundTransparent(), SetBrushStyle(), SetLineWidth(), SetRubberRadius(), and SetShapeStyle().
void ToolsModel::NotifyZoomChanged | ( | ) |
Definition at line 191 of file toolsmodel.cpp.
Referenced by TextTool::OnFinishDraw(), CImgAreaWindow::OnLButtonDblClk(), CImgAreaWindow::OnLButtonDown(), CImgAreaWindow::OnRButtonDblClk(), CImgAreaWindow::OnRButtonDown(), and selectAll().
Definition at line 207 of file toolsmodel.cpp.
Referenced by TextTool::OnFinishDraw(), CImgAreaWindow::OnLButtonUp(), CImgAreaWindow::OnRButtonUp(), and selectAll().
void ToolsModel::OnCancelDraw | ( | ) |
Definition at line 215 of file toolsmodel.cpp.
Referenced by CImgAreaWindow::cancelDrawing(), CTextEditWindow::OnKeyDown(), and CCanvasWindow::OnLButtonDown().
void ToolsModel::OnFinishDraw | ( | ) |
Definition at line 223 of file toolsmodel.cpp.
Referenced by CImgAreaWindow::finishDrawing(), and SetActiveTool().
Definition at line 199 of file toolsmodel.cpp.
Referenced by CImgAreaWindow::OnMouseMove(), and selectAll().
void ToolsModel::resetTool | ( | ) |
Definition at line 231 of file toolsmodel.cpp.
Referenced by CImgAreaWindow::OnLButtonDblClk(), CCanvasWindow::OnLButtonDown(), CCanvasWindow::OnLButtonUp(), CImgAreaWindow::OnRButtonDblClk(), and CToolBox::OnToolsModelToolChanged().
void ToolsModel::selectAll | ( | ) |
Definition at line 236 of file toolsmodel.cpp.
Referenced by CMainWindow::OnCommand().
Definition at line 86 of file toolsmodel.cpp.
Referenced by ColorTool::OnButtonUp(), CToolBox::OnCommand(), and selectAll().
Definition at line 118 of file toolsmodel.cpp.
Referenced by CToolSettingsWindow::OnLButtonDown().
Definition at line 140 of file toolsmodel.cpp.
Referenced by CMainWindow::OnCommand(), and CToolSettingsWindow::OnLButtonDown().
Definition at line 70 of file toolsmodel.cpp.
Referenced by CToolSettingsWindow::OnLButtonDown().
Definition at line 48 of file toolsmodel.cpp.
Referenced by CToolSettingsWindow::OnLButtonDown().
Definition at line 129 of file toolsmodel.cpp.
Referenced by CToolSettingsWindow::OnLButtonDown().
Definition at line 59 of file toolsmodel.cpp.
Referenced by CToolSettingsWindow::OnLButtonDown().
Definition at line 153 of file toolsmodel.cpp.
Referenced by zoomTo().
|
private |
Definition at line 78 of file toolsmodel.h.
Referenced by GetActiveTool(), NotifyToolChanged(), SetActiveTool(), and ToolsModel().
|
private |
Definition at line 80 of file toolsmodel.h.
Referenced by GetAirBrushWidth(), SetAirBrushWidth(), and ToolsModel().
|
private |
Definition at line 77 of file toolsmodel.h.
Referenced by GetBrushStyle(), SetBrushStyle(), and ToolsModel().
|
private |
Definition at line 75 of file toolsmodel.h.
Referenced by GetLineWidth(), SetLineWidth(), and ToolsModel().
|
private |
Definition at line 79 of file toolsmodel.h.
Referenced by GetOldActiveTool(), SetActiveTool(), and ToolsModel().
|
private |
Definition at line 85 of file toolsmodel.h.
Referenced by OnButtonDown(), OnButtonUp(), OnCancelDraw(), OnFinishDraw(), OnMouseMove(), resetTool(), SetActiveTool(), and ToolsModel().
|
private |
Definition at line 81 of file toolsmodel.h.
Referenced by GetRubberRadius(), SetRubberRadius(), and ToolsModel().
|
private |
Definition at line 76 of file toolsmodel.h.
Referenced by GetShapeStyle(), SetShapeStyle(), and ToolsModel().
Definition at line 84 of file toolsmodel.h.
Referenced by GetOrCreateTool(), ToolsModel(), and ~ToolsModel().
|
private |
Definition at line 82 of file toolsmodel.h.
Referenced by IsBackgroundTransparent(), SetBackgroundTransparent(), and ToolsModel().
|
private |
Definition at line 83 of file toolsmodel.h.
Referenced by GetZoom(), SetZoom(), and ToolsModel().