PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/mozilla/mozilla/dist/include/editor/nsIHTMLAbsPosEditor.h

http://kmbrasil.codeplex.com
C++ Header | 373 lines | 194 code | 56 blank | 123 comment | 0 complexity | 1147064d82cf1ab99a371890932c1fe9 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM h:/projects/mozilla/mozilla/editor/idl/nsIHTMLAbsPosEditor.idl
  3. */
  4. #ifndef __gen_nsIHTMLAbsPosEditor_h__
  5. #define __gen_nsIHTMLAbsPosEditor_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. #ifndef __gen_domstubs_h__
  10. #include "domstubs.h"
  11. #endif
  12. /* For IDL files that don't want to include root IDL files. */
  13. #ifndef NS_NO_VTABLE
  14. #define NS_NO_VTABLE
  15. #endif
  16. /* starting interface: nsIHTMLAbsPosEditor */
  17. #define NS_IHTMLABSPOSEDITOR_IID_STR "91375f52-20e6-4757-9835-eb04fabe5498"
  18. #define NS_IHTMLABSPOSEDITOR_IID \
  19. {0x91375f52, 0x20e6, 0x4757, \
  20. { 0x98, 0x35, 0xeb, 0x04, 0xfa, 0xbe, 0x54, 0x98 }}
  21. class NS_NO_VTABLE nsIHTMLAbsPosEditor : public nsISupports {
  22. public:
  23. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IHTMLABSPOSEDITOR_IID)
  24. /**
  25. * true if the selection container is absolutely positioned
  26. */
  27. /* readonly attribute boolean selectionContainerAbsolutelyPositioned; */
  28. NS_IMETHOD GetSelectionContainerAbsolutelyPositioned(PRBool *aSelectionContainerAbsolutelyPositioned) = 0;
  29. /**
  30. * this contains the absolutely positioned element currently edited
  31. * or null
  32. */
  33. /* readonly attribute nsIDOMElement positionedElement; */
  34. NS_IMETHOD GetPositionedElement(nsIDOMElement * *aPositionedElement) = 0;
  35. /**
  36. * true if Absolute Positioning handling is enabled in the editor
  37. */
  38. /* attribute boolean absolutePositioningEnabled; */
  39. NS_IMETHOD GetAbsolutePositioningEnabled(PRBool *aAbsolutePositioningEnabled) = 0;
  40. NS_IMETHOD SetAbsolutePositioningEnabled(PRBool aAbsolutePositioningEnabled) = 0;
  41. /**
  42. * true if Snap To Grid is enabled in the editor.
  43. */
  44. /* attribute boolean snapToGridEnabled; */
  45. NS_IMETHOD GetSnapToGridEnabled(PRBool *aSnapToGridEnabled) = 0;
  46. NS_IMETHOD SetSnapToGridEnabled(PRBool aSnapToGridEnabled) = 0;
  47. /**
  48. * sets the grid size in pixels.
  49. * @param aSizeInPixels [IN] the size of the grid in pixels
  50. */
  51. /* attribute unsigned long gridSize; */
  52. NS_IMETHOD GetGridSize(PRUint32 *aGridSize) = 0;
  53. NS_IMETHOD SetGridSize(PRUint32 aGridSize) = 0;
  54. /**
  55. * returns the deepest absolutely positioned container of the selection
  56. * if it exists or null.
  57. */
  58. /* readonly attribute nsIDOMElement absolutelyPositionedSelectionContainer; */
  59. NS_IMETHOD GetAbsolutelyPositionedSelectionContainer(nsIDOMElement * *aAbsolutelyPositionedSelectionContainer) = 0;
  60. /**
  61. * extracts the selection from the normal flow of the document and
  62. * positions it.
  63. * @param aEnabled [IN] true to absolutely position the selection,
  64. * false to put it back in the normal flow
  65. */
  66. /* void absolutePositionSelection (in boolean aEnabled); */
  67. NS_IMETHOD AbsolutePositionSelection(PRBool aEnabled) = 0;
  68. /**
  69. * adds aChange to the z-index of the currently positioned element.
  70. * @param aChange [IN] relative change to apply to current z-index
  71. */
  72. /* void relativeChangeZIndex (in long aChange); */
  73. NS_IMETHOD RelativeChangeZIndex(PRInt32 aChange) = 0;
  74. /**
  75. * extracts an element from the normal flow of the document and
  76. * positions it, and puts it back in the normal flow.
  77. * @param aElement [IN] the element
  78. * @param aEnabled [IN] true to absolutely position the element,
  79. * false to put it back in the normal flow
  80. */
  81. /* void absolutelyPositionElement (in nsIDOMElement aElement, in boolean aEnabled); */
  82. NS_IMETHOD AbsolutelyPositionElement(nsIDOMElement *aElement, PRBool aEnabled) = 0;
  83. /**
  84. * sets the position of an element; warning it does NOT check if the
  85. * element is already positioned or not and that's on purpose.
  86. * @param aElement [IN] the element
  87. * @param aX [IN] the x position in pixels.
  88. * @param aY [IN] the y position in pixels.
  89. */
  90. /* void setElementPosition (in nsIDOMElement aElement, in long aX, in long aY); */
  91. NS_IMETHOD SetElementPosition(nsIDOMElement *aElement, PRInt32 aX, PRInt32 aY) = 0;
  92. /**
  93. * returns the absolute z-index of a positioned element. Never returns 'auto'.
  94. * @return the z-index of the element
  95. * @param aElement [IN] the element.
  96. */
  97. /* long getElementZIndex (in nsIDOMElement aElement); */
  98. NS_IMETHOD GetElementZIndex(nsIDOMElement *aElement, PRInt32 *_retval) = 0;
  99. /**
  100. * sets the z-index of an element.
  101. * @param aElement [IN] the element
  102. * @param aZorder [IN] the z-index
  103. */
  104. /* void setElementZIndex (in nsIDOMElement aElement, in long aZorder); */
  105. NS_IMETHOD SetElementZIndex(nsIDOMElement *aElement, PRInt32 aZorder) = 0;
  106. /**
  107. * adds aChange to the z-index of an arbitrary element.
  108. * @return the new z-index of the element
  109. * @param aElement [IN] the element
  110. * @param aChange [IN] relative change to apply to current z-index of
  111. * the element
  112. */
  113. /* long relativeChangeElementZIndex (in nsIDOMElement aElement, in long aChange); */
  114. NS_IMETHOD RelativeChangeElementZIndex(nsIDOMElement *aElement, PRInt32 aChange, PRInt32 *_retval) = 0;
  115. /**
  116. * shows a grabber attached to an arbitrary element. The grabber is an image
  117. * positioned on the left hand side of the top border of the element. Dragging
  118. * and dropping it allows to change the element's absolute position in the
  119. * document. See chrome://editor/content/images/grabber.gif
  120. * @param aElement [IN] the element
  121. */
  122. /* void showGrabberOnElement (in nsIDOMElement aElement); */
  123. NS_IMETHOD ShowGrabberOnElement(nsIDOMElement *aElement) = 0;
  124. /**
  125. * hide the grabber if it shown.
  126. */
  127. /* void hideGrabber (); */
  128. NS_IMETHOD HideGrabber(void) = 0;
  129. /**
  130. * refreshes the grabber if it shown, possibly updating its position or
  131. * even hiding it.
  132. */
  133. /* void refreshGrabber (); */
  134. NS_IMETHOD RefreshGrabber(void) = 0;
  135. };
  136. /* Use this macro when declaring classes that implement this interface. */
  137. #define NS_DECL_NSIHTMLABSPOSEDITOR \
  138. NS_IMETHOD GetSelectionContainerAbsolutelyPositioned(PRBool *aSelectionContainerAbsolutelyPositioned); \
  139. NS_IMETHOD GetPositionedElement(nsIDOMElement * *aPositionedElement); \
  140. NS_IMETHOD GetAbsolutePositioningEnabled(PRBool *aAbsolutePositioningEnabled); \
  141. NS_IMETHOD SetAbsolutePositioningEnabled(PRBool aAbsolutePositioningEnabled); \
  142. NS_IMETHOD GetSnapToGridEnabled(PRBool *aSnapToGridEnabled); \
  143. NS_IMETHOD SetSnapToGridEnabled(PRBool aSnapToGridEnabled); \
  144. NS_IMETHOD GetGridSize(PRUint32 *aGridSize); \
  145. NS_IMETHOD SetGridSize(PRUint32 aGridSize); \
  146. NS_IMETHOD GetAbsolutelyPositionedSelectionContainer(nsIDOMElement * *aAbsolutelyPositionedSelectionContainer); \
  147. NS_IMETHOD AbsolutePositionSelection(PRBool aEnabled); \
  148. NS_IMETHOD RelativeChangeZIndex(PRInt32 aChange); \
  149. NS_IMETHOD AbsolutelyPositionElement(nsIDOMElement *aElement, PRBool aEnabled); \
  150. NS_IMETHOD SetElementPosition(nsIDOMElement *aElement, PRInt32 aX, PRInt32 aY); \
  151. NS_IMETHOD GetElementZIndex(nsIDOMElement *aElement, PRInt32 *_retval); \
  152. NS_IMETHOD SetElementZIndex(nsIDOMElement *aElement, PRInt32 aZorder); \
  153. NS_IMETHOD RelativeChangeElementZIndex(nsIDOMElement *aElement, PRInt32 aChange, PRInt32 *_retval); \
  154. NS_IMETHOD ShowGrabberOnElement(nsIDOMElement *aElement); \
  155. NS_IMETHOD HideGrabber(void); \
  156. NS_IMETHOD RefreshGrabber(void);
  157. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  158. #define NS_FORWARD_NSIHTMLABSPOSEDITOR(_to) \
  159. NS_IMETHOD GetSelectionContainerAbsolutelyPositioned(PRBool *aSelectionContainerAbsolutelyPositioned) { return _to GetSelectionContainerAbsolutelyPositioned(aSelectionContainerAbsolutelyPositioned); } \
  160. NS_IMETHOD GetPositionedElement(nsIDOMElement * *aPositionedElement) { return _to GetPositionedElement(aPositionedElement); } \
  161. NS_IMETHOD GetAbsolutePositioningEnabled(PRBool *aAbsolutePositioningEnabled) { return _to GetAbsolutePositioningEnabled(aAbsolutePositioningEnabled); } \
  162. NS_IMETHOD SetAbsolutePositioningEnabled(PRBool aAbsolutePositioningEnabled) { return _to SetAbsolutePositioningEnabled(aAbsolutePositioningEnabled); } \
  163. NS_IMETHOD GetSnapToGridEnabled(PRBool *aSnapToGridEnabled) { return _to GetSnapToGridEnabled(aSnapToGridEnabled); } \
  164. NS_IMETHOD SetSnapToGridEnabled(PRBool aSnapToGridEnabled) { return _to SetSnapToGridEnabled(aSnapToGridEnabled); } \
  165. NS_IMETHOD GetGridSize(PRUint32 *aGridSize) { return _to GetGridSize(aGridSize); } \
  166. NS_IMETHOD SetGridSize(PRUint32 aGridSize) { return _to SetGridSize(aGridSize); } \
  167. NS_IMETHOD GetAbsolutelyPositionedSelectionContainer(nsIDOMElement * *aAbsolutelyPositionedSelectionContainer) { return _to GetAbsolutelyPositionedSelectionContainer(aAbsolutelyPositionedSelectionContainer); } \
  168. NS_IMETHOD AbsolutePositionSelection(PRBool aEnabled) { return _to AbsolutePositionSelection(aEnabled); } \
  169. NS_IMETHOD RelativeChangeZIndex(PRInt32 aChange) { return _to RelativeChangeZIndex(aChange); } \
  170. NS_IMETHOD AbsolutelyPositionElement(nsIDOMElement *aElement, PRBool aEnabled) { return _to AbsolutelyPositionElement(aElement, aEnabled); } \
  171. NS_IMETHOD SetElementPosition(nsIDOMElement *aElement, PRInt32 aX, PRInt32 aY) { return _to SetElementPosition(aElement, aX, aY); } \
  172. NS_IMETHOD GetElementZIndex(nsIDOMElement *aElement, PRInt32 *_retval) { return _to GetElementZIndex(aElement, _retval); } \
  173. NS_IMETHOD SetElementZIndex(nsIDOMElement *aElement, PRInt32 aZorder) { return _to SetElementZIndex(aElement, aZorder); } \
  174. NS_IMETHOD RelativeChangeElementZIndex(nsIDOMElement *aElement, PRInt32 aChange, PRInt32 *_retval) { return _to RelativeChangeElementZIndex(aElement, aChange, _retval); } \
  175. NS_IMETHOD ShowGrabberOnElement(nsIDOMElement *aElement) { return _to ShowGrabberOnElement(aElement); } \
  176. NS_IMETHOD HideGrabber(void) { return _to HideGrabber(); } \
  177. NS_IMETHOD RefreshGrabber(void) { return _to RefreshGrabber(); }
  178. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  179. #define NS_FORWARD_SAFE_NSIHTMLABSPOSEDITOR(_to) \
  180. NS_IMETHOD GetSelectionContainerAbsolutelyPositioned(PRBool *aSelectionContainerAbsolutelyPositioned) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSelectionContainerAbsolutelyPositioned(aSelectionContainerAbsolutelyPositioned); } \
  181. NS_IMETHOD GetPositionedElement(nsIDOMElement * *aPositionedElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPositionedElement(aPositionedElement); } \
  182. NS_IMETHOD GetAbsolutePositioningEnabled(PRBool *aAbsolutePositioningEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAbsolutePositioningEnabled(aAbsolutePositioningEnabled); } \
  183. NS_IMETHOD SetAbsolutePositioningEnabled(PRBool aAbsolutePositioningEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAbsolutePositioningEnabled(aAbsolutePositioningEnabled); } \
  184. NS_IMETHOD GetSnapToGridEnabled(PRBool *aSnapToGridEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSnapToGridEnabled(aSnapToGridEnabled); } \
  185. NS_IMETHOD SetSnapToGridEnabled(PRBool aSnapToGridEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSnapToGridEnabled(aSnapToGridEnabled); } \
  186. NS_IMETHOD GetGridSize(PRUint32 *aGridSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGridSize(aGridSize); } \
  187. NS_IMETHOD SetGridSize(PRUint32 aGridSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetGridSize(aGridSize); } \
  188. NS_IMETHOD GetAbsolutelyPositionedSelectionContainer(nsIDOMElement * *aAbsolutelyPositionedSelectionContainer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAbsolutelyPositionedSelectionContainer(aAbsolutelyPositionedSelectionContainer); } \
  189. NS_IMETHOD AbsolutePositionSelection(PRBool aEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->AbsolutePositionSelection(aEnabled); } \
  190. NS_IMETHOD RelativeChangeZIndex(PRInt32 aChange) { return !_to ? NS_ERROR_NULL_POINTER : _to->RelativeChangeZIndex(aChange); } \
  191. NS_IMETHOD AbsolutelyPositionElement(nsIDOMElement *aElement, PRBool aEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->AbsolutelyPositionElement(aElement, aEnabled); } \
  192. NS_IMETHOD SetElementPosition(nsIDOMElement *aElement, PRInt32 aX, PRInt32 aY) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetElementPosition(aElement, aX, aY); } \
  193. NS_IMETHOD GetElementZIndex(nsIDOMElement *aElement, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetElementZIndex(aElement, _retval); } \
  194. NS_IMETHOD SetElementZIndex(nsIDOMElement *aElement, PRInt32 aZorder) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetElementZIndex(aElement, aZorder); } \
  195. NS_IMETHOD RelativeChangeElementZIndex(nsIDOMElement *aElement, PRInt32 aChange, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RelativeChangeElementZIndex(aElement, aChange, _retval); } \
  196. NS_IMETHOD ShowGrabberOnElement(nsIDOMElement *aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowGrabberOnElement(aElement); } \
  197. NS_IMETHOD HideGrabber(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->HideGrabber(); } \
  198. NS_IMETHOD RefreshGrabber(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->RefreshGrabber(); }
  199. #if 0
  200. /* Use the code below as a template for the implementation class for this interface. */
  201. /* Header file */
  202. class nsHTMLAbsPosEditor : public nsIHTMLAbsPosEditor
  203. {
  204. public:
  205. NS_DECL_ISUPPORTS
  206. NS_DECL_NSIHTMLABSPOSEDITOR
  207. nsHTMLAbsPosEditor();
  208. private:
  209. ~nsHTMLAbsPosEditor();
  210. protected:
  211. /* additional members */
  212. };
  213. /* Implementation file */
  214. NS_IMPL_ISUPPORTS1(nsHTMLAbsPosEditor, nsIHTMLAbsPosEditor)
  215. nsHTMLAbsPosEditor::nsHTMLAbsPosEditor()
  216. {
  217. /* member initializers and constructor code */
  218. }
  219. nsHTMLAbsPosEditor::~nsHTMLAbsPosEditor()
  220. {
  221. /* destructor code */
  222. }
  223. /* readonly attribute boolean selectionContainerAbsolutelyPositioned; */
  224. NS_IMETHODIMP nsHTMLAbsPosEditor::GetSelectionContainerAbsolutelyPositioned(PRBool *aSelectionContainerAbsolutelyPositioned)
  225. {
  226. return NS_ERROR_NOT_IMPLEMENTED;
  227. }
  228. /* readonly attribute nsIDOMElement positionedElement; */
  229. NS_IMETHODIMP nsHTMLAbsPosEditor::GetPositionedElement(nsIDOMElement * *aPositionedElement)
  230. {
  231. return NS_ERROR_NOT_IMPLEMENTED;
  232. }
  233. /* attribute boolean absolutePositioningEnabled; */
  234. NS_IMETHODIMP nsHTMLAbsPosEditor::GetAbsolutePositioningEnabled(PRBool *aAbsolutePositioningEnabled)
  235. {
  236. return NS_ERROR_NOT_IMPLEMENTED;
  237. }
  238. NS_IMETHODIMP nsHTMLAbsPosEditor::SetAbsolutePositioningEnabled(PRBool aAbsolutePositioningEnabled)
  239. {
  240. return NS_ERROR_NOT_IMPLEMENTED;
  241. }
  242. /* attribute boolean snapToGridEnabled; */
  243. NS_IMETHODIMP nsHTMLAbsPosEditor::GetSnapToGridEnabled(PRBool *aSnapToGridEnabled)
  244. {
  245. return NS_ERROR_NOT_IMPLEMENTED;
  246. }
  247. NS_IMETHODIMP nsHTMLAbsPosEditor::SetSnapToGridEnabled(PRBool aSnapToGridEnabled)
  248. {
  249. return NS_ERROR_NOT_IMPLEMENTED;
  250. }
  251. /* attribute unsigned long gridSize; */
  252. NS_IMETHODIMP nsHTMLAbsPosEditor::GetGridSize(PRUint32 *aGridSize)
  253. {
  254. return NS_ERROR_NOT_IMPLEMENTED;
  255. }
  256. NS_IMETHODIMP nsHTMLAbsPosEditor::SetGridSize(PRUint32 aGridSize)
  257. {
  258. return NS_ERROR_NOT_IMPLEMENTED;
  259. }
  260. /* readonly attribute nsIDOMElement absolutelyPositionedSelectionContainer; */
  261. NS_IMETHODIMP nsHTMLAbsPosEditor::GetAbsolutelyPositionedSelectionContainer(nsIDOMElement * *aAbsolutelyPositionedSelectionContainer)
  262. {
  263. return NS_ERROR_NOT_IMPLEMENTED;
  264. }
  265. /* void absolutePositionSelection (in boolean aEnabled); */
  266. NS_IMETHODIMP nsHTMLAbsPosEditor::AbsolutePositionSelection(PRBool aEnabled)
  267. {
  268. return NS_ERROR_NOT_IMPLEMENTED;
  269. }
  270. /* void relativeChangeZIndex (in long aChange); */
  271. NS_IMETHODIMP nsHTMLAbsPosEditor::RelativeChangeZIndex(PRInt32 aChange)
  272. {
  273. return NS_ERROR_NOT_IMPLEMENTED;
  274. }
  275. /* void absolutelyPositionElement (in nsIDOMElement aElement, in boolean aEnabled); */
  276. NS_IMETHODIMP nsHTMLAbsPosEditor::AbsolutelyPositionElement(nsIDOMElement *aElement, PRBool aEnabled)
  277. {
  278. return NS_ERROR_NOT_IMPLEMENTED;
  279. }
  280. /* void setElementPosition (in nsIDOMElement aElement, in long aX, in long aY); */
  281. NS_IMETHODIMP nsHTMLAbsPosEditor::SetElementPosition(nsIDOMElement *aElement, PRInt32 aX, PRInt32 aY)
  282. {
  283. return NS_ERROR_NOT_IMPLEMENTED;
  284. }
  285. /* long getElementZIndex (in nsIDOMElement aElement); */
  286. NS_IMETHODIMP nsHTMLAbsPosEditor::GetElementZIndex(nsIDOMElement *aElement, PRInt32 *_retval)
  287. {
  288. return NS_ERROR_NOT_IMPLEMENTED;
  289. }
  290. /* void setElementZIndex (in nsIDOMElement aElement, in long aZorder); */
  291. NS_IMETHODIMP nsHTMLAbsPosEditor::SetElementZIndex(nsIDOMElement *aElement, PRInt32 aZorder)
  292. {
  293. return NS_ERROR_NOT_IMPLEMENTED;
  294. }
  295. /* long relativeChangeElementZIndex (in nsIDOMElement aElement, in long aChange); */
  296. NS_IMETHODIMP nsHTMLAbsPosEditor::RelativeChangeElementZIndex(nsIDOMElement *aElement, PRInt32 aChange, PRInt32 *_retval)
  297. {
  298. return NS_ERROR_NOT_IMPLEMENTED;
  299. }
  300. /* void showGrabberOnElement (in nsIDOMElement aElement); */
  301. NS_IMETHODIMP nsHTMLAbsPosEditor::ShowGrabberOnElement(nsIDOMElement *aElement)
  302. {
  303. return NS_ERROR_NOT_IMPLEMENTED;
  304. }
  305. /* void hideGrabber (); */
  306. NS_IMETHODIMP nsHTMLAbsPosEditor::HideGrabber()
  307. {
  308. return NS_ERROR_NOT_IMPLEMENTED;
  309. }
  310. /* void refreshGrabber (); */
  311. NS_IMETHODIMP nsHTMLAbsPosEditor::RefreshGrabber()
  312. {
  313. return NS_ERROR_NOT_IMPLEMENTED;
  314. }
  315. /* End of implementation class template. */
  316. #endif
  317. #endif /* __gen_nsIHTMLAbsPosEditor_h__ */