X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=plugins%2Ftextool%2F2DView.h;h=22ecc0719608efc4039b5fa0ecc4ef2302df5876;hp=59163f8019ea29b5d1fa41d2b6aa2197a6eeb7b8;hb=830125fad042fad35dc029b6eb57c8156ad7e176;hpb=515673c08f8718a237e90c2130a1f5294f966d6a diff --git a/plugins/textool/2DView.h b/plugins/textool/2DView.h index 59163f80..22ecc071 100644 --- a/plugins/textool/2DView.h +++ b/plugins/textool/2DView.h @@ -1,23 +1,23 @@ /* -Copyright (C) 1999-2007 id Software, Inc. and contributors. -For a list of contributors, see the accompanying CONTRIBUTORS file. + Copyright (C) 1999-2007 id Software, Inc. and contributors. + For a list of contributors, see the accompanying CONTRIBUTORS file. -This file is part of GtkRadiant. + This file is part of GtkRadiant. -GtkRadiant 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. + GtkRadiant 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. -GtkRadiant 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. + GtkRadiant 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 GtkRadiant; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + You should have received a copy of the GNU General Public License + along with GtkRadiant; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ //----------------------------------------------------------------------------- // @@ -32,39 +32,38 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class C2DView { - enum E2DViewState { View_Idle, View_Move } ViewState; - int m_xPosMove, m_yPosMove; - float m_MinsMove[2], m_MaxsMove[2]; - qboolean m_bDoGrid; - float m_GridStep[2]; - qboolean m_bPopup; +enum E2DViewState { View_Idle, View_Move } ViewState; +int m_xPosMove, m_yPosMove; +float m_MinsMove[2], m_MaxsMove[2]; +qboolean m_bDoGrid; +float m_GridStep[2]; +qboolean m_bPopup; public: - RECT m_rect; - float m_Mins[2],m_Maxs[2],m_Center[2]; - C2DView() - { - ViewState = View_Idle; - m_bDoGrid = false; - m_bPopup = false; - } - ~C2DView() { } - void SetGrid( float xGridStep, float yGridStep ) - { m_bDoGrid = true; m_GridStep[0] = xGridStep; m_GridStep[1] = yGridStep; } +RECT m_rect; +float m_Mins[2],m_Maxs[2],m_Center[2]; +C2DView(){ + ViewState = View_Idle; + m_bDoGrid = false; + m_bPopup = false; +} +~C2DView() { } +void SetGrid( float xGridStep, float yGridStep ) +{ m_bDoGrid = true; m_GridStep[0] = xGridStep; m_GridStep[1] = yGridStep; } - // get window coordinates for space coordinates - void WindowForSpace( int &x, int &y, const float c[2]); - void SpaceForWindow( float c[2], int x, int y); - void GridForWindow( float c[2], int x, int y); - qboolean DoesSelect( int x, int y, float c[2] ); - void PreparePaint(); +// get window coordinates for space coordinates +void WindowForSpace( int &x, int &y, const float c[2] ); +void SpaceForWindow( float c[2], int x, int y ); +void GridForWindow( float c[2], int x, int y ); +qboolean DoesSelect( int x, int y, float c[2] ); +void PreparePaint(); - bool OnRButtonDown (int x, int y); - bool OnMouseMove (int x, int y); - bool OnRButtonUp (int x, int y); - bool OnKeyDown (char *s); +bool OnRButtonDown( int x, int y ); +bool OnMouseMove( int x, int y ); +bool OnRButtonUp( int x, int y ); +bool OnKeyDown( char *s ); - void ZoomIn(); - void ZoomOut(); +void ZoomIn(); +void ZoomOut(); }; #endif