1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef DBAUI_OQUERYMOVETABWINUNDOACT_HXX
24 #define DBAUI_OQUERYMOVETABWINUNDOACT_HXX
25 
26 #ifndef DBAUI_QUERYDESIGNUNDOACTION_HXX
27 #include "QueryDesignUndoAction.hxx"
28 #endif
29 #ifndef _DBU_QRY_HRC_
30 #include "dbu_qry.hrc"
31 #endif
32 #ifndef _SV_GEN_HXX
33 #include <tools/gen.hxx>
34 #endif
35 
36 namespace dbaui
37 {
38 
39 	// ================================================================================================
40 	// OQueryMoveTabWinUndoAct - Undo-Klasse fuer Verschieben eines TabWins
41 	class OQueryTableWindow;
42 	class OTableWindow;
43 	class OJoinMoveTabWinUndoAct : public OQueryDesignUndoAction
44 	{
45 		Point			m_ptNextPosition;
46 		OTableWindow*	m_pTabWin;
47 
48 	protected:
49 		void TogglePosition();
50 
51 	public:
52 		OJoinMoveTabWinUndoAct(OJoinTableView* pOwner, const Point& ptOriginalPosition, OTableWindow* pTabWin);
53 
Undo()54 		virtual void	Undo() { TogglePosition(); }
Redo()55 		virtual void	Redo() { TogglePosition(); }
56 	};
57 
58 	// ------------------------------------------------------------------------------------------------
OJoinMoveTabWinUndoAct(OJoinTableView * pOwner,const Point & ptOriginalPosition,OTableWindow * pTabWin)59 	inline OJoinMoveTabWinUndoAct::OJoinMoveTabWinUndoAct(OJoinTableView* pOwner, const Point& ptOriginalPosition, OTableWindow* pTabWin)
60 		:OQueryDesignUndoAction(pOwner, STR_QUERY_UNDO_MOVETABWIN)
61 		,m_ptNextPosition(ptOriginalPosition)
62 		,m_pTabWin(pTabWin)
63 	{
64 	}
65 }
66 #endif // DBAUI_OQUERYMOVETABWINUNDOACT_HXX
67 
68 
69