6,817
edits
Changes
From Gramps
m
→מקובל API: translation
מרכיב משותף זה מיושם באמצעות [http://www.gramps-project.org/docs/gen/gen_plug.html#gen.plug.docgen.basedoc.BaseDoc מחלקת BaseDoc], שמכיל בין היתר ראש וסיומת עמוד של מסמכים בסיסיים , ושיטות טיפול בגיליון סגנונות. המנשק מאחסן גם את התיאור הממשי של העמוד (גיליון נייר בדפוס).
{{man note|הערה!| את שיטות <tt>BaseDoc.open</tt> ו-<tt>BaseDoc.close</tt> יש ליישם על ידי מחוללי המסמכים המדורגים משנהמסמכים מחלקה משנית.}}
===עמוד===
[[Image:Doc_paper.png|left|thumb|400px]] Description of the paper תיאור הדף, which every report will be rendered onעליו יתוצגכל דוח יועבר אליו, is stored by an instance of the מאוחסן על ידי אדגם של [http://www.gramps-project.org/docs/gen/gen_plug.html#gen.plug.docgen.paperstyle.PaperStyle PaperStyle classpaperstyle Classyle]. This instance is available via the אדגם זה זמין דרך תכונת מחקלה <tt>BaseDocbasedoc.paper_style</tt> class attribute. The chosen PaperStyle is given to the document generator at initializationסוג ה־PaperStyle שנבחר מועבר למחולל המסמכים בעת האתחול, and is handled by the reporting frameworkומטופל על ידי מסגרת פתוח הדוחות.
The <tt>PaperStyle</tt> holds information on the size of the paper ([http://www.gramps-project.org/docs/gen/gen_plug.html#gen.plug.docgen.paperstyle.PaperStyle PaperSize class] instance), the size of the margins, and the orientation of the paper. Use the proper accessor methods to get the values. To get the metrics of the usable area of a paper (page without the margins) one can also use the [http://www.gramps-project.org/docs/gen/gen_plug.html#gen.plug.docgen.paperstyle.PaperStyle.get_usable_width PaperStyle.get_usable_width] and [http://www.gramps-project.org/docs/gen/gen_plug.html#gen.plug.docgen.paperstyle.PaperStyle.get_usable_height PaperStyle.get_usable_height] convenience methods. Width and height are always given according to the orientation of the paper, thus width is always the horizontal, and height is always the vertical dimension.