nsHTMLParts.h (8000B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 /* factory functions for rendering object classes */ 8 9 #ifndef nsHTMLParts_h___ 10 #define nsHTMLParts_h___ 11 12 #include "nsFrameState.h" 13 #include "nsISupports.h" 14 #include "nscore.h" 15 16 class nsAtom; 17 class nsCheckboxRadioFrame; 18 class nsComboboxControlFrame; 19 class nsContainerFrame; 20 class nsIChannel; 21 class nsIContent; 22 class nsIFragmentContentSink; 23 class nsIFrame; 24 class nsIURI; 25 class nsListControlFrame; 26 class nsNodeInfoManager; 27 class nsTableColFrame; 28 namespace mozilla { 29 class ComputedStyle; 30 class PresShell; 31 class PrintedSheetFrame; 32 class ViewportFrame; 33 34 namespace dom { 35 class Document; 36 } 37 } // namespace mozilla 38 39 // Factory methods for creating html layout objects 40 41 // Create a frame that supports "display: block" layout behavior 42 class nsBlockFrame; 43 nsBlockFrame* NS_NewBlockFrame(mozilla::PresShell* aPresShell, 44 mozilla::ComputedStyle* aStyle); 45 46 // Special Generated Content Node. It contains text taken from an 47 // attribute of its *grandparent* content node. 48 nsresult NS_NewAttributeContent(nsNodeInfoManager* aNodeInfoManager, 49 int32_t aNameSpaceID, nsAtom* aAttrName, 50 nsAtom* aFallback, nsIContent** aResult); 51 52 nsIFrame* NS_NewBRFrame(mozilla::PresShell* aPresShell, 53 mozilla::ComputedStyle* aStyle); 54 55 nsIFrame* NS_NewCommentFrame(mozilla::PresShell* aPresShell, 56 mozilla::ComputedStyle* aStyle); 57 58 // <frame> and <iframe> 59 nsIFrame* NS_NewSubDocumentFrame(mozilla::PresShell* aPresShell, 60 mozilla::ComputedStyle* aStyle); 61 // <frameset> 62 nsIFrame* NS_NewHTMLFramesetFrame(mozilla::PresShell* aPresShell, 63 mozilla::ComputedStyle* aStyle); 64 65 mozilla::ViewportFrame* NS_NewViewportFrame(mozilla::PresShell* aPresShell, 66 mozilla::ComputedStyle* aStyle); 67 class nsCanvasFrame; 68 nsCanvasFrame* NS_NewCanvasFrame(mozilla::PresShell* aPresShell, 69 mozilla::ComputedStyle* aStyle); 70 nsIFrame* NS_NewImageFrame(mozilla::PresShell* aPresShell, 71 mozilla::ComputedStyle* aStyle); 72 class nsInlineFrame; 73 nsInlineFrame* NS_NewInlineFrame(mozilla::PresShell* aPresShell, 74 mozilla::ComputedStyle* aStyle); 75 nsIFrame* NS_NewTextFrame(mozilla::PresShell* aPresShell, 76 mozilla::ComputedStyle* aStyle); 77 nsIFrame* NS_NewContinuingTextFrame(mozilla::PresShell* aPresShell, 78 mozilla::ComputedStyle* aStyle); 79 nsIFrame* NS_NewEmptyFrame(mozilla::PresShell* aPresShell, 80 mozilla::ComputedStyle* aStyle); 81 nsIFrame* NS_NewWBRFrame(mozilla::PresShell* aPresShell, 82 mozilla::ComputedStyle* aStyle); 83 84 nsBlockFrame* NS_NewColumnSetWrapperFrame(mozilla::PresShell* aPresShell, 85 mozilla::ComputedStyle* aStyle, 86 nsFrameState aStateFlags); 87 nsContainerFrame* NS_NewColumnSetFrame(mozilla::PresShell* aPresShell, 88 mozilla::ComputedStyle* aStyle, 89 nsFrameState aStateFlags); 90 91 class nsPageSequenceFrame; 92 nsPageSequenceFrame* NS_NewPageSequenceFrame(mozilla::PresShell* aPresShell, 93 mozilla::ComputedStyle* aStyle); 94 95 mozilla::PrintedSheetFrame* NS_NewPrintedSheetFrame( 96 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle); 97 98 class nsPageFrame; 99 nsPageFrame* NS_NewPageFrame(mozilla::PresShell* aPresShell, 100 mozilla::ComputedStyle* aStyle); 101 class nsPageContentFrame; 102 nsPageContentFrame* NS_NewPageContentFrame( 103 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle, 104 already_AddRefed<const nsAtom> aPageName); 105 nsIFrame* NS_NewPageBreakFrame(mozilla::PresShell* aPresShell, 106 mozilla::ComputedStyle* aStyle); 107 class nsFirstLetterFrame; 108 nsFirstLetterFrame* NS_NewFirstLetterFrame(mozilla::PresShell*, 109 mozilla::ComputedStyle*); 110 class nsFirstLetterFrame; 111 nsFirstLetterFrame* NS_NewFloatingFirstLetterFrame(mozilla::PresShell*, 112 mozilla::ComputedStyle*); 113 class nsFirstLineFrame; 114 nsFirstLineFrame* NS_NewFirstLineFrame(mozilla::PresShell* aPresShell, 115 mozilla::ComputedStyle* aStyle); 116 117 // forms 118 nsCheckboxRadioFrame* NS_NewCheckboxRadioFrame(mozilla::PresShell* aPresShell, 119 mozilla::ComputedStyle* aStyle); 120 nsIFrame* NS_NewImageControlFrame(mozilla::PresShell* aPresShell, 121 mozilla::ComputedStyle* aStyle); 122 nsContainerFrame* NS_NewFieldSetFrame(mozilla::PresShell* aPresShell, 123 mozilla::ComputedStyle* aStyle); 124 nsIFrame* NS_NewFileControlFrame(mozilla::PresShell* aPresShell, 125 mozilla::ComputedStyle* aStyle); 126 nsIFrame* NS_NewColorControlFrame(mozilla::PresShell* aPresShell, 127 mozilla::ComputedStyle* aStyle); 128 nsIFrame* NS_NewTextControlFrame(mozilla::PresShell* aPresShell, 129 mozilla::ComputedStyle* aStyle); 130 nsListControlFrame* NS_NewListControlFrame(mozilla::PresShell* aPresShell, 131 mozilla::ComputedStyle* aStyle); 132 nsComboboxControlFrame* NS_NewComboboxControlFrame( 133 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle); 134 nsIFrame* NS_NewProgressFrame(mozilla::PresShell* aPresShell, 135 mozilla::ComputedStyle* aStyle); 136 nsIFrame* NS_NewMeterFrame(mozilla::PresShell* aPresShell, 137 mozilla::ComputedStyle* aStyle); 138 nsIFrame* NS_NewRangeFrame(mozilla::PresShell* aPresShell, 139 mozilla::ComputedStyle* aStyle); 140 nsIFrame* NS_NewNumberControlFrame(mozilla::PresShell* aPresShell, 141 mozilla::ComputedStyle* aStyle); 142 nsIFrame* NS_NewDateTimeControlFrame(mozilla::PresShell* aPresShell, 143 mozilla::ComputedStyle* aStyle); 144 nsIFrame* NS_NewSearchControlFrame(mozilla::PresShell* aPresShell, 145 mozilla::ComputedStyle* aStyle); 146 147 // Table frame factories 148 class nsTableWrapperFrame; 149 nsTableWrapperFrame* NS_NewTableWrapperFrame(mozilla::PresShell* aPresShell, 150 mozilla::ComputedStyle* aStyle); 151 class nsTableFrame; 152 nsTableFrame* NS_NewTableFrame(mozilla::PresShell* aPresShell, 153 mozilla::ComputedStyle* aStyle); 154 nsTableColFrame* NS_NewTableColFrame(mozilla::PresShell* aPresShell, 155 mozilla::ComputedStyle* aStyle); 156 class nsTableColGroupFrame; 157 nsTableColGroupFrame* NS_NewTableColGroupFrame(mozilla::PresShell* aPresShell, 158 mozilla::ComputedStyle* aStyle); 159 class nsTableRowFrame; 160 nsTableRowFrame* NS_NewTableRowFrame(mozilla::PresShell* aPresShell, 161 mozilla::ComputedStyle* aStyle); 162 class nsTableRowGroupFrame; 163 nsTableRowGroupFrame* NS_NewTableRowGroupFrame(mozilla::PresShell* aPresShell, 164 mozilla::ComputedStyle* aStyle); 165 class nsTableCellFrame; 166 nsTableCellFrame* NS_NewTableCellFrame(mozilla::PresShell* aPresShell, 167 mozilla::ComputedStyle* aStyle, 168 nsTableFrame* aTableFrame); 169 170 #endif /* nsHTMLParts_h___ */