6,817
edits
Changes
m
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ולכן הרוחב הוא תמיד הממד האופקי והגובה הוא תמיד הממד האנכי.
Text reports do not need to care about paper propertiesלדוחות מלל אין צורך לדאוג למאפייני דף, as the document generator שכן מחולל המסמכים (or the external viewerאו המשקף החיצוני) paginates the report according to those propertiesמספרר את הדוח בהתאם לאותם מאפיינים. Whileמאידך, on the other handדוחות חזותיים כן נדרשים להתחשב במאפייני הדף בעת יצירת רכיבים חזותיים, graphical reports do need to take paper properties into account when creating graphical elements, i.e. they should not draw on the marginsכלומר הם לא אמורים לגלוש לשוליים.<!--[[Image:gramps-devel.png|left|22px]] ''document generator should hide paper properies for graphical reports too'מחולל מסמכים צריך להסתיר גם מאפייני דף עבור דוחות חזותיים'--> The origin of the coordinate system is the top left corner of the usable area.
→מקובל API: translation
מתוך הסוגים שלעיל, רק דוחות מילוליים, דוחות חזותיים ותרשימים משתמשים ב־API דוחות (מסמך), מכיוון שדוחות מרשתת כותבים את הפלט ישירות לקבצים, בעוד שספר דוחות הוא פשוט שילוב של דוחות מילוליים ודוחות חזותיים שמקובצים יחדיו כ{{man label|ספר דוחות}}.
== API מקובל משותף ==
לעת עתה שילוב רכיבים מילוליים וחזותיים בתוך מסמך אחד לא נתמך (לתוכניות עתידיות נא עיין בעיצוב מחדש של API דוחות), לכן דוחות מילוליים וחזותיים מיושמים באמצעות מנשקי API נפרדים, אם כי יש להם מרכיב משותף.
מרכיב משותף זה מיושם באמצעות [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]] תיאור הדף אליו יועבר תיצוג כל דוח, מאוחסן על ידי אדגם [http://www.gramps-project.org/docs/ gen/gen_plug.html#gen.plug.docgen.paperstyle.paperstyle Classyle]. אדגם זה זמין דרך תכונת מחלקה <tt>basedoc.paper_style</tt>. סוג ה־PaperStyle שנבחר מועבר למחולל המסמכים בעת האתחול, ומטופל על ידי מסגרת פתוח הדוחות.
מקור מערכת הצירים הוא תמיד הפינה השמאלית העליונה של האזור בו ניתן להשתמש.
{{-}}