1 /* 2 * ***** BEGIN LICENSE BLOCK ***** 3 * Zimbra Collaboration Suite Web Client 4 * Copyright (C) 2005, 2006, 2007, 2009, 2010, 2013, 2014, 2015, 2016 Synacor, Inc. 5 * 6 * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: https://www.zimbra.com/license 9 * The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 10 * have been added to cover use of software over a computer network and provide for limited attribution 11 * for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B. 12 * 13 * Software distributed under the License is distributed on an "AS IS" basis, 14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. 15 * See the License for the specific language governing rights and limitations under the License. 16 * The Original Code is Zimbra Open Source Web Client. 17 * The Initial Developer of the Original Code is Zimbra, Inc. All rights to the Original Code were 18 * transferred by Zimbra, Inc. to Synacor, Inc. on September 14, 2015. 19 * 20 * All portions of the code are Copyright (C) 2005, 2006, 2007, 2009, 2010, 2013, 2014, 2015, 2016 Synacor, Inc. All Rights Reserved. 21 * ***** END LICENSE BLOCK ***** 22 */ 23 24 25 /** 26 * 27 * @private 28 */ 29 DwtControlEvent = function() { 30 this.reset(); 31 } 32 DwtControlEvent.prototype = new DwtEvent; 33 DwtControlEvent.prototype.constructor = DwtControlEvent; 34 35 // type of control event 36 // RESIZE -- for setSize 37 // MOVE -- for setLocation 38 // RESIZE | MOVE -- for setBounts (bitwise or) 39 // STATE -- for setDisplayState (bitwise or) 40 41 DwtControlEvent.RESIZE = 1; 42 DwtControlEvent.MOVE = 2; 43 DwtControlEvent.STATE = 4; 44 45 DwtControlEvent.prototype.toString = 46 function() { 47 return "DwtControlEvent"; 48 } 49 50 DwtControlEvent.prototype.reset = 51 function(type) { 52 this.oldX = Dwt.DEFAULT; 53 this.oldY = Dwt.DEFAULT; 54 this.oldWidth = Dwt.DEFAULT; 55 this.oldHeight = Dwt.DEFAULT; 56 this.oldState = null; 57 this.newX = Dwt.DEFAULT; 58 this.newY = Dwt.DEFAULT; 59 this.newWidth = Dwt.DEFAULT; 60 this.newHeight = Dwt.DEFAULT; 61 this.newState = null; 62 this.type = type || null; 63 } 64