gtkmm-documentation - master - Tutorial - Swedish

← Back to actions


Latest POT file
Uploaded file by Anders Jonsson on 2023-03-05 11:22:43+00:00
nn1# Swedish translation for gtkmm-documentation.
2# Copyright © 2022 gtkmm-documentation's COPYRIGHT HOLDER
3# This file is distributed under the same license as the gtkmm-documentation pac
 >kage.
4# Anders Jonsson <anders.jonsson@norsjovallen.se>, 2022.
5#
1msgid ""6msgid ""
2msgstr ""7msgstr ""
n3"Project-Id-Version: PACKAGE VERSION\n"n8"Project-Id-Version: gtkmm-documentation master\n"
4"POT-Creation-Date: 2025-07-08 14:05+0000\n"9"POT-Creation-Date: 2025-07-08 14:05+0000\n"
n5"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"n10"PO-Revision-Date: 2023-03-05 12:22+0100\n"
6"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"11"Last-Translator: Anders Jonsson <anders.jonsson@norsjovallen.se>\n"
7"Language-Team: LANGUAGE <LL@li.org>\n"12"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
13"Language: sv\n"
8"MIME-Version: 1.0\n"14"MIME-Version: 1.0\n"
9"Content-Type: text/plain; charset=UTF-8\n"15"Content-Type: text/plain; charset=UTF-8\n"
10"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
nn17"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18"X-Generator: Poedit 3.2.2\n"
1119
12#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR220#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
13msgctxt "_"21msgctxt "_"
14msgid "translator-credits"22msgid "translator-credits"
n15msgstr ""n23msgstr "Anders Jonsson <anders.jonsson@norsjovallen.se>, 2022, 2023"
1624
17#. (itstool) path: info/title25#. (itstool) path: info/title
18#: C/index-in.docbook:4626#: C/index-in.docbook:46
19msgid "Programming with <application>gtkmm</application> 4"27msgid "Programming with <application>gtkmm</application> 4"
n20msgstr ""n28msgstr "Programmering med <application>gtkmm</application> 4"
2129
22#. (itstool) path: authorgroup/author30#. (itstool) path: authorgroup/author
23#: C/index-in.docbook:4831#: C/index-in.docbook:48
nn32msgid ""
24msgid "<personname><firstname>Murray</firstname><surname>Cumming</surname></pers33"<personname><firstname>Murray</firstname><surname>Cumming</surname></"
>onname>" 
34"personname>"
25msgstr ""35msgstr ""
nn36"<personname><firstname>Murray</firstname><surname>Cumming</surname></"
37"personname>"
2638
27#. (itstool) path: authorgroup/author39#. (itstool) path: authorgroup/author
28#: C/index-in.docbook:5140#: C/index-in.docbook:51
n29msgid "<personname><firstname>Bernhard</firstname><surname>Rieder</surname></pern41#, fuzzy
>sonname> <contrib>Chapter on \"Timeouts\".</contrib>" 
42msgid ""
43"<personname><firstname>Bernhard</firstname><surname>Rieder</surname></"
44"personname> <contrib>Chapter on \"Timeouts\".</contrib>"
30msgstr ""45msgstr ""
nn46"<personname><firstname>Bernhard</firstname><surname>Rieder</surname></"
47"personname> <contrib>Kapitlet ”Timeout”.</contrib>"
3148
32#. (itstool) path: authorgroup/author49#. (itstool) path: authorgroup/author
33#: C/index-in.docbook:5550#: C/index-in.docbook:55
n34msgid "<personname><firstname>Jonathon</firstname><surname>Jongsma</surname></pen51msgid ""
>rsonname> <contrib>Chapter on \"Drawing with Cairo\".</contrib> <contrib>Chapter 
> on \"Working with gtkmm's Source Code\".</contrib> <contrib>Chapter on \"Recent 
> Files\".</contrib>" 
52"<personname><firstname>Jonathon</firstname><surname>Jongsma</surname></"
53"personname> <contrib>Chapter on \"Drawing with Cairo\".</contrib> "
54"<contrib>Chapter on \"Working with gtkmm's Source Code\".</contrib> "
55"<contrib>Chapter on \"Recent Files\".</contrib>"
35msgstr ""56msgstr ""
nn57"<personname><firstname>Jonathon</firstname><surname>Jongsma</surname></"
58"personname> <contrib>Kapitlet ”Rita med Cairo”.</contrib> <contrib>Kapitlet "
59"”Arbeta med gtkmm:s källkod”.</contrib> <contrib>Kapitlet ”Senaste filer”.</"
60"contrib>"
3661
37#. (itstool) path: authorgroup/author62#. (itstool) path: authorgroup/author
38#: C/index-in.docbook:6163#: C/index-in.docbook:61
n39msgid "<personname><firstname>Ole</firstname><surname>Laursen</surname></personnn64msgid ""
>ame> <contrib>Parts of chapter on \"Internationalization\".</contrib>" 
65"<personname><firstname>Ole</firstname><surname>Laursen</surname></"
66"personname> <contrib>Parts of chapter on \"Internationalization\".</contrib>"
40msgstr ""67msgstr ""
nn68"<personname><firstname>Ole</firstname><surname>Laursen</surname></"
69"personname> <contrib>Delar av kapitlet ”Internationalisering”.</contrib>"
4170
42#. (itstool) path: authorgroup/author71#. (itstool) path: authorgroup/author
43#: C/index-in.docbook:6572#: C/index-in.docbook:65
n44msgid "<personname><firstname>Marko</firstname><surname>Anastasov</surname></pern73msgid ""
>sonname> <contrib>Chapter on \"Printing\".</contrib> <contrib>Parts of chapter o 
>n \"Internationalization\".</contrib>" 
74"<personname><firstname>Marko</firstname><surname>Anastasov</surname></"
75"personname> <contrib>Chapter on \"Printing\".</contrib> <contrib>Parts of "
76"chapter on \"Internationalization\".</contrib>"
45msgstr ""77msgstr ""
nn78"<personname><firstname>Marko</firstname><surname>Anastasov</surname></"
79"personname> <contrib>Kapitlet om ”Utskrift”.</contrib> <contrib>Delar av "
80"kapitlet ”Internationalisering”.</contrib>"
4681
47#. (itstool) path: authorgroup/author82#. (itstool) path: authorgroup/author
48#: C/index-in.docbook:7083#: C/index-in.docbook:70
n49msgid "<personname><firstname>Daniel</firstname><surname>Elstner</surname></persn84msgid ""
>onname> <contrib>Section \"Build Structure\" of chapter on \"Wrapping C Librarie 
>s with gmmproc\".</contrib>" 
85"<personname><firstname>Daniel</firstname><surname>Elstner</surname></"
86"personname> <contrib>Section \"Build Structure\" of chapter on \"Wrapping C "
87"Libraries with gmmproc\".</contrib>"
50msgstr ""88msgstr ""
nn89"<personname><firstname>Daniel</firstname><surname>Elstner</surname></"
90"personname> <contrib>Avsnittet ”Byggstruktur” i kapitlet ”Omsluta C-"
91"bibliotek med gmmproc”.</contrib>"
5192
52#. (itstool) path: authorgroup/author93#. (itstool) path: authorgroup/author
53#: C/index-in.docbook:7494#: C/index-in.docbook:74
n54msgid "<personname><firstname>Chris</firstname><surname>Vine</surname></personnan95msgid ""
>me> <contrib>Chapter on \"Multi-threaded programs\".</contrib>" 
96"<personname><firstname>Chris</firstname><surname>Vine</surname></personname> "
97"<contrib>Chapter on \"Multi-threaded programs\".</contrib>"
55msgstr ""98msgstr ""
nn99"<personname><firstname>Chris</firstname><surname>Vine</surname></personname> "
100"<contrib>Kapitlet ”Flertrådade program”.</contrib>"
56101
57#. (itstool) path: authorgroup/author102#. (itstool) path: authorgroup/author
58#: C/index-in.docbook:78103#: C/index-in.docbook:78
nn104msgid ""
59msgid "<personname><firstname>David</firstname><surname>King</surname></personna105"<personname><firstname>David</firstname><surname>King</surname></personname> "
>me> <contrib>Section on Gtk::Grid.</contrib>" 
106"<contrib>Section on Gtk::Grid.</contrib>"
60msgstr ""107msgstr ""
nn108"<personname><firstname>David</firstname><surname>King</surname></personname> "
109"<contrib>Avsnittet om Gtk::Grid.</contrib>"
61110
62#. (itstool) path: authorgroup/author111#. (itstool) path: authorgroup/author
63#: C/index-in.docbook:82112#: C/index-in.docbook:82
n64msgid "<personname><firstname>Pedro</firstname><surname>Ferreira</surname></persn113#, fuzzy
>onname> <contrib>Chapter on \"Keyboard Events\".</contrib>" 
114#| msgid ""
115#| "<personname><firstname>Pedro</firstname><surname>Ferreira</surname></"
116#| "personname> <contrib>Chapter on Keyboard Events.</contrib>"
117msgid ""
118"<personname><firstname>Pedro</firstname><surname>Ferreira</surname></"
119"personname> <contrib>Chapter on \"Keyboard Events\".</contrib>"
65msgstr ""120msgstr ""
nn121"<personname><firstname>Pedro</firstname><surname>Ferreira</surname></"
122"personname> <contrib>Kapitlet om tangentbordshändelser.</contrib>"
66123
67#. (itstool) path: authorgroup/author124#. (itstool) path: authorgroup/author
68#: C/index-in.docbook:86125#: C/index-in.docbook:86
n69msgid "<personname><firstname>Kjell</firstname><surname>Ahlstedt</surname></persn126#, fuzzy
>onname> <contrib>Update from gtkmm 3 to gtkmm 4.</contrib> <contrib>Chapter on \ 
>"Building applications\".</contrib> <contrib>Chapter on \"The DropDown Widget\". 
></contrib> <contrib>Chapter on \"ListView, GridView, ColumnView\".</contrib>" 
127#| msgid ""
128#| "<personname><firstname>Kjell</firstname><surname>Ahlstedt</surname></"
129#| "personname> <contrib>Update from gtkmm 3 to gtkmm 4.</contrib> "
130#| "<contrib>Chapter on \"Building applications\".</contrib>"
131msgid ""
132"<personname><firstname>Kjell</firstname><surname>Ahlstedt</surname></"
133"personname> <contrib>Update from gtkmm 3 to gtkmm 4.</contrib> "
134"<contrib>Chapter on \"Building applications\".</contrib> <contrib>Chapter on "
135"\"The DropDown Widget\".</contrib> <contrib>Chapter on \"ListView, GridView, "
136"ColumnView\".</contrib>"
70msgstr ""137msgstr ""
nn138"<personname><firstname>Kjell</firstname><surname>Ahlstedt</surname></"
139"personname> <contrib>Uppdatering från gtkmm 3 till gtkmm 4.</contrib> "
140"<contrib>Kapitlet ”Bygga program”.</contrib>"
71141
72#. (itstool) path: authorgroup/author142#. (itstool) path: authorgroup/author
73#: C/index-in.docbook:93143#: C/index-in.docbook:93
n74msgid "<personname><firstname>Daniel</firstname><surname>Boles</surname></personn144#, fuzzy
>name> <contrib>Notes on need to remove widgets in non-managed wrappers from pare 
>nts to dispose, other tweaks.</contrib>" 
145#| msgid ""
146#| "<personname><firstname>Daniel</firstname><surname>Elstner</surname></"
147#| "personname> <contrib>Section \"Build Structure\" of chapter on \"Wrapping "
148#| "C Libraries with gmmproc\".</contrib>"
149msgid ""
150"<personname><firstname>Daniel</firstname><surname>Boles</surname></"
151"personname> <contrib>Notes on need to remove widgets in non-managed wrappers "
152"from parents to dispose, other tweaks.</contrib>"
75msgstr ""153msgstr ""
nn154"<personname><firstname>Daniel</firstname><surname>Elstner</surname></"
155"personname> <contrib>Avsnittet ”Byggstruktur” i kapitlet ”Omsluta C-"
156"bibliotek med gmmproc”.</contrib>"
76157
77#. (itstool) path: abstract/para158#. (itstool) path: abstract/para
78#: C/index-in.docbook:101159#: C/index-in.docbook:101
n79msgid "This book explains key concepts of the <application>gtkmm</application> <n160#, fuzzy
>phrase role=\"nowrap\">C++</phrase> API for creating user interfaces. It also in 
>troduces the main user interface elements (\"widgets\")." 
161#| msgid ""
162#| "This book explains key concepts of the <application>gtkmm</application> C+"
163#| "+ API for creating user interfaces. It also introduces the main user "
164#| "interface elements (\"widgets\")."
165msgid ""
166"This book explains key concepts of the <application>gtkmm</application> "
167"<phrase role=\"nowrap\">C++</phrase> API for creating user interfaces. It "
168"also introduces the main user interface elements (\"widgets\")."
80msgstr ""169msgstr ""
nn170"Denna bok förklarar nyckelkoncept i <application>gtkmm</application>:s C++-"
171"API för att skapa användargränssnitt. Den introducerar också huvudelementen "
172"i användargränssnitt (”komponenter”)."
81173
82#. (itstool) path: info/copyright174#. (itstool) path: info/copyright
83#: C/index-in.docbook:104175#: C/index-in.docbook:104
nn176msgid ""
84msgid "<year>2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010</year> <holder177"<year>2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010</year> "
>>Murray Cumming</holder>" 
178"<holder>Murray Cumming</holder>"
85msgstr ""179msgstr ""
nn180"<year>2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010</year> "
181"<holder>Murray Cumming</holder>"
86182
87#. (itstool) path: legalnotice/para183#. (itstool) path: legalnotice/para
88#: C/index-in.docbook:110184#: C/index-in.docbook:110
n89msgid "Permission is granted to copy, distribute and/or modify this document undn185#, fuzzy
>er the terms of the GNU Free Documentation License, Version 1.2 or any later ver 
>sion published by the Free Software Foundation; with no Invariant Sections, no F 
>ront-Cover Texts, and no Back-Cover Texts. A copy of the license is included in  
>the section entitled <link linkend=\"chapter-gfdl\">\"GNU Free Documentation Lic 
>ense\"</link>." 
186#| msgid ""
187#| "Permission is granted to copy, distribute and/or modify this document "
188#| "under the terms of the GNU Free Documentation License, Version 1.2 or any "
189#| "later version published by the Free Software Foundation; with no "
190#| "Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You "
191#| "may obtain a copy of the GNU Free Documentation License from the Free "
192#| "Software Foundation by visiting their Web site or by writing to: Free "
193#| "Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA "
194#| "02111-1307, USA."
195msgid ""
196"Permission is granted to copy, distribute and/or modify this document under "
197"the terms of the GNU Free Documentation License, Version 1.2 or any later "
198"version published by the Free Software Foundation; with no Invariant "
199"Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the "
200"license is included in the section entitled <link linkend=\"chapter-"
201"gfdl\">\"GNU Free Documentation License\"</link>."
90msgstr ""202msgstr ""
nn203"Tillstånd att kopiera, distribuera och/eller modifiera detta dokument ges "
204"under villkoren i GNU Free Documentation License, version 1.2 eller senare, "
205"utgivet av Free Software Foundation, utan standardavsnitt och omslagstexter. "
206"Du kan erhålla en kopia av GNU Free Documentation License från Free Software "
207"Foundation genom att besöka deras webbplats eller genom att skriva till: "
208"Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA "
209"02111-1307, USA."
91210
92#. (itstool) path: chapter/title211#. (itstool) path: chapter/title
93#: C/index-in.docbook:122212#: C/index-in.docbook:122
94msgid "Introduction"213msgid "Introduction"
n95msgstr ""n214msgstr "Introduktion"
96215
97#. (itstool) path: section/title216#. (itstool) path: section/title
98#: C/index-in.docbook:125217#: C/index-in.docbook:125
99msgid "This book"218msgid "This book"
n100msgstr ""n219msgstr "Denna bok"
101220
102#. (itstool) path: section/para221#. (itstool) path: section/para
103#: C/index-in.docbook:127222#: C/index-in.docbook:127
n104msgid "This book explains key concepts of the <application>gtkmm</application> <n223#, fuzzy
>phrase role=\"nowrap\">C++</phrase> API for creating user interfaces. It also in 
>troduces the main user interface elements (\"widgets\"). Although it mentions cl 
>asses, constructors, and methods, it does not go into great detail. Therefore, f 
>or full API information you should follow the links into the reference documenta 
>tion." 
224#| msgid ""
225#| "This book explains key concepts of the <application>gtkmm</application> C+"
226#| "+ API for creating user interfaces. It also introduces the main user "
227#| "interface elements (\"widgets\"). Although it mentions classes, "
228#| "constructors, and methods, it does not go into great detail. Therefore, "
229#| "for full API information you should follow the links into the reference "
230#| "documentation."
231msgid ""
232"This book explains key concepts of the <application>gtkmm</application> "
233"<phrase role=\"nowrap\">C++</phrase> API for creating user interfaces. It "
234"also introduces the main user interface elements (\"widgets\"). Although it "
235"mentions classes, constructors, and methods, it does not go into great "
236"detail. Therefore, for full API information you should follow the links into "
237"the reference documentation."
105msgstr ""238msgstr ""
nn239"Denna bok förklarar nyckelkoncept i <application>gtkmm</application>:s C++-"
240"API för att skapa användargränssnitt. Den introducerar också huvudelementen "
241"i användargränssnitt (”komponenter”). Även om den nämner klasser, "
242"konstruktorer och metoder så går den inte på djupet. För fullständig API-"
243"information bör du därmed följa länkarna till referensdokumentationen."
106244
107#. (itstool) path: section/para245#. (itstool) path: section/para
108#: C/index-in.docbook:129246#: C/index-in.docbook:129
n109msgid "This book assumes a good understanding of <phrase role=\"nowrap\">C++</phn247#, fuzzy
>rase>, and how to create <phrase role=\"nowrap\">C++</phrase> programs." 
248#| msgid ""
249#| "This book assumes a good understanding of C++, and how to create C++ "
250#| "programs."
251msgid ""
252"This book assumes a good understanding of <phrase role=\"nowrap\">C++</"
253"phrase>, and how to create <phrase role=\"nowrap\">C++</phrase> programs."
110msgstr ""254msgstr ""
nn255"Denna bok förutsätter en god förståelse av C++ och hur du skapar C++-program."
111256
112#. (itstool) path: section/para257#. (itstool) path: section/para
113#: C/index-in.docbook:131258#: C/index-in.docbook:131
n114msgid "We would very much like to hear of any problems you have learning <applicn259msgid ""
>ation>gtkmm</application> with this document, and would appreciate input regardi 
>ng improvements. Please see the <link linkend=\"chapter-contributing\">Contribut 
>ing</link> section for further information." 
260"We would very much like to hear of any problems you have learning "
261"<application>gtkmm</application> with this document, and would appreciate "
262"input regarding improvements. Please see the <link linkend=\"chapter-"
263"contributing\">Contributing</link> section for further information."
115msgstr ""264msgstr ""
nn265"Vi vill gärna veta om eventuella problem du har när du lär dig "
266"<application>gtkmm</application> med detta dokument, och skulle uppskatta "
267"förslag på förbättringar. Se avsnittet <link linkend=\"chapter-"
268"contributing\">Bidra</link> för mer information."
116269
117#. (itstool) path: section/title270#. (itstool) path: section/title
118#: C/index-in.docbook:139271#: C/index-in.docbook:139
119msgid "gtkmm"272msgid "gtkmm"
n120msgstr ""n273msgstr "gtkmm"
121274
122#. (itstool) path: section/para275#. (itstool) path: section/para
123#: C/index-in.docbook:141276#: C/index-in.docbook:141
n124msgid "<application>gtkmm</application> is a <phrase role=\"nowrap\">C++</phrasen277#, fuzzy
>> wrapper for <link xlink:href=\"http://www.gtk.org/\">GTK</link>, a library use 
>d to create graphical user interfaces. It is licensed using the LGPL license, so 
> you can develop open software, free software, or even commercial non-free softw 
>are using <application>gtkmm</application> without purchasing licenses." 
278#| msgid ""
279#| "<application>gtkmm</application> is a C++ wrapper for <link xlink:"
280#| "href=\"http://www.gtk.org/\">GTK</link>, a library used to create "
281#| "graphical user interfaces. It is licensed using the LGPL license, so you "
282#| "can develop open software, free software, or even commercial non-free "
283#| "software using <application>gtkmm</application> without purchasing "
284#| "licenses."
285msgid ""
286"<application>gtkmm</application> is a <phrase role=\"nowrap\">C++</phrase> "
287"wrapper for <link xlink:href=\"http://www.gtk.org/\">GTK</link>, a library "
288"used to create graphical user interfaces. It is licensed using the LGPL "
289"license, so you can develop open software, free software, or even commercial "
290"non-free software using <application>gtkmm</application> without purchasing "
291"licenses."
125msgstr ""292msgstr ""
nn293"<application>gtkmm</application> är ett C++-omslag för <link xlink:"
294"href=\"http://www.gtk.org/\">GTK</link>, ett bibliotek som används för att "
295"skapa grafiska användargränssnitt. Det är licensierat under licensen LGPL, "
296"så du kan utveckla öppen programvara, fri programvara eller till och med "
297"kommersiell icke-fri programvara med <application>gtkmm</application> utan "
298"att köpa licenser."
126299
127#. (itstool) path: section/para300#. (itstool) path: section/para
128#: C/index-in.docbook:149301#: C/index-in.docbook:149
n129msgid "<application>gtkmm</application> was originally named gtk-- because GTK wn302msgid ""
>as originally named GTK+ and had a + in the name. However, as -- is not easily i 
>ndexed by search engines, the package generally went by the name <application>gt 
>kmm</application>, and that's what we stuck with." 
303"<application>gtkmm</application> was originally named gtk-- because GTK was "
304"originally named GTK+ and had a + in the name. However, as -- is not easily "
305"indexed by search engines, the package generally went by the name "
306"<application>gtkmm</application>, and that's what we stuck with."
130msgstr ""307msgstr ""
nn308"<application>gtkmm</application> kallades ursprungligen gtk-- eftersom GTK i "
309"början hette GTK+ och hade ett + i namnet. Men eftersom -- inte lätt kan "
310"indexeras av sökmotorer så gick paketet allmänt under namnet "
311"<application>gtkmm</application> vilket vi sedan höll oss till."
131312
132#. (itstool) path: section/title313#. (itstool) path: section/title
133#: C/index-in.docbook:154314#: C/index-in.docbook:154
134msgid "Why use <application>gtkmm</application> instead of GTK?"315msgid "Why use <application>gtkmm</application> instead of GTK?"
n135msgstr ""n316msgstr "Varför använda <application>gtkmm</application> i stället för GTK?"
136317
nn318# TODO: realize
137#. (itstool) path: section/para319#. (itstool) path: section/para
138#: C/index-in.docbook:156320#: C/index-in.docbook:156
n139msgid "<application>gtkmm</application> allows you to write code using normal <pn321#, fuzzy
>hrase role=\"nowrap\">C++</phrase> techniques such as encapsulation, derivation, 
> and polymorphism. As a <phrase role=\"nowrap\">C++</phrase> programmer you prob 
>ably already realize that this leads to clearer and better organized code." 
322#| msgid ""
323#| "<application>gtkmm</application> allows you to write code using normal C+"
324#| "+ techniques such as encapsulation, derivation, and polymorphism. As a C+"
325#| "+ programmer you probably already realise that this leads to clearer and "
326#| "better organized code."
327msgid ""
328"<application>gtkmm</application> allows you to write code using normal "
329"<phrase role=\"nowrap\">C++</phrase> techniques such as encapsulation, "
330"derivation, and polymorphism. As a <phrase role=\"nowrap\">C++</phrase> "
331"programmer you probably already realize that this leads to clearer and "
332"better organized code."
140msgstr ""333msgstr ""
nn334"<application>gtkmm</application> låter dig skriva kod med vanliga C++-"
335"tekniker som inkapsling, härledning och polymorfism. Som C++-programmerare "
336"inser du förmodligen redan att detta leder till tydligare och bättre "
337"organiserad kod."
141338
142#. (itstool) path: section/para339#. (itstool) path: section/para
143#: C/index-in.docbook:157340#: C/index-in.docbook:157
n144msgid "<application>gtkmm</application> is more type-safe, so the compiler can dn341msgid ""
>etect errors that would only be detected at run time when using C. This use of s 
>pecific types also makes the API clearer because you can see what types should b 
>e used just by looking at a method's declaration." 
342"<application>gtkmm</application> is more type-safe, so the compiler can "
343"detect errors that would only be detected at run time when using C. This use "
344"of specific types also makes the API clearer because you can see what types "
345"should be used just by looking at a method's declaration."
145msgstr ""346msgstr ""
nn347"<application>gtkmm</application> är mer typsäkert, så kompilatorn kan "
348"upptäcka fel som bara skulle upptäckas vid körning om du använde C. Denna "
349"användning av specifika typer gör också API:t tydligare eftersom du kan se "
350"vilka typer som ska användas bara genom att titta på en metods deklaration."
146351
147#. (itstool) path: section/para352#. (itstool) path: section/para
148#: C/index-in.docbook:158353#: C/index-in.docbook:158
n149msgid "Inheritance can be used to derive new widgets. The derivation of new widgn354#, fuzzy
>ets in GTK C code is so complicated and error prone that almost no C coders do i 
>t. As a <phrase role=\"nowrap\">C++</phrase> developer you know that derivation  
>is an essential Object Orientated technique." 
355#| msgid ""
356#| "Inheritance can be used to derive new widgets. The derivation of new "
357#| "widgets in GTK C code is so complicated and error prone that almost no C "
358#| "coders do it. As a C++ developer you know that derivation is an essential "
359#| "Object Orientated technique."
360msgid ""
361"Inheritance can be used to derive new widgets. The derivation of new widgets "
362"in GTK C code is so complicated and error prone that almost no C coders do "
363"it. As a <phrase role=\"nowrap\">C++</phrase> developer you know that "
364"derivation is an essential Object Orientated technique."
150msgstr ""365msgstr ""
nn366"Arv kan användas för att härleda nya komponenter. Härledandet av nya "
367"komponenter i GTK:s C-kod är så komplicerad och inbjudande till fel, så att "
368"nästan inga C-kodare gör det. Som C++-utvecklare vet du att härledning är en "
369"viktig teknik i objektorientering."
151370
152#. (itstool) path: section/para371#. (itstool) path: section/para
153#: C/index-in.docbook:159372#: C/index-in.docbook:159
n154msgid "Member instances can be used, simplifying memory management. All GTK C win373#, fuzzy
>dgets are dealt with by use of pointers. As a <phrase role=\"nowrap\">C++</phras 
>e> coder you know that pointers should be avoided where possible." 
374#| msgid ""
375#| "Member instances can be used, simplifying memory management. All GTK C "
376#| "widgets are dealt with by use of pointers. As a C++ coder you know that "
377#| "pointers should be avoided where possible."
378msgid ""
379"Member instances can be used, simplifying memory management. All GTK C "
380"widgets are dealt with by use of pointers. As a <phrase role=\"nowrap\">C++</"
381"phrase> coder you know that pointers should be avoided where possible."
155msgstr ""382msgstr ""
nn383"Medlemsinstanser kan användas vilket förenklar minneshantering. Alla C-"
384"komponenter i GTK hanteras genom användning av pekare. Som C++-kodare vet du "
385"att pekare ska undvikas när möjligt."
156386
157#. (itstool) path: section/para387#. (itstool) path: section/para
158#: C/index-in.docbook:160388#: C/index-in.docbook:160
n159msgid "<application>gtkmm</application> involves less code compared to GTK, whicn389msgid ""
>h uses prefixed function names and lots of cast macros." 
390"<application>gtkmm</application> involves less code compared to GTK, which "
391"uses prefixed function names and lots of cast macros."
160msgstr ""392msgstr ""
nn393"<application>gtkmm</application> innefattar mindre kod än GTK, vilket "
394"använder prefixade funktionsnamn och många typkonverteringsmakron."
161395
162#. (itstool) path: section/title396#. (itstool) path: section/title
163#: C/index-in.docbook:164397#: C/index-in.docbook:164
164msgid "<application>gtkmm</application> compared to Qt"398msgid "<application>gtkmm</application> compared to Qt"
n165msgstr ""n399msgstr "<application>gtkmm</application> jämfört med Qt"
166400
167#. (itstool) path: section/para401#. (itstool) path: section/para
168#: C/index-in.docbook:166402#: C/index-in.docbook:166
n169msgid "Trolltech's Qt is the closest competition to <application>gtkmm</applicatn403msgid ""
>ion>, so it deserves discussion." 
404"Trolltech's Qt is the closest competition to <application>gtkmm</"
405"application>, so it deserves discussion."
170msgstr ""406msgstr ""
nn407"Trolltechs Qt är den närmaste konkurrenten till <application>gtkmm</"
408"application>, så det förtjänar att diskuteras."
171409
nn410# TODO: Standardize?
172#. (itstool) path: section/para411#. (itstool) path: section/para
173#: C/index-in.docbook:168412#: C/index-in.docbook:168
n174msgid "<application>gtkmm</application> developers tend to prefer <application>gn413#, fuzzy
>tkmm</application> to Qt because <application>gtkmm</application> does things in 
> a more <phrase role=\"nowrap\">C++</phrase> way. Qt originates from a time when 
> <phrase role=\"nowrap\">C++</phrase> and the standard library were not standard 
>ized or well supported by compilers. It therefore duplicates a lot of stuff that 
> is now in the standard library, such as containers and type information. Most s 
>ignificantly, Trolltech modified the <phrase role=\"nowrap\">C++</phrase> langua 
>ge to provide signals, so that Qt classes cannot be used easily with non-Qt clas 
>ses. <application>gtkmm</application> was able to use standard <phrase role=\"no 
>wrap\">C++</phrase> to provide signals without changing the <phrase role=\"nowra 
>p\">C++</phrase> language. See the <link xlink:href=\"https://gtkmm.gnome.org/en 
>/faq.html\">FAQ</link> for more detailed differences." 
414#| msgid ""
415#| "<application>gtkmm</application> developers tend to prefer "
416#| "<application>gtkmm</application> to Qt because <application>gtkmm</"
417#| "application> does things in a more C++ way. Qt originates from a time "
418#| "when C++ and the standard library were not standardised or well supported "
419#| "by compilers. It therefore duplicates a lot of stuff that is now in the "
420#| "standard library, such as containers and type information. Most "
421#| "significantly, Trolltech modified the C++ language to provide signals, so "
422#| "that Qt classes cannot be used easily with non-Qt classes. "
423#| "<application>gtkmm</application> was able to use standard C++ to provide "
424#| "signals without changing the C++ language. See the <link xlink:"
425#| "href=\"https://wiki.gnome.org/Projects/gtkmm/FAQ\">FAQ</link> for more "
426#| "detailed differences."
427msgid ""
428"<application>gtkmm</application> developers tend to prefer "
429"<application>gtkmm</application> to Qt because <application>gtkmm</"
430"application> does things in a more <phrase role=\"nowrap\">C++</phrase> way. "
431"Qt originates from a time when <phrase role=\"nowrap\">C++</phrase> and the "
432"standard library were not standardized or well supported by compilers. It "
433"therefore duplicates a lot of stuff that is now in the standard library, "
434"such as containers and type information. Most significantly, Trolltech "
435"modified the <phrase role=\"nowrap\">C++</phrase> language to provide "
436"signals, so that Qt classes cannot be used easily with non-Qt classes. "
437"<application>gtkmm</application> was able to use standard <phrase "
438"role=\"nowrap\">C++</phrase> to provide signals without changing the <phrase "
439"role=\"nowrap\">C++</phrase> language. See the <link xlink:href=\"https://"
440"gtkmm.gnome.org/en/faq.html\">FAQ</link> for more detailed differences."
175msgstr ""441msgstr ""
nn442"<application>gtkmm</application>-utvecklare tenderar att föredra "
443"<application>gtkmm</application> över Qt för att <application>gtkmm</"
444"application> gör saker på ett mer C++-aktigt sätt. Qt härstammar från en tid "
445"då C++ och standardbiblioteket varken standardiserats eller stöddes "
446"ordentligt av kompilatorer. Det duplicerar därför mycket saker som nu är i "
447"standardbiblioteket, som behållare och typinformation. I synnerhet "
448"modifierade Trolltech C++-språket så det tillhandahöll signaler, så Qt-"
449"klasser kan inte lätt användas med klasser som inte är Qt. "
450"<application>gtkmm</application> kunde använda standard-C++ för att "
451"tillhandahålla signaler utan att ändra C++-språket. Se <link xlink:"
452"href=\"https://wiki.gnome.org/Projects/gtkmm/FAQ\">frågor och svar</link> "
453"för mer detaljerade skillnader."
176454
177#. (itstool) path: section/title455#. (itstool) path: section/title
178#: C/index-in.docbook:173456#: C/index-in.docbook:173
179msgid "<application>gtkmm</application> is a wrapper"457msgid "<application>gtkmm</application> is a wrapper"
n180msgstr ""n458msgstr "<application>gtkmm</application> är ett omslag"
181459
182#. (itstool) path: section/para460#. (itstool) path: section/para
183#: C/index-in.docbook:175461#: C/index-in.docbook:175
n184msgid "<application>gtkmm</application> is not a native <phrase role=\"nowrap\">n462#, fuzzy
>C++</phrase> toolkit, but a <phrase role=\"nowrap\">C++</phrase> wrapper of a C  
>toolkit. This separation of interface and implementation has advantages. The <ap 
>plication>gtkmm</application> developers spend most of their time talking about  
>how <application>gtkmm</application> can present the clearest API, without awkwa 
>rd compromises due to obscure technical details. We contribute a little to the u 
>nderlying GTK code base, but so do the C coders, and the Perl coders and the Pyt 
>hon coders, etc. Therefore GTK benefits from a broader user base than language-s 
>pecific toolkits - there are more implementers, more developers, more testers, a 
>nd more users." 
463#| msgid ""
464#| "<application>gtkmm</application> is not a native C++ toolkit, but a C++ "
465#| "wrapper of a C toolkit. This separation of interface and implementation "
466#| "has advantages. The <application>gtkmm</application> developers spend "
467#| "most of their time talking about how <application>gtkmm</application> can "
468#| "present the clearest API, without awkward compromises due to obscure "
469#| "technical details. We contribute a little to the underlying GTK code "
470#| "base, but so do the C coders, and the Perl coders and the Python coders, "
471#| "etc. Therefore GTK benefits from a broader user base than language-"
472#| "specific toolkits - there are more implementers, more developers, more "
473#| "testers, and more users."
474msgid ""
475"<application>gtkmm</application> is not a native <phrase role=\"nowrap\">C+"
476"+</phrase> toolkit, but a <phrase role=\"nowrap\">C++</phrase> wrapper of a "
477"C toolkit. This separation of interface and implementation has advantages. "
478"The <application>gtkmm</application> developers spend most of their time "
479"talking about how <application>gtkmm</application> can present the clearest "
480"API, without awkward compromises due to obscure technical details. We "
481"contribute a little to the underlying GTK code base, but so do the C coders, "
482"and the Perl coders and the Python coders, etc. Therefore GTK benefits from "
483"a broader user base than language-specific toolkits - there are more "
484"implementers, more developers, more testers, and more users."
185msgstr ""485msgstr ""
nn486"<application>gtkmm</application> är inte en inhemsk C++-verktygslåda, utan "
487"ett C++-omslag för en C-verktygslåda. Denna uppdelning av gränssnitt och "
488"implementation har fördelar. Utvecklarna av <application>gtkmm</application> "
489"spenderar sin mesta tid åt att prata om hur <application>gtkmm</application> "
490"kan erbjuda det klaraste API:t, utan klumpiga kompromisser på grund av "
491"obskyra tekniska detaljer. Vi bidrar lite grann till den underliggande GTK-"
492"kodbasen, men så gör även C-kodarna, Perl-kodarna och Python-kodarna o.s.v. "
493"Därigenom drar GTK nytta av en bredare användarbas än språkspecifika "
494"verktygslådor - det finns fler implementatörer, fler utvecklare, fler "
495"testare, och fler användare."
186496
187#. (itstool) path: section/title497#. (itstool) path: section/title
188#: C/index-in.docbook:181498#: C/index-in.docbook:181
nn499#, fuzzy
500#| msgid "Resources"
189msgid "C++ Resources"501msgid "C++ Resources"
n190msgstr ""n502msgstr "Resurser"
191503
192#. (itstool) path: section/para504#. (itstool) path: section/para
193#: C/index-in.docbook:182505#: C/index-in.docbook:182
194msgid "Useful links:"506msgid "Useful links:"
195msgstr ""507msgstr ""
196508
197#. (itstool) path: listitem/para509#. (itstool) path: listitem/para
198#: C/index-in.docbook:184510#: C/index-in.docbook:184
n199msgid "<link xlink:href=\"https://en.wikipedia.org/wiki/C%2B%2B\">Wikipedia C++<n511msgid ""
>/link>: An introduction to <phrase role=\"nowrap\">C++</phrase>, and many links. 
>" 
512"<link xlink:href=\"https://en.wikipedia.org/wiki/C%2B%2B\">Wikipedia C++</"
513"link>: An introduction to <phrase role=\"nowrap\">C++</phrase>, and many "
514"links."
200msgstr ""515msgstr ""
201516
202#. (itstool) path: listitem/para517#. (itstool) path: listitem/para
203#: C/index-in.docbook:185518#: C/index-in.docbook:185
n204msgid "<link xlink:href=\"https://en.cppreference.com/w/\">C++ reference</link>:n519msgid ""
> A convenient version of the C and <phrase role=\"nowrap\">C++</phrase> standard 
>s." 
520"<link xlink:href=\"https://en.cppreference.com/w/\">C++ reference</link>: A "
521"convenient version of the C and <phrase role=\"nowrap\">C++</phrase> "
522"standards."
205msgstr ""523msgstr ""
206524
207#. (itstool) path: listitem/para525#. (itstool) path: listitem/para
208#: C/index-in.docbook:186526#: C/index-in.docbook:186
nn527msgid ""
209msgid "<link xlink:href=\"https://cplusplus.com/\">The C++ Resources Network</li528"<link xlink:href=\"https://cplusplus.com/\">The C++ Resources Network</link>"
>nk>" 
210msgstr ""529msgstr ""
211530
212#. (itstool) path: listitem/para531#. (itstool) path: listitem/para
213#: C/index-in.docbook:187532#: C/index-in.docbook:187
nn533msgid ""
214msgid "<link xlink:href=\"https://www.stroustrup.com/\">Bjarne Stroustrup's home534"<link xlink:href=\"https://www.stroustrup.com/\">Bjarne Stroustrup's "
>page</link>" 
535"homepage</link>"
215msgstr ""536msgstr ""
216537
217#. (itstool) path: chapter/title538#. (itstool) path: chapter/title
218#: C/index-in.docbook:194539#: C/index-in.docbook:194
219msgid "Installation"540msgid "Installation"
n220msgstr ""n541msgstr "Installation"
221542
222#. (itstool) path: section/title543#. (itstool) path: section/title
223#: C/index-in.docbook:197544#: C/index-in.docbook:197
224msgid "Dependencies"545msgid "Dependencies"
n225msgstr ""n546msgstr "Beroenden"
226547
227#. (itstool) path: section/para548#. (itstool) path: section/para
228#: C/index-in.docbook:199549#: C/index-in.docbook:199
n229msgid "Before attempting to install <application>gtkmm</application><applicationn550msgid ""
>>-4.0</application>, you might first need to install these other packages." 
551"Before attempting to install <application>gtkmm</"
552"application><application>-4.0</application>, you might first need to install "
553"these other packages."
230msgstr ""554msgstr ""
nn555"Innan du försöker installera <application>gtkmm</"
556"application><application>-4.0</application>, kan du först behöva installera "
557"dessa andra paket."
231558
232#. (itstool) path: listitem/para559#. (itstool) path: listitem/para
233#: C/index-in.docbook:204560#: C/index-in.docbook:204
234msgid "<application>sigc++-3.0</application>"561msgid "<application>sigc++-3.0</application>"
n235msgstr ""n562msgstr "<application>sigc++-3.0</application>"
236563
237#. (itstool) path: listitem/para564#. (itstool) path: listitem/para
238#: C/index-in.docbook:205565#: C/index-in.docbook:205
239msgid "<application>gtk4</application>"566msgid "<application>gtk4</application>"
n240msgstr ""n567msgstr "<application>gtk4</application>"
241568
242#. (itstool) path: listitem/para569#. (itstool) path: listitem/para
243#: C/index-in.docbook:206570#: C/index-in.docbook:206
244msgid "<application>glibmm-2.68</application>"571msgid "<application>glibmm-2.68</application>"
n245msgstr ""n572msgstr "<application>glibmm-2.68</application>"
246573
247#. (itstool) path: listitem/para574#. (itstool) path: listitem/para
248#: C/index-in.docbook:207575#: C/index-in.docbook:207
249msgid "<application>cairomm-1.16</application>"576msgid "<application>cairomm-1.16</application>"
n250msgstr ""n577msgstr "<application>cairomm-1.16</application>"
251578
252#. (itstool) path: listitem/para579#. (itstool) path: listitem/para
253#: C/index-in.docbook:208580#: C/index-in.docbook:208
254msgid "<application>pangomm-2.48</application>"581msgid "<application>pangomm-2.48</application>"
n255msgstr ""n582msgstr "<application>pangomm-2.48</application>"
256583
257#. (itstool) path: section/para584#. (itstool) path: section/para
258#: C/index-in.docbook:210585#: C/index-in.docbook:210
nn586msgid ""
259msgid "These dependencies have their own dependencies, including the following a587"These dependencies have their own dependencies, including the following "
>pplications and libraries:" 
588"applications and libraries:"
260msgstr ""589msgstr ""
nn590"Dessa beroenden har sina egna beroenden, inkluderande följande program och "
591"bibliotek:"
261592
262#. (itstool) path: listitem/para593#. (itstool) path: listitem/para
263#: C/index-in.docbook:215594#: C/index-in.docbook:215
264msgid "<application>pkg-config</application>"595msgid "<application>pkg-config</application>"
n265msgstr ""n596msgstr "<application>pkg-config</application>"
266597
267#. (itstool) path: listitem/para598#. (itstool) path: listitem/para
268#: C/index-in.docbook:216599#: C/index-in.docbook:216
269msgid "<application>glib-2.0</application>"600msgid "<application>glib-2.0</application>"
n270msgstr ""n601msgstr "<application>glib-2.0</application>"
271602
272#. (itstool) path: listitem/para603#. (itstool) path: listitem/para
273#: C/index-in.docbook:217604#: C/index-in.docbook:217
274msgid "<application>pango</application>"605msgid "<application>pango</application>"
n275msgstr ""n606msgstr "<application>pango</application>"
276607
277#. (itstool) path: listitem/para608#. (itstool) path: listitem/para
278#: C/index-in.docbook:218609#: C/index-in.docbook:218
279msgid "<application>cairo</application>"610msgid "<application>cairo</application>"
n280msgstr ""n611msgstr "<application>cairo</application>"
281612
282#. (itstool) path: listitem/para613#. (itstool) path: listitem/para
283#: C/index-in.docbook:219614#: C/index-in.docbook:219
284msgid "<application>gdk-pixbuf-2.0</application>"615msgid "<application>gdk-pixbuf-2.0</application>"
n285msgstr ""n616msgstr "<application>gdk-pixbuf-2.0</application>"
286617
287#. (itstool) path: listitem/para618#. (itstool) path: listitem/para
288#: C/index-in.docbook:220619#: C/index-in.docbook:220
289msgid "<application>graphene-1.0</application>"620msgid "<application>graphene-1.0</application>"
n290msgstr ""n621msgstr "<application>graphene-1.0</application>"
291622
292#. (itstool) path: section/title623#. (itstool) path: section/title
293#: C/index-in.docbook:225624#: C/index-in.docbook:225
294msgid "Unix and Linux"625msgid "Unix and Linux"
n295msgstr ""n626msgstr "Unix och Linux"
296627
297#. (itstool) path: section/title628#. (itstool) path: section/title
298#: C/index-in.docbook:228629#: C/index-in.docbook:228
299msgid "Prebuilt Packages"630msgid "Prebuilt Packages"
n300msgstr ""n631msgstr "Förbyggda paket"
301632
302#. (itstool) path: section/para633#. (itstool) path: section/para
303#: C/index-in.docbook:230634#: C/index-in.docbook:230
n304msgid "Recent versions of <application>gtkmm</application> are packaged by nearln635msgid ""
>y every major Linux distribution these days. So, if you use Linux, you can proba 
>bly get started with <application>gtkmm</application> by installing the package  
>from the official repository for your distribution. Distributions that include < 
>application>gtkmm</application> in their repositories include Debian, Ubuntu, Re 
>d Hat, Fedora, Mandriva, Suse, and many others." 
636"Recent versions of <application>gtkmm</application> are packaged by nearly "
637"every major Linux distribution these days. So, if you use Linux, you can "
638"probably get started with <application>gtkmm</application> by installing the "
639"package from the official repository for your distribution. Distributions "
640"that include <application>gtkmm</application> in their repositories include "
641"Debian, Ubuntu, Red Hat, Fedora, Mandriva, Suse, and many others."
305msgstr ""642msgstr ""
nn643"De senaste versionerna av <application>gtkmm</application> paketeras numera "
644"av nästan alla större Linux-distributioner. Så om du använder Linux kan du "
645"troligen komma igång med <application>gtkmm</application> genom att "
646"installera paketet från det officiella förrådet för din distribution. "
647"Distributioner som inkluderar <application>gtkmm</application> i sina förråd "
648"inkluderar Debian, Ubuntu, Red Hat, Fedora, Mandriva, Suse och många fler."
306649
307#. (itstool) path: section/para650#. (itstool) path: section/para
308#: C/index-in.docbook:238651#: C/index-in.docbook:238
n309msgid "The names of the <application>gtkmm</application> packages vary from distn652msgid ""
>ribution to distribution (e.g. <application>libgtkmm-4.0-dev</application> on De 
>bian and Ubuntu or <application>gtkmm4.0-devel</application> on Red Hat and Fedo 
>ra), so check with your distribution's package management program for the correc 
>t package name and install it like you would any other package." 
653"The names of the <application>gtkmm</application> packages vary from "
654"distribution to distribution (e.g. <application>libgtkmm-4.0-dev</"
655"application> on Debian and Ubuntu or <application>gtkmm4.0-devel</"
656"application> on Red Hat and Fedora), so check with your distribution's "
657"package management program for the correct package name and install it like "
658"you would any other package."
310msgstr ""659msgstr ""
nn660"Namnen på <application>gtkmm</application>-paketen varierar från "
661"distribution till distribution (t.ex. <application>libgtkmm-4.0-dev</"
662"application> på Debian och Ubuntu eller <application>gtkmm4.0-devel</"
663"application> på Red Hat och Fedora), så se i din distributions "
664"pakethanteringsprogram vad som är rätt paketnamn och installera det som "
665"vilket annat paket som helst."
311666
312#. (itstool) path: note/para667#. (itstool) path: note/para
313#: C/index-in.docbook:246668#: C/index-in.docbook:246
n314msgid "The package names will not change when new API/ABI-compatible versions ofn669msgid ""
> <application>gtkmm</application> are released. Otherwise they would not be API/ 
>ABI-compatible. So don't be surprised, for instance, to find <application>gtkmm< 
>/application> 4.8 supplied by Debian's <application>libgtkmm-4.0-dev</applicatio 
>n> package." 
670"The package names will not change when new API/ABI-compatible versions of "
671"<application>gtkmm</application> are released. Otherwise they would not be "
672"API/ABI-compatible. So don't be surprised, for instance, to find "
673"<application>gtkmm</application> 4.8 supplied by Debian's "
674"<application>libgtkmm-4.0-dev</application> package."
315msgstr ""675msgstr ""
nn676"Paketnamnen kommer inte ändras när nya API/ABI-kompatibla versioner av "
677"<application>gtkmm</application> släpps. Annars skulle de inte vara API/ABI-"
678"kompatibla. Så bli inte överraskad om exempelvis <application>gtkmm</"
679"application> 4.8 tillhandahålls av paketet <application>libgtkmm-4.0-dev</"
680"application> i Debian."
316681
317#. (itstool) path: section/title682#. (itstool) path: section/title
318#: C/index-in.docbook:256683#: C/index-in.docbook:256
319msgid "Installing From Source"684msgid "Installing From Source"
n320msgstr ""n685msgstr "Installera från källkod"
321686
322#. (itstool) path: section/para687#. (itstool) path: section/para
323#: C/index-in.docbook:258688#: C/index-in.docbook:258
n324msgid "If your distribution does not provide a pre-built <application>gtkmm</appn689msgid ""
>lication> package, or if you want to install a different version than the one pr 
>ovided by your distribution, you can also install <application>gtkmm</applicatio 
>n> from source. The source code for <application>gtkmm</application> can be down 
>loaded from <link xlink:href=\"https://download.gnome.org/sources/gtkmm/\"/>." 
690"If your distribution does not provide a pre-built <application>gtkmm</"
691"application> package, or if you want to install a different version than the "
692"one provided by your distribution, you can also install <application>gtkmm</"
693"application> from source. The source code for <application>gtkmm</"
694"application> can be downloaded from <link xlink:href=\"https://download."
695"gnome.org/sources/gtkmm/\"/>."
325msgstr ""696msgstr ""
nn697"Om din distribution inte tillhandahåller ett förbyggt <application>gtkmm</"
698"application>-paket, eller om du vill installera en annan version än den som "
699"tillhandahålls av din distribution, så kan du även installera "
700"<application>gtkmm</application> från källkod. Källkoden för "
701"<application>gtkmm</application> kan hämtas från <link xlink:href=\"https://"
702"download.gnome.org/sources/gtkmm/\"/>."
326703
327#. (itstool) path: section/para704#. (itstool) path: section/para
328#: C/index-in.docbook:264705#: C/index-in.docbook:264
n329msgid "After you've installed all of the dependencies, download the <applicationn706msgid ""
>>gtkmm</application> source code, unpack it, and change to the newly created dir 
>ectory. <application>gtkmm</application> can be built with Meson. See the <filen 
>ame>README</filename> file in the <application>gtkmm</application> version you'v 
>e downloaded." 
707"After you've installed all of the dependencies, download the "
708"<application>gtkmm</application> source code, unpack it, and change to the "
709"newly created directory. <application>gtkmm</application> can be built with "
710"Meson. See the <filename>README</filename> file in the <application>gtkmm</"
711"application> version you've downloaded."
330msgstr ""712msgstr ""
nn713"Efter att du installerat alla beroendena hämtar du <application>gtkmm</"
714"application>-källkoden, packar upp den, och går till den nyskapade "
715"katalogen. <application>gtkmm</application> kan byggas med Meson. Se filen "
716"<filename>README</filename> i <application>gtkmm</application>-versionen som "
717"du hämtat."
331718
nn719# TODO: root password for su, not sudo?
332#. (itstool) path: note/para720#. (itstool) path: note/para
333#: C/index-in.docbook:271721#: C/index-in.docbook:271
n334msgid "Remember that on a Unix or Linux operating system, you will probably needn722#, fuzzy
> to be <literal>root</literal> to install software. The <command>su</command> or 
> <command>sudo</command> command will allow you to enter the <literal>root</lite 
>ral> password and have <literal>root</literal> status temporarily." 
723msgid ""
724"Remember that on a Unix or Linux operating system, you will probably need to "
725"be <literal>root</literal> to install software. The <command>su</command> or "
726"<command>sudo</command> command will allow you to enter the <literal>root</"
727"literal> password and have <literal>root</literal> status temporarily."
335msgstr ""728msgstr ""
nn729"Kom i håg att på ett Unix- eller Linux-operativsystem kommer du troligen "
730"behöva vara <literal>root</literal> för att installera programvara. "
731"Kommandot <command>su</command> eller <command>sudo</command> kommer låta "
732"dig mata in <literal>root</literal>-lösenordet och tillfälligt få "
733"<literal>root</literal>-status."
336734
337#. (itstool) path: section/para735#. (itstool) path: section/para
338#: C/index-in.docbook:278736#: C/index-in.docbook:278
n339msgid "The <filename>configure</filename> script or <command>meson</command> wiln737msgid ""
>l check to make sure all of the required dependencies are already installed. If  
>you are missing any dependencies, it will exit and display an error." 
738"The <filename>configure</filename> script or <command>meson</command> will "
739"check to make sure all of the required dependencies are already installed. "
740"If you are missing any dependencies, it will exit and display an error."
340msgstr ""741msgstr ""
nn742"<filename>configure</filename>-skriptet eller <command>meson</command> "
743"kommer kontrollera så att alla de beroenden som krävs redan finns "
744"installerade. Om du saknar några beroenden kommer det att avsluta och visa "
745"ett fel."
341746
342#. (itstool) path: para/screen747#. (itstool) path: para/screen
343#: C/index-in.docbook:289748#: C/index-in.docbook:289
344#, no-wrap749#, no-wrap
345msgid ""750msgid ""
346"\n"751"\n"
347"# meson setup --prefix=/usr &lt;builddir&gt; &lt;srcdir&gt;\n"752"# meson setup --prefix=/usr &lt;builddir&gt; &lt;srcdir&gt;\n"
348"# meson configure --prefix=/usr\n"753"# meson configure --prefix=/usr\n"
349"# ./configure --prefix=/usr\n"754"# ./configure --prefix=/usr\n"
n350""n
351msgstr ""755msgstr ""
nn756"\n"
757"# meson setup --prefix=/usr &lt;byggkat&gt; &lt;källkat&gt;\n"
758"# meson configure --prefix=/usr\n"
759"# ./configure --prefix=/usr\n"
352760
353#. (itstool) path: section/para761#. (itstool) path: section/para
354#: C/index-in.docbook:283762#: C/index-in.docbook:283
n355msgid "By default, <application>gtkmm</application> if built with Meson or Autotn763msgid ""
>ools, will be installed under the <filename>/usr/local</filename> directory. On  
>some systems you may need to install to a different location. For instance, on R 
>ed Hat Linux systems you might use the <literal>--prefix</literal> option with c 
>onfigure, like one of: <_:screen-1/>" 
764"By default, <application>gtkmm</application> if built with Meson or "
765"Autotools, will be installed under the <filename>/usr/local</filename> "
766"directory. On some systems you may need to install to a different location. "
767"For instance, on Red Hat Linux systems you might use the <literal>--prefix</"
768"literal> option with configure, like one of: <_:screen-1/>"
356msgstr ""769msgstr ""
nn770"Som standard kommer <application>gtkmm</application> om det byggts med Meson "
771"eller Autotools att installeras under katalogen <filename>/usr/local</"
772"filename>. På vissa system kan du behöva installera på en annan plats. På "
773"Red Hat-system använder du exempelvis kanske flaggan <literal>--prefix</"
774"literal> med configure, som en av: <_:screen-1/>"
357775
358#. (itstool) path: warning/para776#. (itstool) path: warning/para
359#: C/index-in.docbook:296777#: C/index-in.docbook:296
n360msgid "You should be very careful when installing to standard system prefixes sun778msgid ""
>ch as <filename>/usr</filename>. Linux distributions install software packages t 
>o <filename>/usr</filename>, so installing a source package to this prefix could 
> corrupt or conflict with software installed using your distribution's package-m 
>anagement system. Ideally, you should use a separate prefix for all software you 
> install from source." 
779"You should be very careful when installing to standard system prefixes such "
780"as <filename>/usr</filename>. Linux distributions install software packages "
781"to <filename>/usr</filename>, so installing a source package to this prefix "
782"could corrupt or conflict with software installed using your distribution's "
783"package-management system. Ideally, you should use a separate prefix for all "
784"software you install from source."
361msgstr ""785msgstr ""
nn786"Du bör vara väldigt försiktig när du installerar till standardsystemprefix "
787"som <filename>/usr</filename>. Linux-distributioner installerar "
788"programvarupaket till <filename>/usr</filename>, så att installera ett "
789"programvarupaket till detta prefix kan förstöra eller stå i konflikt med "
790"programvara som installerats med din distributions pakethanteringssystem. "
791"Idealt bör du använda ett separat prefix för all programvara som du "
792"installerar från källkod."
362793
363#. (itstool) path: section/para794#. (itstool) path: section/para
364#: C/index-in.docbook:305795#: C/index-in.docbook:305
n365msgid "If you want to help develop <application>gtkmm</application> or experimenn796msgid ""
>t with new features, you can also install <application>gtkmm</application> from  
>git. Most users will never need to do this, but if you're interested in helping  
>with <application>gtkmm</application> development, see the <link linkend=\"chapt 
>er-working-with-source\">Working with gtkmm's Source Code</link> appendix." 
797"If you want to help develop <application>gtkmm</application> or experiment "
798"with new features, you can also install <application>gtkmm</application> "
799"from git. Most users will never need to do this, but if you're interested in "
800"helping with <application>gtkmm</application> development, see the <link "
801"linkend=\"chapter-working-with-source\">Working with gtkmm's Source Code</"
802"link> appendix."
366msgstr ""803msgstr ""
nn804"Om du vill hjälpa till med att utveckla <application>gtkmm</application> "
805"eller experimentera med nya funktioner så kan du även installera "
806"<application>gtkmm</application> från git. De flesta användare kommer aldrig "
807"behöva göra detta, men om du är intresserad av att hjälpa till med "
808"<application>gtkmm</application>-utveckling, se bilagan <link "
809"linkend=\"chapter-working-with-source\">Arbeta med gtkmm:s källkod</link>."
367810
368#. (itstool) path: section/title811#. (itstool) path: section/title
369#: C/index-in.docbook:315812#: C/index-in.docbook:315
370msgid "Microsoft Windows"813msgid "Microsoft Windows"
n371msgstr ""n814msgstr "Microsoft Windows"
372815
373#. (itstool) path: section/para816#. (itstool) path: section/para
374#: C/index-in.docbook:317817#: C/index-in.docbook:317
n375msgid "GTK and <application>gtkmm</application> were designed to work well with n818#, fuzzy
>Microsoft Windows, and the developers encourage its use on the win32 platform. H 
>owever, Windows has no standard installation system for development libraries. P 
>lease see the <link xlink:href=\"https://wiki.gnome.org/Projects/gtkmm/MSWindows 
>\">Windows Installation</link> page (somewhat outdated) or the <link linkend=\"s 
>ec-windows-installation\"><application>gtkmm</application> and Win32</link> appe 
>ndix for Windows-specific installation instructions and notes." 
819#| msgid ""
820#| "GTK and <application>gtkmm</application> were designed to work well with "
821#| "Microsoft Windows, and the developers encourage its use on the win32 "
822#| "platform. However, Windows has no standard installation system for "
823#| "development libraries. Please see the <link xlink:href=\"https://wiki."
824#| "gnome.org/Projects/gtkmm/MSWindows\">Windows Installation</link> page or "
825#| "the <link linkend=\"sec-windows-installation\"><application>gtkmm</"
826#| "application> and Win32</link> appendix for Windows-specific installation "
827#| "instructions and notes."
828msgid ""
829"GTK and <application>gtkmm</application> were designed to work well with "
830"Microsoft Windows, and the developers encourage its use on the win32 "
831"platform. However, Windows has no standard installation system for "
832"development libraries. Please see the <link xlink:href=\"https://wiki.gnome."
833"org/Projects/gtkmm/MSWindows\">Windows Installation</link> page (somewhat "
834"outdated) or the <link linkend=\"sec-windows-"
835"installation\"><application>gtkmm</application> and Win32</link> appendix "
836"for Windows-specific installation instructions and notes."
376msgstr ""837msgstr ""
nn838"GTK och <application>gtkmm</application> designades för att fungera bra med "
839"Microsoft Windows, och utvecklarna uppmuntrar dess användning på win32-"
840"plattformen. Windows har dock inget standardinstallationssystem för "
841"utvecklingsbibliotek. Se sidan för <link xlink:href=\"https://wiki.gnome.org/"
842"Projects/gtkmm/MSWindows\">Windows-installation</link> eller <link "
843"linkend=\"sec-windows-installation\"><application>gtkmm</application> och "
844"Win32</link>-bilagan för Windows-specifika installationsinstruktioner och "
845"anteckningar."
377846
378#. (itstool) path: chapter/title847#. (itstool) path: chapter/title
379#: C/index-in.docbook:328848#: C/index-in.docbook:328
380msgid "Basics"849msgid "Basics"
n381msgstr ""n850msgstr "Grunder"
382851
383#. (itstool) path: chapter/para852#. (itstool) path: chapter/para
384#: C/index-in.docbook:330853#: C/index-in.docbook:330
n385msgid "This chapter will introduce some of the most important aspects of <applicn854msgid ""
>ation>gtkmm</application> coding. These will be demonstrated with simple working 
> example code. However, this is just a taster, so you need to look at the other  
>chapters for more substantial information." 
855"This chapter will introduce some of the most important aspects of "
856"<application>gtkmm</application> coding. These will be demonstrated with "
857"simple working example code. However, this is just a taster, so you need to "
858"look at the other chapters for more substantial information."
386msgstr ""859msgstr ""
nn860"Detta kapitel kommer introducera några av de viktigaste aspekterna kring "
861"kodande med <application>gtkmm</application>. Dessa kommer demonstreras med "
862"enkel, fungerande exempelkod. Detta är dock bara ett smakprov, så du kommer "
863"behöva titta på de andra kapitlen för mer påtaglig information."
387864
388#. (itstool) path: chapter/para865#. (itstool) path: chapter/para
389#: C/index-in.docbook:333866#: C/index-in.docbook:333
n390msgid "Your existing knowledge of <phrase role=\"nowrap\">C++</phrase> will helpn867#, fuzzy
> you with <application>gtkmm</application> as it would with any library. Unless  
>we state otherwise, you can expect <application>gtkmm</application> classes to b 
>ehave like any other <phrase role=\"nowrap\">C++</phrase> class, and you can exp 
>ect to use your existing <phrase role=\"nowrap\">C++</phrase> techniques with <a 
>pplication>gtkmm</application> classes." 
868#| msgid ""
869#| "Your existing knowledge of C++ will help you with <application>gtkmm</"
870#| "application> as it would with any library. Unless we state otherwise, you "
871#| "can expect <application>gtkmm</application> classes to behave like any "
872#| "other C++ class, and you can expect to use your existing C++ techniques "
873#| "with <application>gtkmm</application> classes."
874msgid ""
875"Your existing knowledge of <phrase role=\"nowrap\">C++</phrase> will help "
876"you with <application>gtkmm</application> as it would with any library. "
877"Unless we state otherwise, you can expect <application>gtkmm</application> "
878"classes to behave like any other <phrase role=\"nowrap\">C++</phrase> class, "
879"and you can expect to use your existing <phrase role=\"nowrap\">C++</phrase> "
880"techniques with <application>gtkmm</application> classes."
391msgstr ""881msgstr ""
nn882"Din befintliga C++-kunskap kommer hjälpa dig med <application>gtkmm</"
883"application> som den skulle göra med alla bibliotek. Om vi inte uttryckligen "
884"säger annat kan du förvänta dig att <application>gtkmm</application>-klasser "
885"kommer bete sig som vilken annan C++-klass som helst, och du kan förvänta "
886"dig att använda dina befintliga C++-tekniker med <application>gtkmm</"
887"application>-klasser."
392888
393#. (itstool) path: section/title889#. (itstool) path: section/title
n394#: C/index-in.docbook:338n890#: C/index-in.docbook:338 C/index-in.docbook:3946
395#: C/index-in.docbook:3946
396msgid "Simple Example"891msgid "Simple Example"
n397msgstr ""n892msgstr "Enkelt exempel"
398893
399#. (itstool) path: section/para894#. (itstool) path: section/para
400#: C/index-in.docbook:340895#: C/index-in.docbook:340
n401msgid "To begin our introduction to <application>gtkmm</application>, we'll starn896msgid ""
>t with the simplest program possible. This program will create an empty 200 x 20 
>0 pixel window." 
897"To begin our introduction to <application>gtkmm</application>, we'll start "
898"with the simplest program possible. This program will create an empty 200 x "
899"200 pixel window."
402msgstr ""900msgstr ""
nn901"För att inleda vår introduktion till <application>gtkmm</application> så "
902"börjar vi enklast möjliga program. Detta program kommer skapa ett tomt "
903"fönster på 200 × 200 bildpunkter."
403904
404#. (itstool) path: section/para905#. (itstool) path: section/para
405#: C/index-in.docbook:345906#: C/index-in.docbook:345
n406msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren907msgid ""
>e/master/examples/book/base\">Source Code</link>" 
908"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
909"master/examples/book/base\">Source Code</link>"
407msgstr ""910msgstr ""
nn911"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
912"master/examples/book/base\">Källkod</link>"
408913
409#. (itstool) path: section/para914#. (itstool) path: section/para
410#: C/index-in.docbook:347915#: C/index-in.docbook:347
411msgid "We will now explain each part of the example"916msgid "We will now explain each part of the example"
n412msgstr ""n917msgstr "Vi kommer nu förklara varje del av exemplet"
413918
414#. (itstool) path: section/programlisting919#. (itstool) path: section/programlisting
415#: C/index-in.docbook:348920#: C/index-in.docbook:348
n416#, no-wrapn921#, fuzzy, no-wrap
417msgid ""922#| msgid "#include &lt;gtkmm.h&gt;"
418"<code>#include &lt;gtkmm.h&gt;</code>"923msgid "<code>#include &lt;gtkmm.h&gt;</code>"
419msgstr ""924msgstr "#include &lt;gtkmm.h&gt;"
420925
421#. (itstool) path: section/para926#. (itstool) path: section/para
422#: C/index-in.docbook:349927#: C/index-in.docbook:349
n423msgid "All <application>gtkmm</application> programs must include certain <applin928#, fuzzy
>cation>gtkmm</application> headers; <filename>gtkmm.h</filename> includes the en 
>tire <application>gtkmm</application> kit. This is usually not a good idea, beca 
>use it includes a megabyte or so of headers, but for simple programs, it suffice 
>s." 
929#| msgid ""
930#| "All <application>gtkmm</application> programs must include certain "
931#| "<application>gtkmm</application> headers; <literal>gtkmm.h</literal> "
932#| "includes the entire <application>gtkmm</application> kit. This is usually "
933#| "not a good idea, because it includes a megabyte or so of headers, but for "
934#| "simple programs, it suffices."
935msgid ""
936"All <application>gtkmm</application> programs must include certain "
937"<application>gtkmm</application> headers; <filename>gtkmm.h</filename> "
938"includes the entire <application>gtkmm</application> kit. This is usually "
939"not a good idea, because it includes a megabyte or so of headers, but for "
940"simple programs, it suffices."
424msgstr ""941msgstr ""
nn942"Alla <application>gtkmm</application>-program måste innehålla vissa "
943"<application>gtkmm</application>-huvuden; <literal>gtkmm.h</literal> "
944"inkluderar hela <application>gtkmm</application>-kittet. Detta är vanligen "
945"ingen bra idé, då det inkluderar en megabyte eller så med huvuden, men för "
946"enkla program duger det."
425947
426#. (itstool) path: section/para948#. (itstool) path: section/para
427#: C/index-in.docbook:356949#: C/index-in.docbook:356
428msgid "The next part of the program:"950msgid "The next part of the program:"
n429msgstr ""n951msgstr "Nästa del av programmet:"
430952
431#. (itstool) path: section/programlisting953#. (itstool) path: section/programlisting
432#: C/index-in.docbook:357954#: C/index-in.docbook:357
n433#, no-wrapn955#, fuzzy, no-wrap
956#| msgid ""
957#| "class MyWindow : public Gtk::Window\n"
958#| "{\n"
959#| "public:\n"
960#| "  MyWindow();\n"
961#| "};\n"
962#| "\n"
963#| "MyWindow::MyWindow()\n"
964#| "{\n"
965#| "  set_title(\"Basic application\");\n"
966#| "  set_default_size(200, 200);\n"
967#| "}"
434msgid ""968msgid ""
435"<code>class MyWindow : public Gtk::Window\n"969"<code>class MyWindow : public Gtk::Window\n"
436"{\n"970"{\n"
437"public:\n"971"public:\n"
438"  MyWindow();\n"972"  MyWindow();\n"
442"{\n"976"{\n"
443"  set_title(\"Basic application\");\n"977"  set_title(\"Basic application\");\n"
444"  set_default_size(200, 200);\n"978"  set_default_size(200, 200);\n"
445"}</code>"979"}</code>"
446msgstr ""980msgstr ""
nn981"class MyWindow : public Gtk::Window\n"
982"{\n"
983"public:\n"
984"  MyWindow();\n"
985"};\n"
986"\n"
987"MyWindow::MyWindow()\n"
988"{\n"
989"  set_title(\"Enkelt program\");\n"
990"  set_default_size(200, 200);\n"
991"}"
447992
448#. (itstool) path: section/para993#. (itstool) path: section/para
449#: C/index-in.docbook:368994#: C/index-in.docbook:368
n450msgid "defines the <classname>MyWindow</classname> class. Its default constructon995msgid ""
>r sets the window's title and default (initial) size." 
996"defines the <classname>MyWindow</classname> class. Its default constructor "
997"sets the window's title and default (initial) size."
451msgstr ""998msgstr ""
nn999"definierar klassen <classname>MyWindow</classname>. Dess standardkonstruktor "
1000"ställer in fönstrets titel och (initial) standardstorlek."
4521001
453#. (itstool) path: section/para1002#. (itstool) path: section/para
454#: C/index-in.docbook:3731003#: C/index-in.docbook:373
455msgid "The <function>main()</function> function's first statement:"1004msgid "The <function>main()</function> function's first statement:"
n456msgstr ""n1005msgstr "<function>main()</function>-funktionens första sats:"
4571006
458#. (itstool) path: section/programlisting1007#. (itstool) path: section/programlisting
459#: C/index-in.docbook:3741008#: C/index-in.docbook:374
n460#, no-wrapn1009#, fuzzy, no-wrap
461msgid ""1010#| msgid "auto app = Gtk::Application::create(\"org.gtkmm.examples.base\");"
462"<code>auto app = Gtk::Application::create(\"org.gtkmm.examples.base\");</code>"1011msgid "<code>auto app = Gtk::Application::create(\"org.gtkmm.examples.base\");</
 >code>"
463msgstr ""1012msgstr "auto app = Gtk::Application::create(\"org.gtkmm.examples.base\");"
4641013
465#. (itstool) path: section/para1014#. (itstool) path: section/para
466#: C/index-in.docbook:3751015#: C/index-in.docbook:375
n467msgid "creates a <classname>Gtk::Application</classname> object, stored in a <cln1016msgid ""
>assname>Glib::RefPtr</classname> smartpointer. This is needed in all <applicatio 
>n>gtkmm</application> applications. The <methodname>create()</methodname> method 
> for this object initializes <application>gtkmm</application>." 
1017"creates a <classname>Gtk::Application</classname> object, stored in a "
1018"<classname>Glib::RefPtr</classname> smartpointer. This is needed in all "
1019"<application>gtkmm</application> applications. The <methodname>create()</"
1020"methodname> method for this object initializes <application>gtkmm</"
1021"application>."
468msgstr ""1022msgstr ""
nn1023"skapar ett <classname>Gtk::Application</classname>-objekt, lagrat i en "
1024"<classname>Glib::RefPtr</classname>-smartpekare. Detta behövs i alla "
1025"<application>gtkmm</application>-program. Metoden <methodname>create()</"
1026"methodname> för detta objekt initierar <application>gtkmm</application>."
4691027
470#. (itstool) path: section/para1028#. (itstool) path: section/para
471#: C/index-in.docbook:3801029#: C/index-in.docbook:380
n472msgid "The last line creates and shows a window and enters the <application>gtkmn1030#, fuzzy
>m</application> main processing loop, which will finish when the window is close 
>d. Your <function>main()</function> function will then return with an appropriat 
>e success or error code. The <parameter>argc</parameter> and <parameter>argv</pa 
>rameter> arguments, passed to your application on the command line, can be check 
>ed when <methodname>make_window_and_run()</methodname> is called, but this simpl 
>e application does not use those arguments." 
1031msgid ""
1032"The last line creates and shows a window and enters the <application>gtkmm</"
1033"application> main processing loop, which will finish when the window is "
1034"closed. Your <function>main()</function> function will then return with an "
1035"appropriate success or error code. The <parameter>argc</parameter> and "
1036"<parameter>argv</parameter> arguments, passed to your application on the "
1037"command line, can be checked when <methodname>make_window_and_run()</"
1038"methodname> is called, but this simple application does not use those "
1039"arguments."
473msgstr ""1040msgstr ""
nn1041"Den sista raden skapar och visar ett fönster och går in i huvudslingan för "
1042"<application>gtkmm</application>, vilken kommer slutföras när fönstret "
1043"stängs. Din <function>main()</function>-funktion kommer sedan returnera med "
1044"en lämplig avslutnings- eller felkod. Argumenten <parameter>argc</parameter> "
1045"och <parameter>argv</parameter> som skickas till ditt program på "
1046"kommandoraden kan kontrolleras när <methodname>make_window_and_run()</"
1047"methodname> anropas, men detta enkla program använder inte dessa argument."
4741048
475#. (itstool) path: section/programlisting1049#. (itstool) path: section/programlisting
476#: C/index-in.docbook:3861050#: C/index-in.docbook:386
n477#, no-wrapn1051#, fuzzy, no-wrap
478msgid ""1052#| msgid "return app-&gt;make_window_and_run&lt;MyWindow&gt;(argc, argv);"
479"<code>return app-&gt;make_window_and_run&lt;MyWindow&gt;(argc, argv);</code>"1053msgid "<code>return app-&gt;make_window_and_run&lt;MyWindow&gt;(argc, argv);</co
 >de>"
480msgstr ""1054msgstr "return app-&gt;make_window_and_run&lt;MyWindow&gt;(argc, argv);"
4811055
482#. (itstool) path: section/para1056#. (itstool) path: section/para
483#: C/index-in.docbook:3881057#: C/index-in.docbook:388
n484msgid "After putting the source code in <filename>base.cc</filename> you can comn1058#, fuzzy
>pile the above program with <application>gcc</application> using:" 
1059#| msgid ""
1060#| "After putting the source code in <literal>simple.cc</literal> you can "
1061#| "compile the above program with <application>gcc</application> using:"
1062msgid ""
1063"After putting the source code in <filename>base.cc</filename> you can "
1064"compile the above program with <application>gcc</application> using:"
485msgstr ""1065msgstr ""
nn1066"Efter att ha stoppat källkoden i <literal>simple.cc</literal> kan du "
1067"kompilera programmet ovan med <application>gcc</application> genom:"
4861068
487#. (itstool) path: section/programlisting1069#. (itstool) path: section/programlisting
488#: C/index-in.docbook:3921070#: C/index-in.docbook:392
n489#, no-wrapn1071#, fuzzy, no-wrap
490msgid ""1072#| msgid "g++ simple.cc -o simple `pkg-config --cflags --libs gtkmm-4.0` -std=c+
 >+17"
491"<code>g++ base.cc -o base `pkg-config --cflags --libs gtkmm-4.0` -std=c++17</co1073msgid "<code>g++ base.cc -o base `pkg-config --cflags --libs gtkmm-4.0` -std=c++
>de>">17</code>"
492msgstr ""1074msgstr "g++ simple.cc -o simple `pkg-config --cflags --libs gtkmm-4.0` -std=c++1
 >7"
4931075
494#. (itstool) path: section/para1076#. (itstool) path: section/para
495#: C/index-in.docbook:3931077#: C/index-in.docbook:393
n496msgid "Note that you must surround the <application>pkg-config</application> invn1078#, fuzzy
>ocation with backquotes. Backquotes cause the shell to execute the command insid 
>e them, and to use the command's output as part of the command line. Note also t 
>hat <filename>base.cc</filename> must come before the <application>pkg-config</a 
>pplication> invocation on the command line. <literal><phrase role=\"nowrap\">-st 
>d=c++17</phrase></literal> is necessary only if your compiler is not <phrase rol 
>e=\"nowrap\">C++17</phrase> compliant by default." 
1079#| msgid ""
1080#| "Note that you must surround the <literal>pkg-config</literal> invocation "
1081#| "with backquotes. Backquotes cause the shell to execute the command inside "
1082#| "them, and to use the command's output as part of the command line. Note "
1083#| "also that <literal>simple.cc</literal> must come before the <literal>pkg-"
1084#| "config</literal> invocation on the command line. <literal>-std=c++17</"
1085#| "literal> is necessary only if your compiler is not C++17 compliant by "
1086#| "default."
1087msgid ""
1088"Note that you must surround the <application>pkg-config</application> "
1089"invocation with backquotes. Backquotes cause the shell to execute the "
1090"command inside them, and to use the command's output as part of the command "
1091"line. Note also that <filename>base.cc</filename> must come before the "
1092"<application>pkg-config</application> invocation on the command line. "
1093"<literal><phrase role=\"nowrap\">-std=c++17</phrase></literal> is necessary "
1094"only if your compiler is not <phrase role=\"nowrap\">C++17</phrase> "
1095"compliant by default."
497msgstr ""1096msgstr ""
nn1097"Observera att du måste omsluta anropet av <literal>pkg-config</literal> med "
1098"grav accent (`). Grava accenter får skalet att exekvera kommandot inuti dem, "
1099"och att använda kommandots utdata som en del av kommandoraden. Observera "
1100"också att <literal>simple.cc</literal> måste komma före anropet av "
1101"<literal>pkg-config</literal> på kommandoraden. <literal>-std=c++17</"
1102"literal> är endast nödvändigt om din kompilator inte följer C++17 som "
1103"standard."
4981104
499#. (itstool) path: section/title1105#. (itstool) path: section/title
500#: C/index-in.docbook:4041106#: C/index-in.docbook:404
501msgid "Headers and Linking"1107msgid "Headers and Linking"
n502msgstr ""n1108msgstr "Huvuden och länkning"
5031109
504#. (itstool) path: section/para1110#. (itstool) path: section/para
505#: C/index-in.docbook:4061111#: C/index-in.docbook:406
n506msgid "Although we have shown the compilation command for the simple example, yon1112msgid ""
>u really should use the <link xlink:href=\"https://mesonbuild.com/\">Meson build 
> system</link>. The examples used in this book are included in the <application> 
>gtkmm-documentation</application> package, with appropriate build files, so we w 
>on't show the build commands in future. The <filename>README</filename> file in  
><application>gtkmm-documentation</application> describes how to build the exampl 
>es." 
1113"Although we have shown the compilation command for the simple example, you "
1114"really should use the <link xlink:href=\"https://mesonbuild.com/\">Meson "
1115"build system</link>. The examples used in this book are included in the "
1116"<application>gtkmm-documentation</application> package, with appropriate "
1117"build files, so we won't show the build commands in future. The "
1118"<filename>README</filename> file in <application>gtkmm-documentation</"
1119"application> describes how to build the examples."
507msgstr ""1120msgstr ""
nn1121"Även om vi visat kompileringskommandot för det enkla exemplet så bör du "
1122"verkligen använda <link xlink:href=\"https://mesonbuild.com/\">byggsystemet "
1123"Meson</link>. Exemplen som används i denna bok inkluderas i paketet "
1124"<application>gtkmm-documentation</application> med lämpliga byggfiler, så vi "
1125"kommer inte visa byggkommandona framöver. Filen <filename>README</filename> "
1126"i <application>gtkmm-documentation</application> beskriver hur du bygger "
1127"exemplen."
5081128
509#. (itstool) path: section/para1129#. (itstool) path: section/para
510#: C/index-in.docbook:4141130#: C/index-in.docbook:414
n511msgid "To simplify compilation, we use <literal>pkg-config</literal>, which is pn1131msgid ""
>resent in all (properly installed) <application>gtkmm</application> installation 
>s. This program 'knows' what compiler switches are needed to compile programs th 
>at use <application>gtkmm</application>. The <literal>--cflags</literal> option  
>causes <literal>pkg-config</literal> to output a list of include directories for 
> the compiler to look in; the <literal>--libs</literal> option requests the list 
> of libraries for the compiler to link with and the directories to find them in. 
> Try running it from your shell-prompt to see the results on your system." 
1132"To simplify compilation, we use <literal>pkg-config</literal>, which is "
1133"present in all (properly installed) <application>gtkmm</application> "
1134"installations. This program 'knows' what compiler switches are needed to "
1135"compile programs that use <application>gtkmm</application>. The <literal>--"
1136"cflags</literal> option causes <literal>pkg-config</literal> to output a "
1137"list of include directories for the compiler to look in; the <literal>--"
1138"libs</literal> option requests the list of libraries for the compiler to "
1139"link with and the directories to find them in. Try running it from your "
1140"shell-prompt to see the results on your system."
512msgstr ""1141msgstr ""
nn1142"För att förenkla kompilering använder vi <literal>pkg-config</literal> som "
1143"finns i alla (riktigt installerade) <application>gtkmm</application>-"
1144"installationer. Det här programmet ”vet” vilka kompilatorflaggor som behövs "
1145"för att kompilera program som använder <application>gtkmm</application>. "
1146"Flaggan <literal>--cflags</literal> får <literal>pkg-config</literal> att "
1147"mata ut en lista över inkluderingskataloger som kompilatorn ska titta i; "
1148"flaggan <literal>--libs</literal> begär listan över bibliotek som "
1149"kompilatorn ska länka med och katalogerna att hitta dem i. Försök köra den "
1150"från din skalprompt för att se resultatet på ditt system."
5131151
514#. (itstool) path: section/para1152#. (itstool) path: section/para
515#: C/index-in.docbook:4241153#: C/index-in.docbook:424
n516msgid "However, this is even simpler when using the <function>dependency()</funcn1154msgid ""
>tion> function in a <filename>meson.build</filename> file with Meson. For instan 
>ce:" 
1155"However, this is even simpler when using the <function>dependency()</"
1156"function> function in a <filename>meson.build</filename> file with Meson. "
1157"For instance:"
517msgstr ""1158msgstr ""
nn1159"Detta är dock ännu lättare om du använder funktionen <function>dependency()</"
1160"function> i en <filename>meson.build</filename>-fil med Meson. Till exempel:"
5181161
519#. (itstool) path: section/programlisting1162#. (itstool) path: section/programlisting
520#: C/index-in.docbook:4281163#: C/index-in.docbook:428
n521#, no-wrapn1164#, fuzzy, no-wrap
522msgid ""1165#| msgid "gtkmm_dep = dependency('gtkmm-4.0', version: '&gt;= 4.6.0')"
523"<code>gtkmm_dep = dependency('gtkmm-4.0', version: '&gt;= 4.6.0')</code>"1166msgid "<code>gtkmm_dep = dependency('gtkmm-4.0', version: '&gt;= 4.6.0')</code>"
524msgstr ""1167msgstr "gtkmm_dep = dependency('gtkmm-4.0', version: '&gt;= 4.6.0')"
5251168
526#. (itstool) path: section/para1169#. (itstool) path: section/para
527#: C/index-in.docbook:4291170#: C/index-in.docbook:429
n528msgid "This checks for the presence of gtkmm and defines <literal>gtkmm_dep</litn1171msgid ""
>eral> for use in your <filename>meson.build</filename> files. For instance:" 
1172"This checks for the presence of gtkmm and defines <literal>gtkmm_dep</"
1173"literal> for use in your <filename>meson.build</filename> files. For "
1174"instance:"
529msgstr ""1175msgstr ""
nn1176"Detta kontrollerar närvaron av gtkmm och definierar <literal>gtkmm_dep</"
1177"literal> för användning i dina <filename>meson.build</filename>-filer. Till "
1178"exempel:"
5301179
531#. (itstool) path: section/programlisting1180#. (itstool) path: section/programlisting
532#: C/index-in.docbook:4331181#: C/index-in.docbook:433
n533#, no-wrapn1182#, fuzzy, no-wrap
534msgid ""1183msgid ""
535"<code>exe_file = executable('my_program', 'my_source1.cc', 'my_source2.cc',\n"1184"<code>exe_file = executable('my_program', 'my_source1.cc', 'my_source2.cc',\n"
536"  dependencies: gtkmm_dep,\n"1185"  dependencies: gtkmm_dep,\n"
537"  win_subsystem: 'windows',\n"1186"  win_subsystem: 'windows',\n"
538")</code>"1187")</code>"
539msgstr ""1188msgstr ""
nn1189"exe_file = executable('my_program', 'my_source1.cc', 'my_source2.cc',\n"
1190"  dependencies: gtkmm_dep,\n"
1191"  win_subsystem: 'windows',\n"
1192")"
5401193
541#. (itstool) path: section/para1194#. (itstool) path: section/para
542#: C/index-in.docbook:4371195#: C/index-in.docbook:437
n543msgid "gtkmm-4.0 is the name of the current stable API. There are older APIs caln1196msgid ""
>led gtkmm-2.4 and gtkmm-3.0 which install in parallel when they are available. T 
>here are several versions of gtkmm-2.4, such as gtkmm 2.10 and there are several 
> versions of the gtkmm-3.0 API. Note that the API name does not change for every 
> version because that would be an incompatible API and ABI break. There might be 
> a future gtkmm-5.0 API which would install in parallel with gtkmm-4.0 without a 
>ffecting existing applications." 
1197"gtkmm-4.0 is the name of the current stable API. There are older APIs called "
1198"gtkmm-2.4 and gtkmm-3.0 which install in parallel when they are available. "
1199"There are several versions of gtkmm-2.4, such as gtkmm 2.10 and there are "
1200"several versions of the gtkmm-3.0 API. Note that the API name does not "
1201"change for every version because that would be an incompatible API and ABI "
1202"break. There might be a future gtkmm-5.0 API which would install in parallel "
1203"with gtkmm-4.0 without affecting existing applications."
544msgstr ""1204msgstr ""
nn1205"gtkmm-4.0 är namnet på det aktuella stabila API:t. Det finns äldre API:er "
1206"som heter gtkmm-2.4 och gtkmm-3.0 vilka installeras parallellt då de finns "
1207"tillgängliga. Det finns flera versioner av gtkmm-2.4, som gtkmm 2.10, och "
1208"det finns flera versioner av gtkmm-3.0-API:t. Observera att API-namnet inte "
1209"ändras för varje version då det skulle vara ett inkompatibelt API- och ABI-"
1210"brott. Det kan komma ett framtida gtkmm-5.0-API som då skulle gå installera "
1211"parallellt med gtkmm-4.0 utan att påverka befintliga program."
5451212
546#. (itstool) path: section/para1213#. (itstool) path: section/para
547#: C/index-in.docbook:4441214#: C/index-in.docbook:444
n548msgid "If you start by experimenting with a small application that you plan to un1215msgid ""
>se just for yourself, it's easier to start with a <filename>meson.build</filenam 
>e> similar to the <filename>meson.build</filename> files in the <link linkend=\" 
>chapter-building-applications\">Building applications</link> chapter." 
1216"If you start by experimenting with a small application that you plan to use "
1217"just for yourself, it's easier to start with a <filename>meson.build</"
1218"filename> similar to the <filename>meson.build</filename> files in the <link "
1219"linkend=\"chapter-building-applications\">Building applications</link> "
1220"chapter."
549msgstr ""1221msgstr ""
nn1222"Om du börjar genom att experimentera med ett litet program som du bara "
1223"tänker använda själv är det lättare att börja med en <filename>meson.build</"
1224"filename> liknande <filename>meson.build</filename>-filerna i kapitlet <link "
1225"linkend=\"chapter-building-applications\">Bygga program</link>."
5501226
551#. (itstool) path: section/para1227#. (itstool) path: section/para
552#: C/index-in.docbook:4491228#: C/index-in.docbook:449
n553msgid "If you use the older Autotools build system, see also the GNU site. It han1229msgid ""
>s more information about <link xlink:href=\"https://www.gnu.org/software/autocon 
>f/\">autoconf</link> and <link xlink:href=\"https://www.gnu.org/software/automak 
>e/\">automake</link>. There are also some books describing Autotools: \"GNU Auto 
>conf, Automake, and Libtool\" by Gary Vaughan et al. and \"Autotools, A Practiti 
>oner's Guide to GNU Autoconf, Automake, and Libtool\" by John Calcote." 
1230"If you use the older Autotools build system, see also the GNU site. It has "
1231"more information about <link xlink:href=\"https://www.gnu.org/software/"
1232"autoconf/\">autoconf</link> and <link xlink:href=\"https://www.gnu.org/"
1233"software/automake/\">automake</link>. There are also some books describing "
1234"Autotools: \"GNU Autoconf, Automake, and Libtool\" by Gary Vaughan et al. "
1235"and \"Autotools, A Practitioner's Guide to GNU Autoconf, Automake, and "
1236"Libtool\" by John Calcote."
554msgstr ""1237msgstr ""
nn1238"Se även GNU:s webbplats om du använder det äldre Autotools-byggsystemet. Den "
1239"har mer information om <link xlink:href=\"https://www.gnu.org/software/"
1240"autoconf/\">autoconf</link> och <link xlink:href=\"https://www.gnu.org/"
1241"software/automake/\">automake</link>. Det finns också några böcker som "
1242"beskriver Autotools: ”GNU Autoconf, Automake, and Libtool” av Gary Vaughan "
1243"med flera, och ”Autotools, A Practitioner's Guide to GNU Autoconf, Automake, "
1244"and Libtool” av John Calcote."
5551245
556#. (itstool) path: section/title1246#. (itstool) path: section/title
n557#: C/index-in.docbook:460n1247#: C/index-in.docbook:460 C/index-in.docbook:6617
558#: C/index-in.docbook:6617
559msgid "Widgets"1248msgid "Widgets"
n560msgstr ""n1249msgstr "Komponenter"
5611250
562#. (itstool) path: section/para1251#. (itstool) path: section/para
563#: C/index-in.docbook:4621252#: C/index-in.docbook:462
n564msgid "<application>gtkmm</application> applications consist of windows containin1253#, fuzzy
>ng widgets, such as buttons and text boxes. In some other systems, widgets are c 
>alled \"controls\". For each widget in your application's windows, there is a <p 
>hrase role=\"nowrap\">C++</phrase> object in your application's code. So you jus 
>t need to call a method of the widget's class to affect the visible widget." 
1254msgid ""
1255"<application>gtkmm</application> applications consist of windows containing "
1256"widgets, such as buttons and text boxes. In some other systems, widgets are "
1257"called \"controls\". For each widget in your application's windows, there is "
1258"a <phrase role=\"nowrap\">C++</phrase> object in your application's code. So "
1259"you just need to call a method of the widget's class to affect the visible "
1260"widget."
565msgstr ""1261msgstr ""
nn1262"<application>gtkmm</application>-program består av fönster som innehåller "
1263"komponenter, som knappar och textrutor. I några andra system kallas "
1264"komponenter för ”kontroller”. För varje komponent i ditt programs fönster "
1265"finns det ett C++-objekt i ditt programs kod. Så du behöver bara anropa en "
1266"metod av komponentens klass för att påverka den synliga komponenten."
5661267
567#. (itstool) path: section/para1268#. (itstool) path: section/para
568#: C/index-in.docbook:4631269#: C/index-in.docbook:463
n569msgid "Widgets are arranged inside container widgets such as frames and notebookn1270#, fuzzy
>s, in a hierarchy of widgets within widgets. Some of these container widgets, su 
>ch as <classname>Gtk::Grid</classname>, are not visible - they exist only to arr 
>ange other widgets. Here is some example code that adds 2 <classname>Gtk::Button 
></classname> widgets to a <classname>Gtk::Box</classname> container widget:" 
1271msgid ""
1272"Widgets are arranged inside container widgets such as frames and notebooks, "
1273"in a hierarchy of widgets within widgets. Some of these container widgets, "
1274"such as <classname>Gtk::Grid</classname>, are not visible - they exist only "
1275"to arrange other widgets. Here is some example code that adds 2 "
1276"<classname>Gtk::Button</classname> widgets to a <classname>Gtk::Box</"
1277"classname> container widget:"
570msgstr ""1278msgstr ""
nn1279"Komponenter arrangeras inuti behållarkomponenter som ramar och "
1280"anteckningsblock, i en hierarki av komponenter i komponenter. Vissa av dessa "
1281"behållarkomponenter, som <classname>Gtk::Grid</classname>, är inte synliga - "
1282"de existerar bara för att arrangera andra komponenter. Här är exempelkod som "
1283"lägger till två <classname>Gtk::Button</classname>-komponenter till en "
1284"<classname>Gtk::Box</classname>-behållarkomponent: <_:programlisting-1/> och "
1285"här är hur du lägger till denna <classname>Gtk::Box</classname> som "
1286"innehåller knapparna till en <classname>Gtk::Frame</classname> som har en "
1287"synlig ram och titel: <_:programlisting-2/>"
5711288
572#. (itstool) path: section/programlisting1289#. (itstool) path: section/programlisting
573#: C/index-in.docbook:4651290#: C/index-in.docbook:465
n574#, no-wrapn1291#, fuzzy, no-wrap
1292#| msgid ""
1293#| "m_box.append(m_Button1);\n"
1294#| "m_box.append(m_Button2);"
575msgid ""1295msgid ""
576"<code>m_box.append(m_Button1);\n"1296"<code>m_box.append(m_Button1);\n"
577"m_box.append(m_Button2);</code>"1297"m_box.append(m_Button2);</code>"
578msgstr ""1298msgstr ""
nn1299"m_box.append(m_Button1);\n"
1300"m_box.append(m_Button2);"
5791301
580#. (itstool) path: section/para1302#. (itstool) path: section/para
581#: C/index-in.docbook:4671303#: C/index-in.docbook:467
n582msgid "and here is how to add the <classname>Gtk::Box</classname>, containing thn1304#, fuzzy
>ose buttons, to a <classname>Gtk::Frame</classname>, which has a visible frame a 
>nd title:" 
1305msgid ""
1306"and here is how to add the <classname>Gtk::Box</classname>, containing those "
1307"buttons, to a <classname>Gtk::Frame</classname>, which has a visible frame "
1308"and title:"
583msgstr ""1309msgstr ""
nn1310"I detta steg använder vi en <classname>Gtk::Builder</classname>-instans för "
1311"att associera en <classname>Gtk::Builder</classname>-ui-fil med vår "
1312"programfönsterklass."
5841313
585#. (itstool) path: section/programlisting1314#. (itstool) path: section/programlisting
586#: C/index-in.docbook:4691315#: C/index-in.docbook:469
n587#, no-wrapn1316#, fuzzy, no-wrap
588msgid ""1317#| msgid "m_frame.set_child(m_box);"
589"<code>m_frame.set_child(m_box);</code>"1318msgid "<code>m_frame.set_child(m_box);</code>"
590msgstr ""1319msgstr "m_frame.set_child(m_box);"
5911320
592#. (itstool) path: section/para1321#. (itstool) path: section/para
593#: C/index-in.docbook:4701322#: C/index-in.docbook:470
n594msgid "Most of the chapters in this book deal with specific widgets. See the <lin1323msgid ""
>nk linkend=\"chapter-container-widgets\">Container Widgets</link> section for mo 
>re details about adding widgets to container widgets." 
1324"Most of the chapters in this book deal with specific widgets. See the <link "
1325"linkend=\"chapter-container-widgets\">Container Widgets</link> section for "
1326"more details about adding widgets to container widgets."
595msgstr ""1327msgstr ""
nn1328"De flesta kapitel i denna bok hanterar specifika komponenter. Se avsnittet "
1329"<link linkend=\"chapter-container-widgets\">Behållarkomponenter</link> för "
1330"mer detaljer om att lägga till komponenter till behållarkomponenter."
5961331
597#. (itstool) path: section/para1332#. (itstool) path: section/para
598#: C/index-in.docbook:4741333#: C/index-in.docbook:474
n599msgid "Although you can specify the layout and appearance of windows and widgetsn1334#, fuzzy
> with <phrase role=\"nowrap\">C++</phrase> code, you will probably find it more  
>convenient to design your user interfaces with <filename class=\"extension\">.ui 
></filename> XML files and load them at runtime with <classname>Gtk::Builder</cla 
>ssname>. See the <link linkend=\"chapter-builder\">Gtk::Builder</link> chapter." 
1335#| msgid ""
1336#| "Although you can specify the layout and appearance of windows and widgets "
1337#| "with C++ code, you will probably find it more convenient to design your "
1338#| "user interfaces with <literal>Glade</literal> and load them at runtime "
1339#| "with <literal>Gtk::Builder</literal>. See the <link linkend=\"chapter-"
1340#| "builder\">Glade and Gtk::Builder</link> chapter."
1341msgid ""
1342"Although you can specify the layout and appearance of windows and widgets "
1343"with <phrase role=\"nowrap\">C++</phrase> code, you will probably find it "
1344"more convenient to design your user interfaces with <filename "
1345"class=\"extension\">.ui</filename> XML files and load them at runtime with "
1346"<classname>Gtk::Builder</classname>. See the <link linkend=\"chapter-"
1347"builder\">Gtk::Builder</link> chapter."
600msgstr ""1348msgstr ""
nn1349"Även om du kan ange layouten och utseendet för fönster och komponenter med C+"
1350"+-kod så kommer du troligen finna det mer bekvämt att designa dina "
1351"användargränssnitt med <literal>Glade</literal> och läsa in dem vid körning "
1352"med <literal>Gtk::Builder</literal>. Se kapitlet <link linkend=\"chapter-"
1353"builder\">Glade och Gtk::Builder</link>."
6011354
602#. (itstool) path: section/para1355#. (itstool) path: section/para
603#: C/index-in.docbook:4801356#: C/index-in.docbook:480
n604msgid "Although <application>gtkmm</application> widget instances have lifetimesn1357#, fuzzy
> and scopes just like those of other <phrase role=\"nowrap\">C++</phrase> classe 
>s, <application>gtkmm</application> has an optional time-saving feature that you 
> will see in some of the examples. The <function>Gtk::make_managed()</function>  
>allows you to create a new widget and state that it will become owned by the con 
>tainer into which you place it. This allows you to create the widget, add it to  
>the container and not be concerned about deleting it, since that will occur when 
> the parent container (which may itself be managed) is deleted. You can learn mo 
>re about <application>gtkmm</application> memory management techniques in the <l 
>ink linkend=\"chapter-memory\">Memory Management chapter</link>." 
1358msgid ""
1359"Although <application>gtkmm</application> widget instances have lifetimes "
1360"and scopes just like those of other <phrase role=\"nowrap\">C++</phrase> "
1361"classes, <application>gtkmm</application> has an optional time-saving "
1362"feature that you will see in some of the examples. The <function>Gtk::"
1363"make_managed()</function> allows you to create a new widget and state that "
1364"it will become owned by the container into which you place it. This allows "
1365"you to create the widget, add it to the container and not be concerned about "
1366"deleting it, since that will occur when the parent container (which may "
1367"itself be managed) is deleted. You can learn more about <application>gtkmm</"
1368"application> memory management techniques in the <link linkend=\"chapter-"
1369"memory\">Memory Management chapter</link>."
605msgstr ""1370msgstr ""
nn1371"Även om <application>gtkmm</application>-komponentinstanser har livslängder "
1372"och räckvidder precis som de hos andra C++ classes, så har "
1373"<application>gtkmm</application> en valfri tidssparande funktion som du "
1374"kommer se i några av exemplen. <function>Gtk::make_managed()</function> "
1375"låter dig skapa en ny komponent och ange att den kommer att ägas av "
1376"behållaren som du placerar den i. Detta låter dig skapa komponenten, lägga "
1377"till den i behållaren och inte behöva bry dig om att ta bort den, då det "
1378"kommer att inträffa då den överordnade behållaren (som i sin tur kan vara "
1379"hanterad) tas bort. Du kan lära dig mer om minneshanteringstekniker för "
1380"<application>gtkmm</application> i kapitlet <link linkend=\"chapter-"
1381"memory\">Minneshantering</link>."
6061382
607#. (itstool) path: section/title1383#. (itstool) path: section/title
608#. (itstool) path: appendix/title1384#. (itstool) path: appendix/title
n609#: C/index-in.docbook:494n1385#: C/index-in.docbook:494 C/index-in.docbook:5395 C/index-in.docbook:5638
610#: C/index-in.docbook:5395
611#: C/index-in.docbook:5638
612#: C/index-in.docbook:89101386#: C/index-in.docbook:8910
613msgid "Signals"1387msgid "Signals"
n614msgstr ""n1388msgstr "Signaler"
6151389
616#. (itstool) path: section/para1390#. (itstool) path: section/para
617#: C/index-in.docbook:4961391#: C/index-in.docbook:496
n618msgid "<application>gtkmm</application>, like most GUI toolkits, is <emphasis>evn1392#, fuzzy
>ent-driven</emphasis>. When an event occurs, such as the press of a mouse button 
>, the appropriate signal will be <emphasis>emitted</emphasis> by the Widget that 
> was pressed. Each Widget has a different set of signals that it can emit. To ma 
>ke a button click result in an action, we set up a <emphasis>signal handler</emp 
>hasis> to catch the button's \"clicked\" signal." 
1393msgid ""
1394"<application>gtkmm</application>, like most GUI toolkits, is <emphasis>event-"
1395"driven</emphasis>. When an event occurs, such as the press of a mouse "
1396"button, the appropriate signal will be <emphasis>emitted</emphasis> by the "
1397"Widget that was pressed. Each Widget has a different set of signals that it "
1398"can emit. To make a button click result in an action, we set up a "
1399"<emphasis>signal handler</emphasis> to catch the button's \"clicked\" signal."
619msgstr ""1400msgstr ""
nn1401"<application>gtkmm</application> är som de flesta GUI-verktygslådor "
1402"<emphasis>händelsedrivet</emphasis>. När en händelse inträffar, som ett "
1403"tryck på en musknapp, så kommer den lämpliga signalen <emphasis>avges</"
1404"emphasis> av den komponent som trycktes ned. Varje komponent har olika "
1405"uppsättningar signaler som den kan avge. För att få ett musklick att leda "
1406"till en åtgärd konfigurerar vi en <emphasis>signalhanterare</emphasis> som "
1407"fångar knappens ”clicked”-signal."
6201408
621#. (itstool) path: section/para1409#. (itstool) path: section/para
622#: C/index-in.docbook:5031410#: C/index-in.docbook:503
n623msgid "<application>gtkmm</application> uses the libsigc++ library to implement n1411msgid ""
>signals. Here is an example line of code that connects a Gtk::Button's \"clicked 
>\" signal with a signal handler called \"on_button_clicked\":" 
1412"<application>gtkmm</application> uses the libsigc++ library to implement "
1413"signals. Here is an example line of code that connects a Gtk::Button's "
1414"\"clicked\" signal with a signal handler called \"on_button_clicked\":"
624msgstr ""1415msgstr ""
nn1416"<application>gtkmm</application> använder libsigc++-biblioteket för att "
1417"implementera signaler. Här är en exempelrad kod som ansluter ”clicked”-"
1418"signalen för en Gtk::Button med en signalhanterare som heter "
1419"”on_button_clicked”:"
6251420
626#. (itstool) path: section/programlisting1421#. (itstool) path: section/programlisting
627#: C/index-in.docbook:5051422#: C/index-in.docbook:505
n628#, no-wrapn1423#, fuzzy, no-wrap
1424#| msgid ""
1425#| "m_button1.signal_clicked().connect( sigc::mem_fun(*this,\n"
1426#| "  &amp;HelloWorld::on_button_clicked) );"
629msgid ""1427msgid ""
630"<code>m_button1.signal_clicked().connect( sigc::mem_fun(*this,\n"1428"<code>m_button1.signal_clicked().connect( sigc::mem_fun(*this,\n"
631"  &amp;HelloWorld::on_button_clicked) );</code>"1429"  &amp;HelloWorld::on_button_clicked) );</code>"
632msgstr ""1430msgstr ""
nn1431"m_button1.signal_clicked().connect( sigc::mem_fun(*this,\n"
1432"  &amp;HelloWorld::on_button_clicked) );"
6331433
634#. (itstool) path: section/para1434#. (itstool) path: section/para
635#: C/index-in.docbook:5081435#: C/index-in.docbook:508
nn1436msgid ""
636msgid "For more detailed information about signals, see the <link linkend=\"chap1437"For more detailed information about signals, see the <link linkend=\"chapter-"
>ter-signals\">appendix</link>." 
1438"signals\">appendix</link>."
637msgstr ""1439msgstr ""
nn1440"Se <link linkend=\"chapter-signals\">bilagan</link> för mer detaljerad "
1441"information om signaler."
6381442
639#. (itstool) path: section/para1443#. (itstool) path: section/para
640#: C/index-in.docbook:5091444#: C/index-in.docbook:509
n641msgid "For information about implementing your own signals rather than just connn1445msgid ""
>ecting to the existing <application>gtkmm</application> signals, see the <link l 
>inkend=\"chapter-custom-signals\">appendix</link>." 
1446"For information about implementing your own signals rather than just "
1447"connecting to the existing <application>gtkmm</application> signals, see the "
1448"<link linkend=\"chapter-custom-signals\">appendix</link>."
642msgstr ""1449msgstr ""
nn1450"För mer information om att implementera dina egna signaler snarare än att "
1451"bara ansluta till de befintliga <application>gtkmm</application>-signalerna, "
1452"se <link linkend=\"chapter-custom-signals\">bilagan</link>."
6431453
644#. (itstool) path: section/title1454#. (itstool) path: section/title
645#: C/index-in.docbook:5151455#: C/index-in.docbook:515
646msgid "Glib::ustring"1456msgid "Glib::ustring"
n647msgstr ""n1457msgstr "Glib::ustring"
6481458
649#. (itstool) path: section/para1459#. (itstool) path: section/para
650#: C/index-in.docbook:5171460#: C/index-in.docbook:517
n651msgid "You might be surprised to learn that <application>gtkmm</application> doen1461msgid ""
>sn't use <classname>std::string</classname> in its interfaces. Instead it uses < 
>classname>Glib::ustring</classname>, which is so similar and unobtrusive that yo 
>u could actually pretend that each <classname>Glib::ustring</classname> is a <cl 
>assname>std::string</classname> and ignore the rest of this section. But read on 
> if you want to use languages other than English in your application." 
1462"You might be surprised to learn that <application>gtkmm</application> "
1463"doesn't use <classname>std::string</classname> in its interfaces. Instead it "
1464"uses <classname>Glib::ustring</classname>, which is so similar and "
1465"unobtrusive that you could actually pretend that each <classname>Glib::"
1466"ustring</classname> is a <classname>std::string</classname> and ignore the "
1467"rest of this section. But read on if you want to use languages other than "
1468"English in your application."
652msgstr ""1469msgstr ""
nn1470"Det kanske förvånar dig att höra att <application>gtkmm</application> inte "
1471"använder <classname>std::string</classname> i sina gränssnitt. I stället "
1472"använder det <classname>Glib::ustring</classname> vilket är snarlikt och "
1473"inte gör något väsen av sig, så du skulle kunna låtsas att varje "
1474"<classname>Glib::ustring</classname> är en <classname>std::string</"
1475"classname> och ignorera resten av detta avsnitt. Men läs vidare om du vill "
1476"använda andra språk än engelska i ditt program."
6531477
654#. (itstool) path: section/para1478#. (itstool) path: section/para
655#: C/index-in.docbook:5181479#: C/index-in.docbook:518
n656msgid "std::string uses 8 bits per character, but 8 bits aren't enough to encoden1480#, fuzzy
> languages such as Arabic, Chinese, and Japanese. Although the encodings for the 
>se languages have been specified by the <link xlink:href=\"http://www.unicode.or 
>g/\">Unicode Consortium</link>, the C and <phrase role=\"nowrap\">C++</phrase> l 
>anguages do not yet provide any standardized Unicode support for UTF-8 encoding. 
> GTK and GNOME chose to implement Unicode using UTF-8, and that's what is wrappe 
>d by Glib::ustring. It provides almost exactly the same interface as std::string 
>, along with automatic conversions to and from std::string." 
1481#| msgid ""
1482#| "std::string uses 8 bits per character, but 8 bits aren't enough to encode "
1483#| "languages such as Arabic, Chinese, and Japanese. Although the encodings "
1484#| "for these languages have been specified by the <link xlink:href=\"http://"
1485#| "www.unicode.org/\">Unicode Consortium</link>, the C and C++ languages do "
1486#| "not yet provide any standardised Unicode support for UTF-8 encoding. GTK "
1487#| "and GNOME chose to implement Unicode using UTF-8, and that's what is "
1488#| "wrapped by Glib::ustring. It provides almost exactly the same interface "
1489#| "as std::string, along with automatic conversions to and from std::string."
1490msgid ""
1491"std::string uses 8 bits per character, but 8 bits aren't enough to encode "
1492"languages such as Arabic, Chinese, and Japanese. Although the encodings for "
1493"these languages have been specified by the <link xlink:href=\"http://www."
1494"unicode.org/\">Unicode Consortium</link>, the C and <phrase "
1495"role=\"nowrap\">C++</phrase> languages do not yet provide any standardized "
1496"Unicode support for UTF-8 encoding. GTK and GNOME chose to implement Unicode "
1497"using UTF-8, and that's what is wrapped by Glib::ustring. It provides almost "
1498"exactly the same interface as std::string, along with automatic conversions "
1499"to and from std::string."
657msgstr ""1500msgstr ""
nn1501"std::string använder 8 bitar per tecken, men 8 bitar räcker inte till för "
1502"att koda språk som arabiska, kinesiska och japanska. Även om kodningarna för "
1503"dessa språk har angivits av <link xlink:href=\"http://www.unicode.org/"
1504"\">Unicode Consortium</link> så tillhandahåller språken C och C++ ännu inte "
1505"något standardiserat Unicode-stöd för UTF-8-kodning. GTK och GNOME valde att "
1506"implementera Unicode med UTF-8, och det är vad som är omslaget av Glib::"
1507"ustring. Det tillhandahåller nästan exakt samma gränssnitt som std::string, "
1508"tillsammans med automatiska konverteringar till och från std::string."
6581509
659#. (itstool) path: section/para1510#. (itstool) path: section/para
660#: C/index-in.docbook:5231511#: C/index-in.docbook:523
n661msgid "One of the benefits of UTF-8 is that you don't need to use it unless you n1512msgid ""
>want to, so you don't need to retrofit all of your code at once. <classname>std: 
>:string</classname> will still work for 7-bit ASCII strings. But when you try to 
> localize your application for languages like Chinese, for instance, you will st 
>art to see strange errors, and possible crashes. Then all you need to do is star 
>t using <classname>Glib::ustring</classname> instead." 
1513"One of the benefits of UTF-8 is that you don't need to use it unless you "
1514"want to, so you don't need to retrofit all of your code at once. "
1515"<classname>std::string</classname> will still work for 7-bit ASCII strings. "
1516"But when you try to localize your application for languages like Chinese, "
1517"for instance, you will start to see strange errors, and possible crashes. "
1518"Then all you need to do is start using <classname>Glib::ustring</classname> "
1519"instead."
662msgstr ""1520msgstr ""
nn1521"En av fördelarna med UTF-8 är att du inte behöver använda det om du inte "
1522"vill, så du behöver inte skriva om all din kod på en gång. <classname>std::"
1523"string</classname> kommer fortfarande fungera för 7-bitars ASCII-strängar. "
1524"Men när du försöker lokalanpassa ditt program för språk som exempelvis "
1525"kinesiska kommer du börja se märkliga fel och möjligen krascher. Då är allt "
1526"du behöver göra att börja använda <classname>Glib::ustring</classname> i "
1527"stället."
6631528
664#. (itstool) path: section/para1529#. (itstool) path: section/para
665#: C/index-in.docbook:5241530#: C/index-in.docbook:524
n666msgid "Note that UTF-8 isn't compatible with 8-bit encodings like ISO-8859-1. Fon1531msgid ""
>r instance, German umlauts are not in the ASCII range and need more than 1 byte  
>in the UTF-8 encoding. If your code contains 8-bit string literals, you have to  
>convert them to UTF-8 (e.g. the Bavarian greeting \"Grüß Gott\" would be \"Gr\\x 
>C3\\xBC\\xC3\\x9F Gott\")." 
1532"Note that UTF-8 isn't compatible with 8-bit encodings like ISO-8859-1. For "
1533"instance, German umlauts are not in the ASCII range and need more than 1 "
1534"byte in the UTF-8 encoding. If your code contains 8-bit string literals, you "
1535"have to convert them to UTF-8 (e.g. the Bavarian greeting \"Grüß Gott\" "
1536"would be \"Gr\\xC3\\xBC\\xC3\\x9F Gott\")."
667msgstr ""1537msgstr ""
nn1538"Observera att UTF-8 inte är kompatibelt med 8-bitars kodningar som "
1539"ISO-8859-1. Exempelvis finns tyska omljud inte i ASCII-intervallet och "
1540"behöver mer än 1 byte i UTF-8-kodningen. Om din kod innehåller 8-bitars "
1541"stränglitteraler behöver du konvertera dem till UTF-8 (t.ex. skulle den "
1542"bayerska hälsningen ”Grüß Gott” bli ”Gr\\xC3\\xBC\\xC3\\x9F Gott”)."
6681543
669#. (itstool) path: section/para1544#. (itstool) path: section/para
670#: C/index-in.docbook:5251545#: C/index-in.docbook:525
n671msgid "You should avoid C-style pointer arithmetic, and functions such as strlenn1546msgid ""
>(). In UTF-8, each character might need anywhere from 1 to 6 bytes, so it's not  
>possible to assume that the next byte is another character. <classname>Glib::ust 
>ring</classname> worries about the details of this for you so you can use method 
>s such as Glib::ustring::substr() while still thinking in terms of characters in 
>stead of bytes." 
1547"You should avoid C-style pointer arithmetic, and functions such as strlen(). "
1548"In UTF-8, each character might need anywhere from 1 to 6 bytes, so it's not "
1549"possible to assume that the next byte is another character. <classname>Glib::"
1550"ustring</classname> worries about the details of this for you so you can use "
1551"methods such as Glib::ustring::substr() while still thinking in terms of "
1552"characters instead of bytes."
672msgstr ""1553msgstr ""
nn1554"Du bör undvika pekararitmetik av C-stil och funktioner som strlen(). I UTF-8 "
1555"kan varje tecken behöva vad som helst från 1 till 6 byte, så det är inte "
1556"möjligt att anta att nästa byte är ett nytt tecken. <classname>Glib::"
1557"ustring</classname> sköter detaljerna kring detta åt dig, så du kan använda "
1558"metoder som Glib::ustring::substr() och tänka på antal tecken i stället för "
1559"byte."
6731560
674#. (itstool) path: section/para1561#. (itstool) path: section/para
675#: C/index-in.docbook:5271562#: C/index-in.docbook:527
n676msgid "Unlike the Windows UCS-2 Unicode solution, this does not require any specn1563msgid ""
>ial compiler options to process string literals, and it does not result in Unico 
>de executables and libraries which are incompatible with ASCII ones." 
1564"Unlike the Windows UCS-2 Unicode solution, this does not require any special "
1565"compiler options to process string literals, and it does not result in "
1566"Unicode executables and libraries which are incompatible with ASCII ones."
677msgstr ""1567msgstr ""
nn1568"Till skillnad från Windows Unicode-lösning UCS-2 så kräver detta inte några "
1569"ytterligare kompilatorflaggor för att behandla stränglitteraler, och det "
1570"resulterar inte i körbara Unicode-program och bibliotek som är inkompatibla "
1571"med de som använder ASCII."
6781572
679#. (itstool) path: section/para1573#. (itstool) path: section/para
680#: C/index-in.docbook:5291574#: C/index-in.docbook:529
n681msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/classGlib_n1575msgid ""
>1_1ustring.html\">Reference</link>" 
1576"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
1577"classGlib_1_1ustring.html\">Reference</link>"
682msgstr ""1578msgstr ""
nn1579"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
1580"classGlib_1_1ustring.html\">Referens</link>"
6831581
684#. (itstool) path: section/para1582#. (itstool) path: section/para
685#: C/index-in.docbook:5311583#: C/index-in.docbook:531
n686msgid "See the <link linkend=\"chapter-internationalization\">Internationalizatin1584msgid ""
>on</link> section for information about providing the UTF-8 string literals." 
1585"See the <link linkend=\"chapter-internationalization\">Internationalization</"
1586"link> section for information about providing the UTF-8 string literals."
687msgstr ""1587msgstr ""
nn1588"Se avsnittet <link linkend=\"chapter-"
1589"internationalization\">Internationalisering</link> för information om hur du "
1590"tillhandahåller UTF-8-stränglitteralerna."
6881591
689#. (itstool) path: section/title1592#. (itstool) path: section/title
690#: C/index-in.docbook:5361593#: C/index-in.docbook:536
691msgid "Mixing C and C++ APIs"1594msgid "Mixing C and C++ APIs"
n692msgstr ""n1595msgstr "Blanda C- och C++-API:er"
6931596
694#. (itstool) path: section/para1597#. (itstool) path: section/para
695#: C/index-in.docbook:5381598#: C/index-in.docbook:538
n696msgid "You can use C APIs which do not yet have convenient <phrase role=\"nowrapn1599#, fuzzy
>\">C++</phrase> interfaces. It is generally not a problem to use C APIs from <ph 
>rase role=\"nowrap\">C++</phrase>, and <application>gtkmm</application> helps by 
> providing access to the underlying C object, and providing an easy way to creat 
>e a <phrase role=\"nowrap\">C++</phrase> wrapper object from a C object, provide 
>d that the C API is also based on the <classname>GObject</classname> system." 
1600#| msgid ""
1601#| "You can use C APIs which do not yet have convenient C++ interfaces. It is "
1602#| "generally not a problem to use C APIs from C++, and <application>gtkmm</"
1603#| "application> helps by providing access to the underlying C object, and "
1604#| "providing an easy way to create a C++ wrapper object from a C object, "
1605#| "provided that the C API is also based on the <classname>GObject</"
1606#| "classname> system."
1607msgid ""
1608"You can use C APIs which do not yet have convenient <phrase "
1609"role=\"nowrap\">C++</phrase> interfaces. It is generally not a problem to "
1610"use C APIs from <phrase role=\"nowrap\">C++</phrase>, and "
1611"<application>gtkmm</application> helps by providing access to the underlying "
1612"C object, and providing an easy way to create a <phrase role=\"nowrap\">C++</"
1613"phrase> wrapper object from a C object, provided that the C API is also "
1614"based on the <classname>GObject</classname> system."
697msgstr ""1615msgstr ""
nn1616"Du kan använda C-API:er som inte ännu har praktiska C++-gränssnitt. Det är "
1617"allmänt inte ett problem att använda C-API:er från C++, och "
1618"<application>gtkmm</application> hjälper till genom att ge åtkomst till det "
1619"underliggande C-objektet, och tillhandahåller ett lätt sätt att skapa ett C+"
1620"+-omslagsobjekt från ett C-objekt, givet att C-API:t också är baserat på "
1621"<classname>GObject</classname>-systemet."
6981622
699#. (itstool) path: section/para1623#. (itstool) path: section/para
700#: C/index-in.docbook:5441624#: C/index-in.docbook:544
n701msgid "To use a <application>gtkmm</application> instance with a C function thatn1625#, fuzzy
> requires a C <classname>GObject</classname> instance, use the <phrase role=\"no 
>wrap\">C++</phrase> instance’s <function>gobj()</function> function to obtain a  
>pointer to the underlying C instance. For example:" 
1626msgid ""
1627"To use a <application>gtkmm</application> instance with a C function that "
1628"requires a C <classname>GObject</classname> instance, use the <phrase "
1629"role=\"nowrap\">C++</phrase> instance’s <function>gobj()</function> function "
1630"to obtain a pointer to the underlying C instance. For example:"
702msgstr ""1631msgstr ""
nn1632"För att använda en <application>gtkmm</application>-instans med en C-"
1633"funktion som kräver en <classname>GObject</classname>-instans i C, använder "
1634"du C++-instansens <function>gobj()</function>-funktion för att erhålla en "
1635"pekare till den underliggande C-instansen. Till exempel:"
7031636
704#. (itstool) path: section/programlisting1637#. (itstool) path: section/programlisting
705#: C/index-in.docbook:5491638#: C/index-in.docbook:549
n706#, no-wrapn1639#, fuzzy, no-wrap
707msgid ""1640msgid ""
708"<code>Gtk::Button button(\"example\");\n"1641"<code>Gtk::Button button(\"example\");\n"
709"gtk_button_do_something_that_gtkmm_cannot(button.gobj());\n"1642"gtk_button_do_something_that_gtkmm_cannot(button.gobj());\n"
710"</code>"1643"</code>"
711msgstr ""1644msgstr ""
nn1645"\n"
1646"Gtk::Button button(\"exempel\");\n"
1647"gtk_button_do_something_that_gtkmm_cannot(button.gobj());\n"
7121648
713#. (itstool) path: section/para1649#. (itstool) path: section/para
714#: C/index-in.docbook:5531650#: C/index-in.docbook:553
n715msgid "To obtain a <application>gtkmm</application> instance from a C <classnamen1651#, fuzzy
>>GObject</classname> instance, use one of the many overloaded <function>Glib::wr 
>ap()</function> functions. The C instance’s reference count is not incremented,  
>unless you set the optional <parameter>take_copy</parameter> argument to <litera 
>l>true</literal>. For example:" 
1652msgid ""
1653"To obtain a <application>gtkmm</application> instance from a C "
1654"<classname>GObject</classname> instance, use one of the many overloaded "
1655"<function>Glib::wrap()</function> functions. The C instance’s reference "
1656"count is not incremented, unless you set the optional <parameter>take_copy</"
1657"parameter> argument to <literal>true</literal>. For example:"
716msgstr ""1658msgstr ""
nn1659"För att erhålla en <application>gtkmm</application>-instans från en "
1660"<classname>GObject</classname>-instans i C, använd en av de många "
1661"överlagrade <function>Glib::wrap()</function>-funktionerna. C-instansens "
1662"referensantal ökas inte, om du inte ställer in det valfria argumentet "
1663"<parameter>take_copy</parameter> till <literal>true</literal>. Till exempel: "
1664"<_:programlisting-1/> C++-omslaget ska explicit tas bort om <_:"
1665"itemizedlist-2/> <function>Glib::wrap()</function> binder C- och C++-"
1666"instanserna till varandra. Ta inte bort C++-instansen innan du vill att C-"
1667"instansen ska dö."
7171668
718#. (itstool) path: section/programlisting1669#. (itstool) path: section/programlisting
719#: C/index-in.docbook:5591670#: C/index-in.docbook:559
n720#, no-wrapn1671#, fuzzy, no-wrap
721msgid ""1672msgid ""
722"<code>GtkButton* cbutton = get_a_button();\n"1673"<code>GtkButton* cbutton = get_a_button();\n"
723"Gtk::Button* button = Glib::wrap(cbutton);\n"1674"Gtk::Button* button = Glib::wrap(cbutton);\n"
724"button-&gt;set_label(\"Now I speak C++ too!\");\n"1675"button-&gt;set_label(\"Now I speak C++ too!\");\n"
725"</code>"1676"</code>"
726msgstr ""1677msgstr ""
nn1678"\n"
1679"GtkButton* cbutton = get_a_button();\n"
1680"Gtk::Button* button = Glib::wrap(cbutton);\n"
1681"button-&gt;set_label(\"Nu talar jag även C++!\");\n"
7271682
728#. (itstool) path: listitem/para1683#. (itstool) path: listitem/para
729#: C/index-in.docbook:5651684#: C/index-in.docbook:565
nn1685msgid ""
730msgid "it's a widget or other class that inherits from <classname>Gtk::Object</c1686"it's a widget or other class that inherits from <classname>Gtk::Object</"
>lassname>, and" 
1687"classname>, and"
731msgstr ""1688msgstr ""
nn1689"det är en komponent eller annan klass som ärver från<classname>Gtk::Object</"
1690"classname>, och"
7321691
733#. (itstool) path: listitem/para1692#. (itstool) path: listitem/para
734#: C/index-in.docbook:5661693#: C/index-in.docbook:566
nn1694#, fuzzy
1695msgid ""
735msgid "the C instance has a floating reference when the wrapper is created, and"1696"the C instance has a floating reference when the wrapper is created, and"
736msgstr ""1697msgstr "C-instansen har en flytande referens när omslaget skapas, och"
7371698
738#. (itstool) path: listitem/para1699#. (itstool) path: listitem/para
739#: C/index-in.docbook:5671700#: C/index-in.docbook:567
n740msgid "<function>Gtk::manage()</function> has not been called on it (which inclun1701msgid ""
>des if it was created with <function>Gtk::make_managed()</function>), or" 
1702"<function>Gtk::manage()</function> has not been called on it (which includes "
1703"if it was created with <function>Gtk::make_managed()</function>), or"
741msgstr ""1704msgstr ""
nn1705"<function>Gtk::manage()</function> inte har anropats på det (vilket "
1706"inkluderar om det skapades med <function>Gtk::make_managed()</function>), "
1707"eller"
7421708
743#. (itstool) path: listitem/para1709#. (itstool) path: listitem/para
744#: C/index-in.docbook:5681710#: C/index-in.docbook:568
nn1711#, fuzzy
1712msgid ""
745msgid "<function>Gtk::manage()</function> was called on it, but it was never add1713"<function>Gtk::manage()</function> was called on it, but it was never added "
>ed to a parent." 
1714"to a parent."
746msgstr ""1715msgstr ""
nn1716"<function>Gtk::manage()</function> anropades på det, men det aldrig lades "
1717"till till en överordnad."
7471718
748#. (itstool) path: section/para1719#. (itstool) path: section/para
749#: C/index-in.docbook:5631720#: C/index-in.docbook:563
n750msgid "The <phrase role=\"nowrap\">C++</phrase> wrapper shall be explicitly delen1721msgid ""
>ted if <_:itemizedlist-1/> <function>Glib::wrap()</function> binds the C and <ph 
>rase role=\"nowrap\">C++</phrase> instances to each other. Don't delete the <phr 
>ase role=\"nowrap\">C++</phrase> instance before you want the C instance to die. 
>" 
1722"The <phrase role=\"nowrap\">C++</phrase> wrapper shall be explicitly deleted "
1723"if <_:itemizedlist-1/> <function>Glib::wrap()</function> binds the C and "
1724"<phrase role=\"nowrap\">C++</phrase> instances to each other. Don't delete "
1725"the <phrase role=\"nowrap\">C++</phrase> instance before you want the C "
1726"instance to die."
751msgstr ""1727msgstr ""
7521728
753#. (itstool) path: section/para1729#. (itstool) path: section/para
754#: C/index-in.docbook:5731730#: C/index-in.docbook:573
n755msgid "In all other cases the <phrase role=\"nowrap\">C++</phrase> instance is an1731#, fuzzy
>utomatically deleted when the last reference to the C instance is dropped. This  
>includes all <function>Glib::wrap()</function> overloads that return a <classnam 
>e>Glib::RefPtr</classname>." 
1732msgid ""
1733"In all other cases the <phrase role=\"nowrap\">C++</phrase> instance is "
1734"automatically deleted when the last reference to the C instance is dropped. "
1735"This includes all <function>Glib::wrap()</function> overloads that return a "
1736"<classname>Glib::RefPtr</classname>."
756msgstr ""1737msgstr ""
nn1738"I alla andra fall tas C++-instansen automatiskt bort när den sista "
1739"referensen till C-instansen släpps. Detta inkluderar alla <function>Glib::"
1740"wrap()</function>-överlagringar som returnerar en <classname>Glib::RefPtr</"
1741"classname>."
7571742
758#. (itstool) path: section/title1743#. (itstool) path: section/title
759#: C/index-in.docbook:5801744#: C/index-in.docbook:580
760msgid "Hello World in <application>gtkmm</application>"1745msgid "Hello World in <application>gtkmm</application>"
n761msgstr ""n1746msgstr "Hej världen i <application>gtkmm</application>"
7621747
763#. (itstool) path: section/para1748#. (itstool) path: section/para
764#: C/index-in.docbook:5821749#: C/index-in.docbook:582
n765msgid "We've now learned enough to look at a real example. In accordance with ann1750msgid ""
> ancient tradition of computer science, we now introduce Hello World, a la <appl 
>ication>gtkmm</application>:" 
1751"We've now learned enough to look at a real example. In accordance with an "
1752"ancient tradition of computer science, we now introduce Hello World, a la "
1753"<application>gtkmm</application>:"
766msgstr ""1754msgstr ""
nn1755"Vi har nu lärt oss tillräckligt för att titta på ett riktigt exempel. Enligt "
1756"en uråldrig tradition inom datavetenskap introducerar vi nu ”Hej världen”, "
1757"på <application>gtkmm</application>-sätt:"
7671758
768#. (itstool) path: section/para1759#. (itstool) path: section/para
769#: C/index-in.docbook:5871760#: C/index-in.docbook:587
n770msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren1761msgid ""
>e/master/examples/book/helloworld\">Source Code</link>" 
1762"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
1763"master/examples/book/helloworld\">Source Code</link>"
771msgstr ""1764msgstr ""
nn1765"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
1766"master/examples/book/helloworld\">Källkod</link>"
7721767
773#. (itstool) path: section/para1768#. (itstool) path: section/para
774#: C/index-in.docbook:5891769#: C/index-in.docbook:589
nn1770msgid ""
775msgid "Try to compile and run it before going on. You should see something like 1771"Try to compile and run it before going on. You should see something like "
>this:" 
1772"this:"
776msgstr ""1773msgstr ""
nn1774"Försök kompilera och köra det innan du går vidare. Du bör se något i stil "
1775"med detta:"
7771776
778#. (itstool) path: figure/title1777#. (itstool) path: figure/title
779#: C/index-in.docbook:5941778#: C/index-in.docbook:594
780msgid "Hello World"1779msgid "Hello World"
n781msgstr ""n1780msgstr "Hej världen"
7821781
783#. (itstool) path: imageobject/imagedata1782#. (itstool) path: imageobject/imagedata
784#. This is a reference to an external file such as an image or video. When1783#. This is a reference to an external file such as an image or video. When
785#. the file changes, the md5 hash will change to let you know you need to1784#. the file changes, the md5 hash will change to let you know you need to
786#. update your localized copy. The msgstr is not used at all. Set it to1785#. update your localized copy. The msgstr is not used at all. Set it to
787#. whatever you like once you have updated your copy of the file.1786#. whatever you like once you have updated your copy of the file.
788#: C/index-in.docbook:5961787#: C/index-in.docbook:596
nn1788#, fuzzy
789msgctxt "_"1789msgctxt "_"
nn1790msgid ""
790msgid "external ref='figures/helloworld.png' md5='d599f2ce71f0ba20cad9cb48453f741791"external ref='figures/helloworld.png' md5='d599f2ce71f0ba20cad9cb48453f74f5'"
>f5'" 
791msgstr ""1792msgstr ""
nn1793"external ref='figures/helloworld2.png' md5='b16c41a2b1206bb0a5a3e1e488e198f8'"
7921794
793#. (itstool) path: section/para1795#. (itstool) path: section/para
794#: C/index-in.docbook:6001796#: C/index-in.docbook:600
n795msgid "Pretty thrilling, eh? Let's examine the code. First, the <classname>Hellon1797msgid ""
>World</classname> class:" 
1798"Pretty thrilling, eh? Let's examine the code. First, the "
1799"<classname>HelloWorld</classname> class:"
796msgstr ""1800msgstr ""
nn1801"Visst är det omvälvande? Låt oss utforska koden. Först har vi klassen "
1802"<classname>HelloWorld</classname>:"
7971803
798#. (itstool) path: section/programlisting1804#. (itstool) path: section/programlisting
799#: C/index-in.docbook:6051805#: C/index-in.docbook:605
n800#, no-wrapn1806#, fuzzy, no-wrap
1807#| msgid ""
1808#| "class HelloWorld : public Gtk::Window\n"
1809#| "{\n"
1810#| "public:\n"
1811#| "  HelloWorld();\n"
1812#| "  ~HelloWorld() override;\n"
1813#| "\n"
1814#| "protected:\n"
1815#| "  //Signal handlers:\n"
1816#| "  void on_button_clicked();\n"
1817#| "\n"
1818#| "  //Member widgets:\n"
1819#| "  Gtk::Button m_button;\n"
1820#| "};"
801msgid ""1821msgid ""
802"<code>class HelloWorld : public Gtk::Window\n"1822"<code>class HelloWorld : public Gtk::Window\n"
803"{\n"1823"{\n"
804"public:\n"1824"public:\n"
805"  HelloWorld();\n"1825"  HelloWorld();\n"
811"\n"1831"\n"
812"  //Member widgets:\n"1832"  //Member widgets:\n"
813"  Gtk::Button m_button;\n"1833"  Gtk::Button m_button;\n"
814"};</code>"1834"};</code>"
815msgstr ""1835msgstr ""
nn1836"class HelloWorld : public Gtk::Window\n"
1837"{\n"
1838"public:\n"
1839"  HelloWorld();\n"
1840"  ~HelloWorld() override;\n"
1841"\n"
1842"protected:\n"
1843"  //Signalhanterare:\n"
1844"  void on_button_clicked();\n"
1845"\n"
1846"  //Medlemskomponenter:\n"
1847"  Gtk::Button m_button;\n"
1848"};"
8161849
nn1850# TODO: initialization
817#. (itstool) path: section/para1851#. (itstool) path: section/para
818#: C/index-in.docbook:6191852#: C/index-in.docbook:619
n819msgid "This class implements the \"Hello World\" window. It's derived from <clasn1853#, fuzzy
>sname>Gtk::Window</classname>, and has a single <classname>Gtk::Button</classnam 
>e> as a member. We've chosen to use the constructor to do all of the initializat 
>ion work for the window, including setting up the signals. Here it is, with the  
>comments omitted:" 
1854msgid ""
1855"This class implements the \"Hello World\" window. It's derived from "
1856"<classname>Gtk::Window</classname>, and has a single <classname>Gtk::Button</"
1857"classname> as a member. We've chosen to use the constructor to do all of the "
1858"initialization work for the window, including setting up the signals. Here "
1859"it is, with the comments omitted:"
820msgstr ""1860msgstr ""
nn1861"Denna klass implementerar ”Hej världen”-fönstret. Den härleds från "
1862"<classname>Gtk::Window</classname> och har en ensam <classname>Gtk::Button</"
1863"classname> som medlem. Vi har valt att låta konstruktorn gör allt "
1864"initieringsjobb för fönstret, inklusive att konfigurera signalerna. Här är "
1865"den utan kommentarer:"
8211866
822#. (itstool) path: section/programlisting1867#. (itstool) path: section/programlisting
823#: C/index-in.docbook:6281868#: C/index-in.docbook:628
n824#, no-wrapn1869#, fuzzy, no-wrap
1870#| msgid ""
1871#| "HelloWorld::HelloWorld()\n"
1872#| ": m_button(\"Hello World\")\n"
1873#| "{\n"
1874#| "  m_button.set_margin(10);\n"
1875#| "  m_button.signal_clicked().connect(sigc::mem_fun(*this,\n"
1876#| "    &amp;HelloWorld::on_button_clicked));\n"
1877#| "  set_child(m_button);\n"
1878#| "}"
825msgid ""1879msgid ""
826"<code>HelloWorld::HelloWorld()\n"1880"<code>HelloWorld::HelloWorld()\n"
827": m_button(\"Hello World\")\n"1881": m_button(\"Hello World\")\n"
828"{\n"1882"{\n"
829"  m_button.set_margin(10);\n"1883"  m_button.set_margin(10);\n"
830"  m_button.signal_clicked().connect(sigc::mem_fun(*this,\n"1884"  m_button.signal_clicked().connect(sigc::mem_fun(*this,\n"
831"    &amp;HelloWorld::on_button_clicked));\n"1885"    &amp;HelloWorld::on_button_clicked));\n"
832"  set_child(m_button);\n"1886"  set_child(m_button);\n"
833"}</code>"1887"}</code>"
834msgstr ""1888msgstr ""
nn1889"HelloWorld::HelloWorld()\n"
1890": m_button(\"Hej världen\")\n"
1891"{\n"
1892"  m_button.set_margin(10);\n"
1893"  m_button.signal_clicked().connect(sigc::mem_fun(*this,\n"
1894"    &amp;HelloWorld::on_button_clicked));\n"
1895"  set_child(m_button);\n"
1896"}"
8351897
nn1898# TODO: initializer
836#. (itstool) path: section/para1899#. (itstool) path: section/para
837#: C/index-in.docbook:6371900#: C/index-in.docbook:637
n838msgid "Notice that we've used an initializer statement to give the <literal>m_bun1901#, fuzzy
>tton</literal> object the label \"Hello World\"." 
1902#| msgid ""
1903#| "Notice that we've used an initialiser statement to give the "
1904#| "<literal>m_button</literal> object the label \"Hello World\"."
1905msgid ""
1906"Notice that we've used an initializer statement to give the "
1907"<literal>m_button</literal> object the label \"Hello World\"."
839msgstr ""1908msgstr ""
nn1909"Observera att vi har använt en initierarsats för att ge <literal>m_button</"
1910"literal>-objektet etiketten ”Hej världen”."
8401911
841#. (itstool) path: section/para1912#. (itstool) path: section/para
842#: C/index-in.docbook:6421913#: C/index-in.docbook:642
nn1914msgid ""
843msgid "Next we call the Button's <methodname>set_margin()</methodname> method. T1915"Next we call the Button's <methodname>set_margin()</methodname> method. This "
>his sets the amount of space around the button." 
1916"sets the amount of space around the button."
844msgstr ""1917msgstr ""
nn1918"Härnäst anropar vi <methodname>set_margin()</methodname>-metoden för vår "
1919"Button. Denna ställer in mängden utrymme runt knappen."
8451920
846#. (itstool) path: section/para1921#. (itstool) path: section/para
847#: C/index-in.docbook:6471922#: C/index-in.docbook:647
n848msgid "We then hook up a signal handler to <literal>m_button</literal>'s <literan1923#, fuzzy
>l>clicked</literal> signal. This prints our friendly greeting to <literal>stdout 
></literal>." 
1924msgid ""
1925"We then hook up a signal handler to <literal>m_button</literal>'s "
1926"<literal>clicked</literal> signal. This prints our friendly greeting to "
1927"<literal>stdout</literal>."
849msgstr ""1928msgstr ""
nn1929"Sedan kopplar vi ihop en signalhanterare med <literal>clicked</literal>-"
1930"signalen för <literal>m_button</literal>. Detta skriver ut vår vänliga "
1931"hälsning till <literal>stdout</literal>."
8501932
851#. (itstool) path: section/para1933#. (itstool) path: section/para
852#: C/index-in.docbook:6521934#: C/index-in.docbook:652
n853msgid "Next, we use the Window's <methodname>set_child()</methodname> method to n1935#, fuzzy
>put <literal>m_button</literal> in the Window. The <methodname>set_child()</meth 
>odname> method places the Widget in the Window." 
1936msgid ""
1937"Next, we use the Window's <methodname>set_child()</methodname> method to put "
1938"<literal>m_button</literal> in the Window. The <methodname>set_child()</"
1939"methodname> method places the Widget in the Window."
854msgstr ""1940msgstr ""
nn1941"Härnäst använder vi <methodname>set_child()</methodname>-metoden i Window "
1942"för att sätta <literal>m_button</literal> i vårt Window. Metoden "
1943"<methodname>set_child()</methodname> placerar komponenten i vårt Window."
8551944
856#. (itstool) path: section/para1945#. (itstool) path: section/para
857#: C/index-in.docbook:6581946#: C/index-in.docbook:658
nn1947msgid ""
858msgid "Now let's look at our program's <function>main()</function> function. Her1948"Now let's look at our program's <function>main()</function> function. Here "
>it is, without comments:" 
1949"it is, without comments:"
859msgstr ""1950msgstr ""
nn1951"Låt oss nu titta på vårt programs <function>main()</function>-funktion. Här "
1952"är den utan kommentarer:"
8601953
861#. (itstool) path: section/programlisting1954#. (itstool) path: section/programlisting
862#: C/index-in.docbook:6631955#: C/index-in.docbook:663
n863#, no-wrapn1956#, fuzzy, no-wrap
1957#| msgid ""
1958#| "int main(int argc, char* argv[])\n"
1959#| "{\n"
1960#| "  auto app = Gtk::Application::create(\"org.gtkmm.example\");\n"
1961#| "  return app-&gt;make_window_and_run&lt;HelloWorld&gt;(argc, argv);\n"
1962#| "}"
864msgid ""1963msgid ""
865"<code>int main(int argc, char* argv[])\n"1964"<code>int main(int argc, char* argv[])\n"
866"{\n"1965"{\n"
867"  auto app = Gtk::Application::create(\"org.gtkmm.example\");\n"1966"  auto app = Gtk::Application::create(\"org.gtkmm.example\");\n"
868"  return app-&gt;make_window_and_run&lt;HelloWorld&gt;(argc, argv);\n"1967"  return app-&gt;make_window_and_run&lt;HelloWorld&gt;(argc, argv);\n"
869"}</code>"1968"}</code>"
870msgstr ""1969msgstr ""
nn1970"int main(int argc, char* argv[])\n"
1971"{\n"
1972"  auto app = Gtk::Application::create(\"org.gtkmm.example\");\n"
1973"  return app-&gt;make_window_and_run&lt;HelloWorld&gt;(argc, argv);\n"
1974"}"
8711975
872#. (itstool) path: section/para1976#. (itstool) path: section/para
873#: C/index-in.docbook:6691977#: C/index-in.docbook:669
n874msgid "First we instantiate an object stored in a <classname>Glib::RefPtr</classn1978msgid ""
>name> smartpointer called <literal>app</literal>. This is of type <classname>Gtk 
>::Application</classname>. Every <application>gtkmm</application> program must h 
>ave one of these." 
1979"First we instantiate an object stored in a <classname>Glib::RefPtr</"
1980"classname> smartpointer called <literal>app</literal>. This is of type "
1981"<classname>Gtk::Application</classname>. Every <application>gtkmm</"
1982"application> program must have one of these."
875msgstr ""1983msgstr ""
nn1984"Först instansierar vi ett objekt som lagras i en <classname>Glib::RefPtr</"
1985"classname>-smartpekare som heter <literal>app</literal>. Detta är av typen "
1986"<classname>Gtk::Application</classname>. Varje <application>gtkmm</"
1987"application>-program måste ha ett av dessa."
8761988
877#. (itstool) path: section/para1989#. (itstool) path: section/para
878#: C/index-in.docbook:6741990#: C/index-in.docbook:674
n879msgid "Next we call <methodname>make_window_and_run()</methodname> which createsn1991#, fuzzy
> an object of our <classname>HelloWorld</classname> class, shows that Window and 
> starts the <application>gtkmm</application> <emphasis>event loop</emphasis>. Du 
>ring the event loop <application>gtkmm</application> idles, waiting for actions  
>from the user, and responding appropriately. When the user closes the Window, <m 
>ethodname>make_window_and_run()</methodname> will return, causing our <function> 
>main()</function> function to return. The application will then finish." 
1992msgid ""
1993"Next we call <methodname>make_window_and_run()</methodname> which creates an "
1994"object of our <classname>HelloWorld</classname> class, shows that Window and "
1995"starts the <application>gtkmm</application> <emphasis>event loop</emphasis>. "
1996"During the event loop <application>gtkmm</application> idles, waiting for "
1997"actions from the user, and responding appropriately. When the user closes "
1998"the Window, <methodname>make_window_and_run()</methodname> will return, "
1999"causing our <function>main()</function> function to return. The application "
2000"will then finish."
880msgstr ""2001msgstr ""
nn2002"Härnäst anropar vi <methodname>make_window_and_run()</methodname> vilket "
2003"skapar ett objekt av vår <classname>HelloWorld</classname>-klass, visar "
2004"detta Window och startar <application>gtkmm</application>:s "
2005"<emphasis>händelseslinga</emphasis>. Under händelseslingan är "
2006"<application>gtkmm</application> inaktivt, väntar på åtgärder från "
2007"användaren, och svarar på lämpligt sätt. När användaren stänger detta Window "
2008"kommer <methodname>make_window_and_run()</methodname> returnera, vilket får "
2009"vår <function>main()</function>-funktion att returnera. Programmet avslutas "
2010"då."
8812011
882#. (itstool) path: section/para2012#. (itstool) path: section/para
883#: C/index-in.docbook:6832013#: C/index-in.docbook:683
nn2014msgid ""
884msgid "Like the simple example we showed earlier, this Hello World program does 2015"Like the simple example we showed earlier, this Hello World program does not "
>not use the command-line parameters." 
2016"use the command-line parameters."
885msgstr ""2017msgstr ""
nn2018"Som det enkla exempel vi visade tidigare så använder detta ”Hej världen”-"
2019"program inte kommandoradsparametrarna."
8862020
887#. (itstool) path: chapter/title2021#. (itstool) path: chapter/title
888#: C/index-in.docbook:6922022#: C/index-in.docbook:692
889msgid "Changes in <application>gtkmm</application> 3"2023msgid "Changes in <application>gtkmm</application> 3"
n890msgstr ""n2024msgstr "Ändringar i <application>gtkmm</application> 3"
8912025
892#. (itstool) path: chapter/para2026#. (itstool) path: chapter/para
893#: C/index-in.docbook:6942027#: C/index-in.docbook:694
n894msgid "<application>gtkmm</application>-3.0 is an old version of the <application2028msgid ""
>n>gtkmm</application> API that installs in parallel with the still older <applic 
>ation>gtkmm</application>-2.4 API and the new <application>gtkmm</application>-4 
>.0 API. The last version of the <application>gtkmm</application>-2.4 API was <ap 
>plication>gtkmm</application> 2.24. <application>gtkmm</application> 3 has no ma 
>jor fundamental differences to <application>gtkmm</application> 2 but does make  
>several small changes that were not possible while maintaining binary compatibil 
>ity. If you never used the <application>gtkmm</application>-2.4 API then you can 
> safely ignore this chapter." 
2029"<application>gtkmm</application>-3.0 is an old version of the "
2030"<application>gtkmm</application> API that installs in parallel with the "
2031"still older <application>gtkmm</application>-2.4 API and the new "
2032"<application>gtkmm</application>-4.0 API. The last version of the "
2033"<application>gtkmm</application>-2.4 API was <application>gtkmm</"
2034"application> 2.24. <application>gtkmm</application> 3 has no major "
2035"fundamental differences to <application>gtkmm</application> 2 but does make "
2036"several small changes that were not possible while maintaining binary "
2037"compatibility. If you never used the <application>gtkmm</application>-2.4 "
2038"API then you can safely ignore this chapter."
895msgstr ""2039msgstr ""
nn2040"<application>gtkmm</application>-3.0 är en gammal version av "
2041"<application>gtkmm</application>-API:t som installeras parallellt med det "
2042"ännu äldre <application>gtkmm</application>-2.4-API:t och det nya "
2043"<application>gtkmm</application>-4.0-API:t. Den senaste versionen av "
2044"<application>gtkmm</application>-2.4-API:t var <application>gtkmm</"
2045"application> 2.24. <application>gtkmm</application> 3 har inga större "
2046"fundamentala skillnader mot <application>gtkmm</application> 2 men gör flera "
2047"små ändringar som inte var möjliga att göra samtidigt som binär "
2048"kompatibilitet behölls. Om du aldrig använt <application>gtkmm</"
2049"application>-2.4-API:t kan du lugnt ignorera detta kapitel."
8962050
897#. (itstool) path: chapter/para2051#. (itstool) path: chapter/para
898#: C/index-in.docbook:6962052#: C/index-in.docbook:696
n899msgid "<application>gtkmm</application> 3's library is called <literal>libgtkmm-n2053#, fuzzy
>3.0</literal> rather than <literal>libgtkmm-2.4</literal> and installs its heade 
>rs in a similarly-versioned directory, so your pkg-config check should ask for < 
>literal>gtkmm-3.0</literal> rather than <literal>gtkmm-2.4</literal>." 
2054msgid ""
2055"<application>gtkmm</application> 3's library is called "
2056"<literal>libgtkmm-3.0</literal> rather than <literal>libgtkmm-2.4</literal> "
2057"and installs its headers in a similarly-versioned directory, so your pkg-"
2058"config check should ask for <literal>gtkmm-3.0</literal> rather than "
2059"<literal>gtkmm-2.4</literal>."
900msgstr ""2060msgstr ""
nn2061"Biblioteket för <application>gtkmm</application> 3 kallas "
2062"<literal>libgtkmm-3.0</literal> snarare än <literal>libgtkmm-2.4</literal> "
2063"och installerar sina huvuden i en katalog med liknande version, så din pkg-"
2064"config-kontroll ska fråga efter <literal>gtkmm-3.0</literal> snarare än "
2065"<literal>gtkmm-2.4</literal>."
9012066
902#. (itstool) path: chapter/para2067#. (itstool) path: chapter/para
903#: C/index-in.docbook:6982068#: C/index-in.docbook:698
904msgid "<application>gtkmm</application> 3 added some new classes:"2069msgid "<application>gtkmm</application> 3 added some new classes:"
n905msgstr ""n2070msgstr "<application>gtkmm</application> 3 lade till några nya klasser:"
9062071
907#. (itstool) path: listitem/simpara2072#. (itstool) path: listitem/simpara
908#: C/index-in.docbook:7012073#: C/index-in.docbook:701
n909msgid "<classname>Gtk::AppChooser</classname>, <classname>Gtk::AppChooserButton<n2074msgid ""
>/classname>, <classname>Gtk::AppChooserDialog</classname> allow the user to sele 
>ct an installed application to open a particular type of content." 
2075"<classname>Gtk::AppChooser</classname>, <classname>Gtk::AppChooserButton</"
2076"classname>, <classname>Gtk::AppChooserDialog</classname> allow the user to "
2077"select an installed application to open a particular type of content."
910msgstr ""2078msgstr ""
nn2079"<classname>Gtk::AppChooser</classname>, <classname>Gtk::AppChooserButton</"
2080"classname> och <classname>Gtk::AppChooserDialog</classname> låter användaren "
2081"välja ett installerat program som ska öppna en viss typ av innehåll."
9112082
912#. (itstool) path: listitem/simpara2083#. (itstool) path: listitem/simpara
913#: C/index-in.docbook:7022084#: C/index-in.docbook:702
n914msgid "<classname>Gtk::Grid</classname> is a new container widget that will evenn2085msgid ""
>tually replace <classname>Gtk::Box</classname> and <classname>Gtk::Table</classn 
>ame>. It arranges its children according to properties of those children rather  
>than its own layout details." 
2086"<classname>Gtk::Grid</classname> is a new container widget that will "
2087"eventually replace <classname>Gtk::Box</classname> and <classname>Gtk::"
2088"Table</classname>. It arranges its children according to properties of those "
2089"children rather than its own layout details."
915msgstr ""2090msgstr ""
nn2091"<classname>Gtk::Grid</classname> är en ny behållarkomponent som med tiden "
2092"kommer ersätta <classname>Gtk::Box</classname> och <classname>Gtk::Table</"
2093"classname>. Den arrangerar sina underliggande komponenter enligt "
2094"komponenternas egenskaper snarare än sina egna layoutdetaljer."
9162095
917#. (itstool) path: listitem/simpara2096#. (itstool) path: listitem/simpara
918#: C/index-in.docbook:7032097#: C/index-in.docbook:703
n919msgid "<classname>Gtk::Switch</classname> displays On/Off states more explicitlyn2098msgid ""
> than <classname>Gtk::CheckButton</classname>. It may be useful, for instance, w 
>hen allowing users to activate hardware." 
2099"<classname>Gtk::Switch</classname> displays On/Off states more explicitly "
2100"than <classname>Gtk::CheckButton</classname>. It may be useful, for "
2101"instance, when allowing users to activate hardware."
920msgstr ""2102msgstr ""
nn2103"<classname>Gtk::Switch</classname> visar På/Av-tillstånd tydligare än "
2104"<classname>Gtk::CheckButton</classname>. Det kan exempelvis vara användbart "
2105"när användare tillåts aktivera hårdvara."
9212106
922#. (itstool) path: chapter/para2107#. (itstool) path: chapter/para
923#: C/index-in.docbook:7062108#: C/index-in.docbook:706
n924msgid "<application>gtkmm</application> 3 also made several small changes to then2109msgid ""
> API, which you will probably encounter when porting code that used <application 
>>gtkmm</application>-2.4. Here is a short list:" 
2110"<application>gtkmm</application> 3 also made several small changes to the "
2111"API, which you will probably encounter when porting code that used "
2112"<application>gtkmm</application>-2.4. Here is a short list:"
925msgstr ""2113msgstr ""
nn2114"<application>gtkmm</application> 3 gjorde också flera små ändringar till API:"
2115"t som du troligen kommer stöta på när du porterar kod som använt "
2116"<application>gtkmm</application>-2.4. Här är en kort lista:"
9262117
927#. (itstool) path: listitem/simpara2118#. (itstool) path: listitem/simpara
928#: C/index-in.docbook:7112119#: C/index-in.docbook:711
n929msgid "<classname>Gtk::CellLayout</classname>, used by <classname>Gtk::IconView<n2120#, fuzzy
>/classname>, <classname>Gtk::TreeView::Column</classname> and <classname>Gtk::Co 
>mboBox</classname>, now has a <classname>Gtk::CellArea</classname> which can be  
>used to specify more details of how the <classname>CellRenderer</classname>s are 
> arranged and aligned." 
2121msgid ""
2122"<classname>Gtk::CellLayout</classname>, used by <classname>Gtk::IconView</"
2123"classname>, <classname>Gtk::TreeView::Column</classname> and <classname>Gtk::"
2124"ComboBox</classname>, now has a <classname>Gtk::CellArea</classname> which "
2125"can be used to specify more details of how the <classname>CellRenderer</"
2126"classname>s are arranged and aligned."
930msgstr ""2127msgstr ""
nn2128"<classname>Gtk::CellLayout</classname> som används av <classname>Gtk::"
2129"IconView</classname>, <classname>Gtk::TreeView::Column</classname> och "
2130"<classname>Gtk::ComboBox</classname> har nu en <classname>Gtk::CellArea</"
2131"classname> som kan användas för att ange mer detaljer på hur "
2132"<classname>CellRenderer</classname>-renderarna arrangeras och justeras."
9312133
932#. (itstool) path: listitem/simpara2134#. (itstool) path: listitem/simpara
933#: C/index-in.docbook:7132135#: C/index-in.docbook:713
n934msgid "Gtk::ComboBox now derives from CellLayout, allowing easier layout and alin2136#, fuzzy
>gnment of its <classname>Gtk::CellRenderer</classname>s." 
2137msgid ""
2138"Gtk::ComboBox now derives from CellLayout, allowing easier layout and "
2139"alignment of its <classname>Gtk::CellRenderer</classname>s."
935msgstr ""2140msgstr ""
nn2141"Gtk::ComboBox härleds nu från CellLayout, vilket tillåter lättare layout och "
2142"justering av dess <classname>Gtk::CellRenderer</classname>-renderare."
9362143
937#. (itstool) path: listitem/simpara2144#. (itstool) path: listitem/simpara
938#: C/index-in.docbook:7152145#: C/index-in.docbook:715
n939msgid "<classname>Gtk::Adjustment</classname> and <classname>IconSet</classname>n2146msgid ""
> and <classname>Gdk::Cursor</classname> are now used via <classname>Glib::RefPtr 
></classname>." 
2147"<classname>Gtk::Adjustment</classname> and <classname>IconSet</classname> "
2148"and <classname>Gdk::Cursor</classname> are now used via <classname>Glib::"
2149"RefPtr</classname>."
940msgstr ""2150msgstr ""
nn2151"<classname>Gtk::Adjustment</classname>, <classname>IconSet</classname> och "
2152"<classname>Gdk::Cursor</classname> används nu via <classname>Glib::RefPtr</"
2153"classname>."
9412154
942#. (itstool) path: listitem/simpara2155#. (itstool) path: listitem/simpara
943#: C/index-in.docbook:7172156#: C/index-in.docbook:717
n944msgid "<classname>Gtk::Box</classname>, <classname>Gtk::ButtonBox</classname>, <n2157msgid ""
>classname>Gtk::IconView</classname>, <classname>Gtk::Paned</classname>, <classna 
>me>Gtk::ProgressBar</classname>, <classname>Gtk::ScaleButton</classname>, <class 
>name>Gtk::Scrollbar</classname> and <classname>Gtk::Separator</classname> now de 
>rive from <classname>Gtk::Orientable</classname>, allowing their orientation (ve 
>rtical or horizontal) to be specified without requiring the use of a derived cla 
>ss such as <classname>Gtk::HBox</classname>." 
2158"<classname>Gtk::Box</classname>, <classname>Gtk::ButtonBox</classname>, "
2159"<classname>Gtk::IconView</classname>, <classname>Gtk::Paned</classname>, "
2160"<classname>Gtk::ProgressBar</classname>, <classname>Gtk::ScaleButton</"
2161"classname>, <classname>Gtk::Scrollbar</classname> and <classname>Gtk::"
2162"Separator</classname> now derive from <classname>Gtk::Orientable</"
2163"classname>, allowing their orientation (vertical or horizontal) to be "
2164"specified without requiring the use of a derived class such as "
2165"<classname>Gtk::HBox</classname>."
945msgstr ""2166msgstr ""
nn2167"<classname>Gtk::Box</classname>, <classname>Gtk::ButtonBox</classname>, "
2168"<classname>Gtk::IconView</classname>, <classname>Gtk::Paned</classname>, "
2169"<classname>Gtk::ProgressBar</classname>, <classname>Gtk::ScaleButton</"
2170"classname>, <classname>Gtk::Scrollbar</classname> och <classname>Gtk::"
2171"Separator</classname> härleds nu från <classname>Gtk::Orientable</classname> "
2172"vilket låter deras orientering (vertikal eller horisontell) anges utan att "
2173"kräva användningen av en härledd klass som <classname>Gtk::HBox</classname>."
9462174
947#. (itstool) path: listitem/simpara2175#. (itstool) path: listitem/simpara
948#: C/index-in.docbook:7202176#: C/index-in.docbook:720
n949msgid "<classname>Gtk::IconView</classname>, <classname>Gtk::TextView</classnamen2177#, fuzzy
>>, <classname>Gtk::TreeView</classname> and other widgets derive from Scrollable 
> instead of having their own methods such as <methodname>get_vadjustment()</meth 
>odname> and instead of having their own set_scroll_adjustments signal." 
2178msgid ""
2179"<classname>Gtk::IconView</classname>, <classname>Gtk::TextView</classname>, "
2180"<classname>Gtk::TreeView</classname> and other widgets derive from "
2181"Scrollable instead of having their own methods such as "
2182"<methodname>get_vadjustment()</methodname> and instead of having their own "
2183"set_scroll_adjustments signal."
950msgstr ""2184msgstr ""
nn2185"<classname>Gtk::IconView</classname>, <classname>Gtk::TextView</classname>, "
2186"<classname>Gtk::TreeView</classname> och andra komponenter härleds från "
2187"Scrollable i stället för att ha egna metoder som "
2188"<methodname>get_vadjustment()</methodname> och i stället för att ha sin egen "
2189"set_scroll_adjustments-signal."
9512190
952#. (itstool) path: listitem/simpara2191#. (itstool) path: listitem/simpara
953#: C/index-in.docbook:7222192#: C/index-in.docbook:722
n954msgid "<classname>Gtk::Style</classname> and <classname>Gtk::Rc</classname> weren2193#, fuzzy
> removed, replaced by <classname>Gtk::StyleContext</classname>, and <classname>G 
>tk::StyleProvider</classname>s, such as <classname>Gtk::CssProvider</classname>. 
>" 
2194msgid ""
2195"<classname>Gtk::Style</classname> and <classname>Gtk::Rc</classname> were "
2196"removed, replaced by <classname>Gtk::StyleContext</classname>, and "
2197"<classname>Gtk::StyleProvider</classname>s, such as <classname>Gtk::"
2198"CssProvider</classname>."
955msgstr ""2199msgstr ""
nn2200"<classname>Gtk::Style</classname> och <classname>Gtk::Rc</classname> togs "
2201"bort, ersatta av <classname>Gtk::StyleContext</classname> och olika "
2202"<classname>Gtk::StyleProvider</classname>, som <classname>Gtk::CssProvider</"
2203"classname>."
9562204
957#. (itstool) path: listitem/simpara2205#. (itstool) path: listitem/simpara
958#: C/index-in.docbook:7242206#: C/index-in.docbook:724
n959msgid "Widget::on_expose_event() was replaced by Widget::on_draw(), which assumen2207msgid ""
>s that cairomm is used for drawing, via the provided <classname>Cairo::Context</ 
>classname> and does not require you to call <methodname>Cairo::Context::clip()</ 
>methodname>." 
2208"Widget::on_expose_event() was replaced by Widget::on_draw(), which assumes "
2209"that cairomm is used for drawing, via the provided <classname>Cairo::"
2210"Context</classname> and does not require you to call <methodname>Cairo::"
2211"Context::clip()</methodname>."
960msgstr ""2212msgstr ""
nn2213"Widget::on_expose_event() ersattes av Widget::on_draw(), vilket antar att "
2214"cairomm används för ritning genom tillhandahållen <classname>Cairo::Context</"
2215"classname> och kräver inte att du anropar <methodname>Cairo::Context::"
2216"clip()</methodname>."
9612217
962#. (itstool) path: listitem/simpara2218#. (itstool) path: listitem/simpara
963#: C/index-in.docbook:7262219#: C/index-in.docbook:726
n964msgid "<classname>Gdk::RGBA</classname> replaces <classname>Color</classname>, an2220#, fuzzy
>dding an alpha component for opacity. <classname>Colormap</classname> was remove 
>d, along with its awkward use to allocate colors." 
2221msgid ""
2222"<classname>Gdk::RGBA</classname> replaces <classname>Color</classname>, "
2223"adding an alpha component for opacity. <classname>Colormap</classname> was "
2224"removed, along with its awkward use to allocate colors."
965msgstr ""2225msgstr ""
nn2226"<classname>Gdk::RGBA</classname> ersätter <classname>Color</classname>, "
2227"vilket lägger till en alfakomponent för opacitet. <classname>Colormap</"
2228"classname> togs bort, tillsammans med sin klumpiga användning för att "
2229"allokera färger."
9662230
nn2231# TODO: favor
967#. (itstool) path: listitem/simpara2232#. (itstool) path: listitem/simpara
968#: C/index-in.docbook:7282233#: C/index-in.docbook:728
n969msgid "<classname>Gdk::Pixmap</classname> and <classname>Gdk::Bitmap</classname>n2234#, fuzzy
> were removed in favor of <classname>Gdk::Pixbuf</classname>." 
2235#| msgid ""
2236#| "<classname>Gdk::Pixmap</classname> and <classname>Gdk::Bitmap</classname> "
2237#| "were removed in favour of <classname>Gdk::Pixbuf</classname>."
2238msgid ""
2239"<classname>Gdk::Pixmap</classname> and <classname>Gdk::Bitmap</classname> "
2240"were removed in favor of <classname>Gdk::Pixbuf</classname>."
970msgstr ""2241msgstr ""
nn2242"<classname>Gdk::Pixmap</classname> och <classname>Gdk::Bitmap</classname> "
2243"togs bort till förmån för <classname>Gdk::Pixbuf</classname>."
9712244
972#. (itstool) path: listitem/simpara2245#. (itstool) path: listitem/simpara
973#: C/index-in.docbook:7302246#: C/index-in.docbook:730
nn2247msgid ""
974msgid "<classname>Gdk::Drawable</classname> was removed, with its methods moving2248"<classname>Gdk::Drawable</classname> was removed, with its methods moving "
> into <classname>Gdk::Window</classname>." 
2249"into <classname>Gdk::Window</classname>."
975msgstr ""2250msgstr ""
nn2251"<classname>Gdk::Drawable</classname> togs bort, dess metoder har flyttat "
2252"till <classname>Gdk::Window</classname>."
9762253
977#. (itstool) path: listitem/simpara2254#. (itstool) path: listitem/simpara
978#: C/index-in.docbook:7322255#: C/index-in.docbook:732
nn2256#, fuzzy
2257msgid ""
979msgid "We now use std::vector in several methods instead of the intermediate *Ha2258"We now use std::vector in several methods instead of the intermediate "
>ndle types to make the API clearer." 
2259"*Handle types to make the API clearer."
980msgstr ""2260msgstr ""
nn2261"Vi använder nu std::vector i flera metoder i stället för mellanliggande "
2262"*Handle-typer för att göra API:t tydligare."
9812263
982#. (itstool) path: chapter/para2264#. (itstool) path: chapter/para
983#: C/index-in.docbook:7372265#: C/index-in.docbook:737
n984msgid "All deprecated API was removed in <application>gtkmm</application> 3.0, tn2266msgid ""
>hough there have been new deprecations in later <application>gtkmm</application> 
> 3.x versions." 
2267"All deprecated API was removed in <application>gtkmm</application> 3.0, "
2268"though there have been new deprecations in later <application>gtkmm</"
2269"application> 3.x versions."
985msgstr ""2270msgstr ""
nn2271"Alla föråldrade API:er togs bort i <application>gtkmm</application> 3.0, men "
2272"nya föråldringar har gjorts i senare <application>gtkmm</application> 3.x-"
2273"versioner."
9862274
987#. (itstool) path: chapter/para2275#. (itstool) path: chapter/para
988#: C/index-in.docbook:7392276#: C/index-in.docbook:739
n989msgid "As a first step to porting your source code to <application>gtkmm</applicn2277msgid ""
>ation>-3.0 you should probably ensure that your application builds with the depr 
>ecated <application>gtkmm</application>-2.4 API disabled, by defining macro such 
> as GTKMM_DISABLE_DEPRECATED. There are some autotools macros that can help with 
> this by defining them optionally at build time. See the <link xlink:href=\"http 
>s://wiki.gnome.org/Projects/gtkmm/PortingToGtkmm3\">gtkmm 3 porting wiki page</l 
>ink> for more details." 
2278"As a first step to porting your source code to <application>gtkmm</"
2279"application>-3.0 you should probably ensure that your application builds "
2280"with the deprecated <application>gtkmm</application>-2.4 API disabled, by "
2281"defining macro such as GTKMM_DISABLE_DEPRECATED. There are some autotools "
2282"macros that can help with this by defining them optionally at build time. "
2283"See the <link xlink:href=\"https://wiki.gnome.org/Projects/gtkmm/"
2284"PortingToGtkmm3\">gtkmm 3 porting wiki page</link> for more details."
990msgstr ""2285msgstr ""
nn2286"Som ett första steg för att portera din källkod till <application>gtkmm</"
2287"application>-3.0 bör du troligen säkerställa att ditt program går bygga med "
2288"det föråldrade <application>gtkmm</application>-2.4-API:t inaktiverat, genom "
2289"att definiera makron som GTKMM_DISABLE_DEPRECATED. Det finns några autotools-"
2290"makron som kan hjälpa till med detta genom att valfritt definiera dem vid "
2291"byggtid. Se <link xlink:href=\"https://wiki.gnome.org/Projects/gtkmm/"
2292"PortingToGtkmm3\">wikisidan för portering till gtkmm 3</link> för mer "
2293"detaljer."
9912294
992#. (itstool) path: chapter/title2295#. (itstool) path: chapter/title
993#: C/index-in.docbook:7442296#: C/index-in.docbook:744
n994msgid "Changes in <application>gtkmm</application>-4.0 and <application>glibmm-2n2297msgid ""
>.68</application>" 
2298"Changes in <application>gtkmm</application>-4.0 and "
2299"<application>glibmm-2.68</application>"
995msgstr ""2300msgstr ""
nn2301"Ändringar i <application>gtkmm</application>-4.0 och "
2302"<application>glibmm-2.68</application>"
9962303
997#. (itstool) path: chapter/para2304#. (itstool) path: chapter/para
998#: C/index-in.docbook:7462305#: C/index-in.docbook:746
n999msgid "<application>gtkmm</application>-4.0 is a new version of the <applicationn2306msgid ""
>>gtkmm</application> API that installs in parallel with the older <application>g 
>tkmm</application>-2.4 and <application>gtkmm</application>-3.0 APIs. The last v 
>ersion of the <application>gtkmm</application>-3.0 API is <application>gtkmm</ap 
>plication> 3.24. <application>gtkmm</application> 4 has no major fundamental dif 
>ferences to <application>gtkmm</application> 3 but does make several changes (bo 
>th small and large ones) that were not possible while maintaining binary compati 
>bility. If you never used the <application>gtkmm</application>-3.0 API then you  
>can safely ignore this chapter." 
2307"<application>gtkmm</application>-4.0 is a new version of the "
2308"<application>gtkmm</application> API that installs in parallel with the "
2309"older <application>gtkmm</application>-2.4 and <application>gtkmm</"
2310"application>-3.0 APIs. The last version of the <application>gtkmm</"
2311"application>-3.0 API is <application>gtkmm</application> 3.24. "
2312"<application>gtkmm</application> 4 has no major fundamental differences to "
2313"<application>gtkmm</application> 3 but does make several changes (both small "
2314"and large ones) that were not possible while maintaining binary "
2315"compatibility. If you never used the <application>gtkmm</application>-3.0 "
2316"API then you can safely ignore this chapter."
1000msgstr ""2317msgstr ""
nn2318"<application>gtkmm</application>-4.0 är en ny version av <application>gtkmm</"
2319"application>-API:t som installeras parallellt med de äldre API:erna "
2320"<application>gtkmm</application>-2.4 och <application>gtkmm</"
2321"application>-3.0. Den senaste versionen av <application>gtkmm</"
2322"application>-3.0-API:t är <application>gtkmm</application> 3.24. "
2323"<application>gtkmm</application> 4 har inga större fundamentala skillnader "
2324"mot <application>gtkmm</application> 3 men gör flera ändringar (både stora "
2325"och små) som inte var möjliga att göra samtidigt som binär kompatibilitet "
2326"behölls. Om du aldrig använt <application>gtkmm</application>-3.0-API:t kan "
2327"du lugnt ignorera detta kapitel."
10012328
1002#. (itstool) path: chapter/para2329#. (itstool) path: chapter/para
1003#: C/index-in.docbook:7542330#: C/index-in.docbook:754
n1004msgid "<application>gtkmm</application> 4's library is called <literal>libgtkmm-n2331#, fuzzy
>4.0</literal> rather than <literal>libgtkmm-3.0</literal> and installs its heade 
>rs in a similarly-versioned directory, so your <application>pkg-config</applicat 
>ion> check should ask for <literal>gtkmm-4.0</literal> rather than <literal>gtkm 
>m-3.0</literal>." 
2332msgid ""
2333"<application>gtkmm</application> 4's library is called "
2334"<literal>libgtkmm-4.0</literal> rather than <literal>libgtkmm-3.0</literal> "
2335"and installs its headers in a similarly-versioned directory, so your "
2336"<application>pkg-config</application> check should ask for "
2337"<literal>gtkmm-4.0</literal> rather than <literal>gtkmm-3.0</literal>."
1005msgstr ""2338msgstr ""
nn2339"Biblioteket för <application>gtkmm</application> 4 kallas "
2340"<literal>libgtkmm-4.0</literal> snarare än <literal>libgtkmm-3.0</literal> "
2341"och installerar sina huvuden i en katalog med liknande version, så din "
2342"<application>pkg-config</application>-kontroll ska fråga efter "
2343"<literal>gtkmm-4.0</literal> snarare än <literal>gtkmm-3.0</literal>."
10062344
1007#. (itstool) path: chapter/para2345#. (itstool) path: chapter/para
1008#: C/index-in.docbook:7602346#: C/index-in.docbook:760
n1009msgid "<application>gtkmm</application>-4.0 is used in combination with <applican2347#, fuzzy
>tion>glibmm-2.68</application>, which sets the global locale for your program. T 
>he older <application>glibmm-2.4</application> does not do that, and <applicatio 
>n>gtkmm</application>-3.0 does it only to some extent. What this means is briefl 
>y that if your <application>gtkmm</application>-3.0 program contains a call to < 
>function>std::locale::global(std::locale(\"\"))</function>, you can probably rem 
>ove it. If you don't want <application>glibmm</application> or <application>gtkm 
>m</application> to set the global locale for you, you should add a call to <func 
>tion>Glib::set_init_to_users_preferred_locale(false)</function> before any call  
>to <function>Glib::init()</function> or <methodname>Gtk::Application::create()</ 
>methodname>. See the <application>glibmm</application> <link xlink:href=\"https: 
>//gnome.pages.gitlab.gnome.org/glibmm/namespaceGlib.html\"> reference</link>." 
2348msgid ""
2349"<application>gtkmm</application>-4.0 is used in combination with "
2350"<application>glibmm-2.68</application>, which sets the global locale for "
2351"your program. The older <application>glibmm-2.4</application> does not do "
2352"that, and <application>gtkmm</application>-3.0 does it only to some extent. "
2353"What this means is briefly that if your <application>gtkmm</application>-3.0 "
2354"program contains a call to <function>std::locale::global(std::locale(\"\"))</"
2355"function>, you can probably remove it. If you don't want "
2356"<application>glibmm</application> or <application>gtkmm</application> to set "
2357"the global locale for you, you should add a call to <function>Glib::"
2358"set_init_to_users_preferred_locale(false)</function> before any call to "
2359"<function>Glib::init()</function> or <methodname>Gtk::Application::create()</"
2360"methodname>. See the <application>glibmm</application> <link xlink:"
2361"href=\"https://gnome.pages.gitlab.gnome.org/glibmm/namespaceGlib.html\"> "
2362"reference</link>."
1010msgstr ""2363msgstr ""
nn2364"<application>gtkmm</application>-4.0 används i kombination med "
2365"<application>glibmm-2.68</application>, vilket ställer in den globala "
2366"lokalen för ditt program. Det äldre <application>glibmm-2.4</application> "
2367"gör inte det, och <application>gtkmm</application>-3.0 gör det bara till "
2368"viss del. Vad detta betyder är helt kort att om ditt <application>gtkmm</"
2369"application>-3.0-program innehåller ett anrop till <function>std::locale::"
2370"global(std::locale(\"\"))</function> så kan du troligen ta bort det. Om du "
2371"inte vill att <application>glibmm</application> eller <application>gtkmm</"
2372"application> ska ställa in den globala lokalen åt dig så ska du lägga till "
2373"ett anrop till <function>Glib::set_init_to_users_preferred_locale(false)</"
2374"function> före anrop <function>Glib::init()</function> eller "
2375"<methodname>Gtk::Application::create()</methodname>."
10112376
1012#. (itstool) path: chapter/para2377#. (itstool) path: chapter/para
1013#: C/index-in.docbook:7722378#: C/index-in.docbook:772
n1014msgid "There are lots and lots of differences between <application>gtkmm</applicn2379msgid ""
>ation>-3.0 and <application>gtkmm</application>-4.0. The following lists are not 
> complete." 
2380"There are lots and lots of differences between <application>gtkmm</"
2381"application>-3.0 and <application>gtkmm</application>-4.0. The following "
2382"lists are not complete."
1015msgstr ""2383msgstr ""
nn2384"Det finns massor av skillnader mellan <application>gtkmm</application>-3.0 "
2385"och <application>gtkmm</application>-4.0. Följande listor är inte "
2386"fullständiga."
10162387
1017#. (itstool) path: chapter/para2388#. (itstool) path: chapter/para
1018#: C/index-in.docbook:7752389#: C/index-in.docbook:775
nn2390msgid ""
1019msgid "There are some important behavioural changes, to which you must adapt whe2391"There are some important behavioural changes, to which you must adapt when "
>migrating:" 
2392"migrating:"
1020msgstr ""2393msgstr ""
10212394
1022#. (itstool) path: listitem/simpara2395#. (itstool) path: listitem/simpara
1023#: C/index-in.docbook:7782396#: C/index-in.docbook:778
n1024msgid "Whereas in <application>gtkmm</application>-3.0, destruction of a non-mann2397msgid ""
>aged <phrase role=\"nowrap\">C++</phrase> widget wrapper caused the wrapped GtkW 
>idget to be destroyed, changes in GTK4 mean that in <application>gtkmm</applicat 
>ion>-4.0 this canʼt always be the case. GTK4 has no uniform way to remove a widg 
>et from a parent, as GTK3 did with <methodname>Gtk::Container::remove()</methodn 
>ame>, so <application>gtkmm</application>-4.0 canʼt do the removal for you as <a 
>pplication>gtkmm</application>-3.0 did. Hence, if a non-managed <phrase role=\"n 
>owrap\">C++</phrase> widget instance is destructed while the widget is a child o 
>f another, <application>gtkmm</application>-4.0 wonʼt remove it from the parent, 
> the parent retains a ref that stops the child being disposed, and the GtkWidget 
> stays alive. The end result is that to destroy a non-managed widget with its <p 
>hrase role=\"nowrap\">C++</phrase> wrapper you must first remove it from its par 
>ent (however that parent allows) so the <phrase role=\"nowrap\">C++</phrase> wra 
>pperʼs dtor can drop the final reference." 
2398"Whereas in <application>gtkmm</application>-3.0, destruction of a non-"
2399"managed <phrase role=\"nowrap\">C++</phrase> widget wrapper caused the "
2400"wrapped GtkWidget to be destroyed, changes in GTK4 mean that in "
2401"<application>gtkmm</application>-4.0 this canʼt always be the case. GTK4 has "
2402"no uniform way to remove a widget from a parent, as GTK3 did with "
2403"<methodname>Gtk::Container::remove()</methodname>, so <application>gtkmm</"
2404"application>-4.0 canʼt do the removal for you as <application>gtkmm</"
2405"application>-3.0 did. Hence, if a non-managed <phrase role=\"nowrap\">C++</"
2406"phrase> widget instance is destructed while the widget is a child of "
2407"another, <application>gtkmm</application>-4.0 wonʼt remove it from the "
2408"parent, the parent retains a ref that stops the child being disposed, and "
2409"the GtkWidget stays alive. The end result is that to destroy a non-managed "
2410"widget with its <phrase role=\"nowrap\">C++</phrase> wrapper you must first "
2411"remove it from its parent (however that parent allows) so the <phrase "
2412"role=\"nowrap\">C++</phrase> wrapperʼs dtor can drop the final reference."
1025msgstr ""2413msgstr ""
10262414
1027#. (itstool) path: chapter/para2415#. (itstool) path: chapter/para
1028#: C/index-in.docbook:7912416#: C/index-in.docbook:791
nn2417msgid ""
1029msgid "Some new classes were added in <application>gtkmm</application> 4 and <ap2418"Some new classes were added in <application>gtkmm</application> 4 and "
>plication>glibmm</application> 2.68:" 
2419"<application>glibmm</application> 2.68:"
1030msgstr ""2420msgstr ""
nn2421"Några nya klasser lades till i <application>gtkmm</application> 4 och "
2422"<application>glibmm</application> 2.68:"
10312423
1032#. (itstool) path: listitem/simpara2424#. (itstool) path: listitem/simpara
1033#: C/index-in.docbook:7932425#: C/index-in.docbook:793
n1034msgid "<classname>Glib::ExtraClassInit</classname> and <classname>Gtk::Snapshot<n2426msgid ""
>/classname>: These classes are needed only for writing custom widgets. See the < 
>link linkend=\"sec-custom-widgets\">Custom Widgets</link> section." 
2427"<classname>Glib::ExtraClassInit</classname> and <classname>Gtk::Snapshot</"
2428"classname>: These classes are needed only for writing custom widgets. See "
2429"the <link linkend=\"sec-custom-widgets\">Custom Widgets</link> section."
1035msgstr ""2430msgstr ""
nn2431"<classname>Glib::ExtraClassInit</classname> och <classname>Gtk::Snapshot</"
2432"classname>: Dessa klasser behövs endast för att skriva anpassade "
2433"komponenter. Se avsnittet <link linkend=\"sec-custom-widgets\">Anpassade "
2434"komponenter</link>."
10362435
1037#. (itstool) path: listitem/simpara2436#. (itstool) path: listitem/simpara
1038#: C/index-in.docbook:7962437#: C/index-in.docbook:796
n1039msgid "<classname>Gtk::EventControllerKey</classname>, <classname>Gtk::EventContn2438msgid ""
>rollerMotion</classname>, <classname>Gtk::EventControllerScroll</classname> and  
><classname>Gtk::GestureStylus</classname>" 
2439"<classname>Gtk::EventControllerKey</classname>, <classname>Gtk::"
2440"EventControllerMotion</classname>, <classname>Gtk::EventControllerScroll</"
2441"classname> and <classname>Gtk::GestureStylus</classname>"
1040msgstr ""2442msgstr ""
nn2443"<classname>Gtk::EventControllerKey</classname>, <classname>Gtk::"
2444"EventControllerMotion</classname>, <classname>Gtk::EventControllerScroll</"
2445"classname> och <classname>Gtk::GestureStylus</classname>"
10412446
1042#. (itstool) path: listitem/simpara2447#. (itstool) path: listitem/simpara
1043#: C/index-in.docbook:7992448#: C/index-in.docbook:799
n1044msgid "<classname>Gdk::Paintable</classname>, <classname>Gdk::Texture</classnamen2449msgid ""
>>, <classname>Gtk::Picture</classname> and <classname>Gtk::WidgetPaintable</clas 
>sname>" 
2450"<classname>Gdk::Paintable</classname>, <classname>Gdk::Texture</classname>, "
2451"<classname>Gtk::Picture</classname> and <classname>Gtk::WidgetPaintable</"
2452"classname>"
1045msgstr ""2453msgstr ""
nn2454"<classname>Gdk::Paintable</classname>, <classname>Gdk::Texture</classname>, "
2455"<classname>Gtk::Picture</classname> och <classname>Gtk::WidgetPaintable</"
2456"classname>"
10462457
1047#. (itstool) path: listitem/simpara2458#. (itstool) path: listitem/simpara
1048#: C/index-in.docbook:8022459#: C/index-in.docbook:802
n1049msgid "<classname>Gdk::Window</classname> has been renamed to <classname>Gdk::Sun2460msgid ""
>rface</classname>. (<classname>Gtk::Window</classname> keeps its name.)" 
2461"<classname>Gdk::Window</classname> has been renamed to <classname>Gdk::"
2462"Surface</classname>. (<classname>Gtk::Window</classname> keeps its name.)"
1050msgstr ""2463msgstr ""
nn2464"<classname>Gdk::Window</classname> har bytt namn till <classname>Gdk::"
2465"Surface</classname>. (<classname>Gtk::Window</classname> behåller sitt namn.)"
10512466
1052#. (itstool) path: listitem/simpara2467#. (itstool) path: listitem/simpara
1053#: C/index-in.docbook:8042468#: C/index-in.docbook:804
n1054msgid "<classname>Gdk::DrawContext</classname> and <classname>Gdk::CairoContext<n2469msgid ""
>/classname> are new. <classname>Gdk::DrawingContext</classname> has been removed 
>." 
2470"<classname>Gdk::DrawContext</classname> and <classname>Gdk::CairoContext</"
2471"classname> are new. <classname>Gdk::DrawingContext</classname> has been "
2472"removed."
1055msgstr ""2473msgstr ""
nn2474"<classname>Gdk::DrawContext</classname> och <classname>Gdk::CairoContext</"
2475"classname> är nya. <classname>Gdk::DrawingContext</classname> har tagits "
2476"bort."
10562477
1057#. (itstool) path: listitem/simpara2478#. (itstool) path: listitem/simpara
1058#: C/index-in.docbook:8062479#: C/index-in.docbook:806
nn2480msgid ""
1059msgid "<classname>Gtk::Clipboard</classname> has been replaced by the new <class2481"<classname>Gtk::Clipboard</classname> has been replaced by the new "
>name>Gdk::Clipboard</classname>." 
2482"<classname>Gdk::Clipboard</classname>."
1060msgstr ""2483msgstr ""
nn2484"<classname>Gtk::Clipboard</classname> har ersatts av den nya <classname>Gdk::"
2485"Clipboard</classname>."
10612486
1062#. (itstool) path: listitem/simpara2487#. (itstool) path: listitem/simpara
1063#: C/index-in.docbook:8082488#: C/index-in.docbook:808
n1064msgid "<classname>Gdk::DragContext</classname> has been split into <classname>Gdn2489msgid ""
>k::Drag</classname> and <classname>Gdk::Drop</classname>." 
2490"<classname>Gdk::DragContext</classname> has been split into <classname>Gdk::"
2491"Drag</classname> and <classname>Gdk::Drop</classname>."
1065msgstr ""2492msgstr ""
nn2493"<classname>Gdk::DragContext</classname> har delats upp i <classname>Gdk::"
2494"Drag</classname> och <classname>Gdk::Drop</classname>."
10662495
1067#. (itstool) path: chapter/para2496#. (itstool) path: chapter/para
1068#: C/index-in.docbook:8122497#: C/index-in.docbook:812
n1069msgid "There have also been several changes to the API, which you will probably n2498msgid ""
>encounter when porting code that used <application>gtkmm</application>-3.0 and < 
>application>glibmm</application>-2.4. Here is a short list:" 
2499"There have also been several changes to the API, which you will probably "
2500"encounter when porting code that used <application>gtkmm</application>-3.0 "
2501"and <application>glibmm</application>-2.4. Here is a short list:"
1070msgstr ""2502msgstr ""
nn2503"Det har också skett flera ändringar till API:t, vilket du troligen kommer "
2504"stöta på när du porterar kod som använt <application>gtkmm</application>-3.0 "
2505"och <application>glibmm</application>-2.4. Här är en kort lista:"
10712506
1072#. (itstool) path: listitem/simpara2507#. (itstool) path: listitem/simpara
1073#: C/index-in.docbook:8162508#: C/index-in.docbook:816
1074msgid "A C++17 compiler is required."2509msgid "A C++17 compiler is required."
n1075msgstr ""n2510msgstr "En C++17-kompilator krävs."
10762511
1077#. (itstool) path: listitem/simpara2512#. (itstool) path: listitem/simpara
1078#: C/index-in.docbook:8172513#: C/index-in.docbook:817
n1079msgid "<classname>Gtk::Button</classname>, <classname>Gtk::ToolButton</classnamen2514msgid ""
>>, <classname>Gtk::MenuItem</classname> and <classname>Gtk::Switch</classname> i 
>mplement the <classname>Gtk::Actionable</classname> interface instead of the rem 
>oved <classname>Gtk::Activatable</classname> interface." 
2515"<classname>Gtk::Button</classname>, <classname>Gtk::ToolButton</classname>, "
2516"<classname>Gtk::MenuItem</classname> and <classname>Gtk::Switch</classname> "
2517"implement the <classname>Gtk::Actionable</classname> interface instead of "
2518"the removed <classname>Gtk::Activatable</classname> interface."
1080msgstr ""2519msgstr ""
nn2520"<classname>Gtk::Button</classname>, <classname>Gtk::ToolButton</classname>, "
2521"<classname>Gtk::MenuItem</classname> och <classname>Gtk::Switch</classname> "
2522"implementerar <classname>Gtk::Actionable</classname>-gränssnittet i stället "
2523"för det borttagna <classname>Gtk::Activatable</classname>-gränssnittet."
10812524
1082#. (itstool) path: listitem/simpara2525#. (itstool) path: listitem/simpara
1083#: C/index-in.docbook:8212526#: C/index-in.docbook:821
nn2527msgid ""
1084msgid "<classname>Gtk::FontButton</classname> implements the <classname>Gtk::Fon2528"<classname>Gtk::FontButton</classname> implements the <classname>Gtk::"
>tChooser</classname> interface." 
2529"FontChooser</classname> interface."
1085msgstr ""2530msgstr ""
nn2531"<classname>Gtk::FontButton</classname> implementerar gränssnittet "
2532"<classname>Gtk::FontChooser</classname>."
10862533
1087#. (itstool) path: listitem/simpara2534#. (itstool) path: listitem/simpara
1088#: C/index-in.docbook:8222535#: C/index-in.docbook:822
n1089msgid "<classname>Gtk::Widget</classname>: The <methodname>get_preferred_*_vfuncn2536#, fuzzy
>()</methodname>s have been replaced by <methodname>measure_vfunc()</methodname>. 
> This change only affects custom widgets." 
2537msgid ""
2538"<classname>Gtk::Widget</classname>: The <methodname>get_preferred_*_vfunc()</"
2539"methodname>s have been replaced by <methodname>measure_vfunc()</methodname>. "
2540"This change only affects custom widgets."
1090msgstr ""2541msgstr ""
nn2542"<classname>Gtk::Widget</classname>: De olika "
2543"<methodname>get_preferred_*_vfunc()</methodname> har ersatts med "
2544"<methodname>measure_vfunc()</methodname>. Denna ändring påverkar bara "
2545"anpassade komponenter."
10912546
1092#. (itstool) path: listitem/simpara2547#. (itstool) path: listitem/simpara
1093#: C/index-in.docbook:8252548#: C/index-in.docbook:825
n1094msgid "<classname>sigc::slot</classname>s use the <classname>sigc::slot&lt;R(Argn2549#, fuzzy
>s...)&gt;</classname> syntax. Example: <classname>sigc::slot&lt;void(int, int)&g 
>t;</classname> instead of <classname>sigc::slot&lt;void, int, int&gt;</classname 
>>." 
2550msgid ""
2551"<classname>sigc::slot</classname>s use the <classname>sigc::slot&lt;"
2552"R(Args...)&gt;</classname> syntax. Example: <classname>sigc::slot&lt;"
2553"void(int, int)&gt;</classname> instead of <classname>sigc::slot&lt;void, "
2554"int, int&gt;</classname>."
1095msgstr ""2555msgstr ""
nn2556"<classname>sigc::slot</classname> använder syntaxen <classname>sigc::slot&lt;"
2557"R(Args...)&gt;</classname>. Exempel: <classname>sigc::slot&lt;void(int, "
2558"int)&gt;</classname> i stället för <classname>sigc::slot&lt;void, int, "
2559"int&gt;</classname>."
10962560
1097#. (itstool) path: listitem/simpara2561#. (itstool) path: listitem/simpara
1098#: C/index-in.docbook:8272562#: C/index-in.docbook:827
nn2563#, fuzzy
2564msgid ""
1099msgid "<classname>Gtk::DrawingArea</classname> uses a draw function instead of t2565"<classname>Gtk::DrawingArea</classname> uses a draw function instead of the "
>he draw signal." 
2566"draw signal."
1100msgstr ""2567msgstr ""
nn2568"<classname>Gtk::DrawingArea</classname> använder en ritfunktion i stället "
2569"för signalen draw."
11012570
1102#. (itstool) path: listitem/simpara2571#. (itstool) path: listitem/simpara
1103#: C/index-in.docbook:8282572#: C/index-in.docbook:828
n1104msgid "<classname>Glib::ArrayHandle</classname>, <classname>Glib::StringArrayHann2573#, fuzzy
>dle</classname>, <classname>Glib::ListHandle</classname> and <classname>Glib::SL 
>istHandle</classname> have been removed. They were used in <application>glibmm</ 
>application>-2.4, but not used in <application>gtkmm</application>-3.0. If you'v 
>e ever used these classes, replace them with a standard <phrase role=\"nowrap\"> 
>C++</phrase> container, such as <classname>std::vector</classname>." 
2574#| msgid ""
2575#| "<classname>Glib::ArrayHandle</classname>, <classname>Glib::"
2576#| "StringArrayHandle</classname>, <classname>Glib::ListHandle</classname> "
2577#| "and <classname>Glib::SListHandle</classname> have been removed. They were "
2578#| "used in <application>glibmm</application>-2.4, but not used in "
2579#| "<application>gtkmm</application>-3.0. If you've ever used these classes, "
2580#| "replace them with a standard C++ container, such as <classname>std::"
2581#| "vector</classname>."
2582msgid ""
2583"<classname>Glib::ArrayHandle</classname>, <classname>Glib::"
2584"StringArrayHandle</classname>, <classname>Glib::ListHandle</classname> and "
2585"<classname>Glib::SListHandle</classname> have been removed. They were used "
2586"in <application>glibmm</application>-2.4, but not used in "
2587"<application>gtkmm</application>-3.0. If you've ever used these classes, "
2588"replace them with a standard <phrase role=\"nowrap\">C++</phrase> container, "
2589"such as <classname>std::vector</classname>."
1105msgstr ""2590msgstr ""
nn2591"<classname>Glib::ArrayHandle</classname>, <classname>Glib::"
2592"StringArrayHandle</classname>, <classname>Glib::ListHandle</classname> och "
2593"<classname>Glib::SListHandle</classname> har tagits bort. De användes i "
2594"<application>glibmm</application>-2.4, men används inte i "
2595"<application>gtkmm</application>-3.0. Om du har använt dessa klasser kan du "
2596"ersätta dem med en C++-standardbehållare som <classname>std::vector</"
2597"classname>."
11062598
1107#. (itstool) path: listitem/simpara2599#. (itstool) path: listitem/simpara
1108#: C/index-in.docbook:8322600#: C/index-in.docbook:832
1109msgid "<classname>Gtk::Container</classname> has been removed."2601msgid "<classname>Gtk::Container</classname> has been removed."
n1110msgstr ""n2602msgstr "<classname>Gtk::Container</classname> har tagits bort."
11112603
1112#. (itstool) path: listitem/simpara2604#. (itstool) path: listitem/simpara
1113#: C/index-in.docbook:8332605#: C/index-in.docbook:833
n1114msgid "<methodname>Gtk::Widget::show_all()</methodname> has been removed. The den2606msgid ""
>fault value of <methodname>Gtk::Widget::property_visible()</methodname> has been 
> changed from <literal>false</literal> to <literal>true</literal>." 
2607"<methodname>Gtk::Widget::show_all()</methodname> has been removed. The "
2608"default value of <methodname>Gtk::Widget::property_visible()</methodname> "
2609"has been changed from <literal>false</literal> to <literal>true</literal>."
1115msgstr ""2610msgstr ""
nn2611"<methodname>Gtk::Widget::show_all()</methodname> har tagits bort. "
2612"Standardvärdet för <methodname>Gtk::Widget::property_visible()</methodname> "
2613"har ändrats från <literal>false</literal> till <literal>true</literal>."
11162614
1117#. (itstool) path: listitem/simpara2615#. (itstool) path: listitem/simpara
1118#: C/index-in.docbook:8362616#: C/index-in.docbook:836
n1119msgid "All event signals have been removed from <classname>Gtk::Widget</classnamn2617msgid ""
>e>. In most cases you can use one of the subclasses of <classname>Gtk::EventCont 
>roller</classname> as a replacement. For instance, use <classname>Gtk::GestureMu 
>ltiPress</classname> instead of <methodname>signal_button_press_event()</methodn 
>ame> and <methodname>signal_button_release_event()</methodname>, and <classname> 
>Gtk::EventControllerKey</classname> instead of <methodname>signal_key_press_even 
>t()</methodname> and <methodname>signal_key_release_event()</methodname>." 
2618"All event signals have been removed from <classname>Gtk::Widget</classname>. "
2619"In most cases you can use one of the subclasses of <classname>Gtk::"
2620"EventController</classname> as a replacement. For instance, use "
2621"<classname>Gtk::GestureMultiPress</classname> instead of "
2622"<methodname>signal_button_press_event()</methodname> and "
2623"<methodname>signal_button_release_event()</methodname>, and <classname>Gtk::"
2624"EventControllerKey</classname> instead of "
2625"<methodname>signal_key_press_event()</methodname> and "
2626"<methodname>signal_key_release_event()</methodname>."
1120msgstr ""2627msgstr ""
nn2628"Alla händelsesignaler har tagits bort från <classname>Gtk::Widget</"
2629"classname>. I de flesta fall kan du använda en av underklasserna för "
2630"<classname>Gtk::EventController</classname> som ersättning. Använd till "
2631"exempel <classname>Gtk::GestureMultiPress</classname> i stället för "
2632"<methodname>signal_button_press_event()</methodname> och "
2633"<methodname>signal_button_release_event()</methodname>, och <classname>Gtk::"
2634"EventControllerKey</classname> i stället för "
2635"<methodname>signal_key_press_event()</methodname> och "
2636"<methodname>signal_key_release_event()</methodname>."
11212637
1122#. (itstool) path: listitem/simpara2638#. (itstool) path: listitem/simpara
1123#: C/index-in.docbook:8432639#: C/index-in.docbook:843
n1124msgid "<classname>Glib::RefPtr</classname> is an alias for <classname>std::sharen2640msgid ""
>d_ptr</classname>. If you make your own <classname>Glib::ObjectBase</classname>- 
>derived classes with <methodname>create()</methodname> methods that return a <cl 
>assname>Glib::RefPtr</classname>, you must use <methodname>Glib::make_refptr_for 
>_instance()</methodname> in your <methodname>create()</methodname> methods." 
2641"<classname>Glib::RefPtr</classname> is an alias for <classname>std::"
2642"shared_ptr</classname>. If you make your own <classname>Glib::ObjectBase</"
2643"classname>-derived classes with <methodname>create()</methodname> methods "
2644"that return a <classname>Glib::RefPtr</classname>, you must use "
2645"<methodname>Glib::make_refptr_for_instance()</methodname> in your "
2646"<methodname>create()</methodname> methods."
1125msgstr ""2647msgstr ""
nn2648"<classname>Glib::RefPtr</classname> är ett alias för <classname>std::"
2649"shared_ptr</classname>. Om du gör dina egna <classname>Glib::ObjectBase</"
2650"classname>-härledda klasser med <methodname>create()</methodname>-metoder "
2651"som returnerar en <classname>Glib::RefPtr</classname> så måste du använda "
2652"<methodname>Glib::make_refptr_for_instance()</methodname> i dina "
2653"<methodname>create()</methodname>-metoder."
11262654
1127#. (itstool) path: listitem/simpara2655#. (itstool) path: listitem/simpara
1128#: C/index-in.docbook:8482656#: C/index-in.docbook:848
n1129msgid "<methodname>Gtk::Box::pack_start()</methodname> and <methodname>Gtk::Box:n2657msgid ""
>:pack_end()</methodname> have been removed. Use the new <classname>Gtk::Box</cla 
>ssname> methods <methodname>append()</methodname>, <methodname>prepend()</method 
>name>, <methodname>insert_child_after()</methodname> and <methodname>insert_chil 
>d_at_start()</methodname>." 
2658"<methodname>Gtk::Box::pack_start()</methodname> and <methodname>Gtk::Box::"
2659"pack_end()</methodname> have been removed. Use the new <classname>Gtk::Box</"
2660"classname> methods <methodname>append()</methodname>, <methodname>prepend()</"
2661"methodname>, <methodname>insert_child_after()</methodname> and "
2662"<methodname>insert_child_at_start()</methodname>."
1130msgstr ""2663msgstr ""
nn2664"<methodname>Gtk::Box::pack_start()</methodname> och <methodname>Gtk::Box::"
2665"pack_end()</methodname> har tagits bort. Använd de nya <classname>Gtk::Box</"
2666"classname>-metoderna <methodname>append()</methodname>, "
2667"<methodname>prepend()</methodname>, <methodname>insert_child_after()</"
2668"methodname> och <methodname>insert_child_at_start()</methodname>."
11312669
1132#. (itstool) path: listitem/simpara2670#. (itstool) path: listitem/simpara
1133#: C/index-in.docbook:8532671#: C/index-in.docbook:853
1134msgid "<classname>Gtk::ButtonBox</classname> has been removed."2672msgid "<classname>Gtk::ButtonBox</classname> has been removed."
n1135msgstr ""n2673msgstr "<classname>Gtk::ButtonBox</classname> har tagits bort."
11362674
1137#. (itstool) path: listitem/simpara2675#. (itstool) path: listitem/simpara
1138#: C/index-in.docbook:8542676#: C/index-in.docbook:854
n1139msgid "<classname>Gtk::RadioButton</classname> and <classname>Gtk::RadioButtonGrn2677msgid ""
>oup</classname> have been removed. Use <classname>Gtk::CheckButton</classname> o 
>r <classname>Gtk::ToggleButton</classname> with <methodname>set_group()</methodn 
>ame>." 
2678"<classname>Gtk::RadioButton</classname> and <classname>Gtk::"
2679"RadioButtonGroup</classname> have been removed. Use <classname>Gtk::"
2680"CheckButton</classname> or <classname>Gtk::ToggleButton</classname> with "
2681"<methodname>set_group()</methodname>."
1140msgstr ""2682msgstr ""
nn2683"<classname>Gtk::RadioButton</classname> och <classname>Gtk::"
2684"RadioButtonGroup</classname> har tagits bort. Använd <classname>Gtk::"
2685"CheckButton</classname> eller <classname>Gtk::ToggleButton</classname> med "
2686"<methodname>set_group()</methodname>."
11412687
1142#. (itstool) path: chapter/para2688#. (itstool) path: chapter/para
1143#: C/index-in.docbook:8592689#: C/index-in.docbook:859
n1144msgid "All deprecated API was removed in <application>gtkmm</application> 4.0 ann2690msgid ""
>d <application>glibmm</application> 2.68, though there will be new deprecations  
>in future versions." 
2691"All deprecated API was removed in <application>gtkmm</application> 4.0 and "
2692"<application>glibmm</application> 2.68, though there will be new "
2693"deprecations in future versions."
1145msgstr ""2694msgstr ""
nn2695"Alla föråldrade API:er togs bort i <application>gtkmm</application> 4.0 och "
2696"<application>glibmm</application> 2.68, men det kommer göras nya "
2697"föråldringar i framtida versioner."
11462698
nn2699# TODO: copy paste of wiki page?
1147#. (itstool) path: chapter/para2700#. (itstool) path: chapter/para
1148#: C/index-in.docbook:8622701#: C/index-in.docbook:862
n1149msgid "As a first step to porting your source code to <application>gtkmm</applicn2702msgid ""
>ation>-4.0 you should probably ensure that your application builds with the depr 
>ecated <application>gtkmm</application>-3.0 and <application>glibmm-2.4</applica 
>tion> API disabled, by defining the macros GTKMM_DISABLE_DEPRECATED, GDKMM_DISAB 
>LE_DEPRECATED, GLIBMM_DISABLE_DEPRECATED and GIOMM_DISABLE_DEPRECATED. There are 
> some autotools macros that can help with this by defining them optionally at bu 
>ild time. See the <link xlink:href=\"https://wiki.gnome.org/Projects/gtkmm/Porti 
>ngToGtkmm3\">Porting from gtkmm-2.4 to gtkmm-3.0</link> wiki page for more detai 
>ls." 
2703"As a first step to porting your source code to <application>gtkmm</"
2704"application>-4.0 you should probably ensure that your application builds "
2705"with the deprecated <application>gtkmm</application>-3.0 and "
2706"<application>glibmm-2.4</application> API disabled, by defining the macros "
2707"GTKMM_DISABLE_DEPRECATED, GDKMM_DISABLE_DEPRECATED, "
2708"GLIBMM_DISABLE_DEPRECATED and GIOMM_DISABLE_DEPRECATED. There are some "
2709"autotools macros that can help with this by defining them optionally at "
2710"build time. See the <link xlink:href=\"https://wiki.gnome.org/Projects/gtkmm/"
2711"PortingToGtkmm3\">Porting from gtkmm-2.4 to gtkmm-3.0</link> wiki page for "
2712"more details."
1150msgstr ""2713msgstr ""
nn2714"Som ett första steg för att portera din källkod till <application>gtkmm</"
2715"application>-4.0 bör du troligen säkerställa att ditt program går bygga med "
2716"de föråldrade API:erna för <application>gtkmm</application>-3.0 och "
2717"<application>glibmm-2.4</application> inaktiverade, genom att definiera "
2718"makrona GTKMM_DISABLE_DEPRECATED, GDKMM_DISABLE_DEPRECATED, "
2719"GLIBMM_DISABLE_DEPRECATED och GIOMM_DISABLE_DEPRECATED. Det finns några "
2720"autotools-makron som kan hjälpa till med detta genom att valfritt definiera "
2721"dem vid byggtid. Se wikisidan för <link xlink:href=\"https://wiki.gnome.org/"
2722"Projects/gtkmm/PortingToGtkmm3\">portering från gtkmm-2.4 till gtkmm-3.0</"
2723"link> för mer detaljer."
11512724
1152#. (itstool) path: chapter/para2725#. (itstool) path: chapter/para
1153#: C/index-in.docbook:8692726#: C/index-in.docbook:869
nn2727msgid ""
1154msgid "See also <link xlink:href=\"https://docs.gtk.org/gtk4/migrating-3to4.html2728"See also <link xlink:href=\"https://docs.gtk.org/gtk4/migrating-3to4.html\"> "
>\"> Migrating from GTK 3.x to GTK 4</link>." 
2729"Migrating from GTK 3.x to GTK 4</link>."
1155msgstr ""2730msgstr ""
nn2731"Se även <link xlink:href=\"https://docs.gtk.org/gtk4/migrating-3to4.html\"> "
2732"Migrera från GTK 3.x till GTK 4</link>."
11562733
1157#. (itstool) path: section/title2734#. (itstool) path: section/title
1158#: C/index-in.docbook:8732735#: C/index-in.docbook:873
1159msgid "Deprecations in <application>gtkmm</application> 4.10"2736msgid "Deprecations in <application>gtkmm</application> 4.10"
n1160msgstr ""n2737msgstr "Föråldringar i <application>gtkmm</application> 4.10"
11612738
1162#. (itstool) path: section/para2739#. (itstool) path: section/para
1163#: C/index-in.docbook:8742740#: C/index-in.docbook:874
n1164msgid "Many classes are deprecated since <application>gtkmm</application> 4.10. n2741msgid ""
>They can still be used in <application>gtkmm</application>4 applications, provid 
>ed GTKMM_DISABLE_DEPRECATED and GDKMM_DISABLE_DEPRECATED are not defined. There  
>are also many new classes in <application>gtkmm</application> 4.10, which replac 
>e some of the deprecated classes. Some example programs in this tutorial use cla 
>sses deprecated since <application>gtkmm</application> 4.10. Some other programs 
> use classes available since <application>gtkmm</application> 4.10." 
2742"Many classes are deprecated since <application>gtkmm</application> 4.10. "
2743"They can still be used in <application>gtkmm</application>4 applications, "
2744"provided GTKMM_DISABLE_DEPRECATED and GDKMM_DISABLE_DEPRECATED are not "
2745"defined. There are also many new classes in <application>gtkmm</application> "
2746"4.10, which replace some of the deprecated classes. Some example programs in "
2747"this tutorial use classes deprecated since <application>gtkmm</application> "
2748"4.10. Some other programs use classes available since <application>gtkmm</"
2749"application> 4.10."
1165msgstr ""2750msgstr ""
nn2751"Många klasser har föråldrats sedan <application>gtkmm</application> 4.10. De "
2752"kan fortfarande användas i <application>gtkmm</application>4-program, "
2753"förutsatt att GTKMM_DISABLE_DEPRECATED och GDKMM_DISABLE_DEPRECATED inte har "
2754"definierats. Det finns också många nya klasser i <application>gtkmm</"
2755"application> 4.10, vilka ersätter några av de föråldrade klasserna. Några "
2756"exempelprogram i denna handledning använder klasser som föråldrats sedan "
2757"<application>gtkmm</application> 4.10. Några andra program använder klasser "
2758"som är tillgängliga sedan <application>gtkmm</application> 4.10."
11662759
1167#. (itstool) path: section/para2760#. (itstool) path: section/para
1168#: C/index-in.docbook:8802761#: C/index-in.docbook:880
n1169msgid "Deprecated classes: AppChooser, AppChooserButton, AppChooserDialog, AppChn2762#, fuzzy
>ooserWidget, CellArea, CellAreaBox, CellAreaContext, CellLayout, CellRenderer, C 
>ellRendererAccel, CellRendererCombo, CellRendererPixbuf, CellRendererProgress, C 
>ellRendererSpin, CellRendererSpinner, CellRendererText, CellRendererToggle, Cell 
>View, ComboBox, ComboBoxText, EntryCompletion, IconView, ListStore, ListViewText 
>, StyleContext, TreeDragDest, TreeDragSource, TreeIter and other classes in tree 
>iter.h, TreeModel, TreeModelFilter, TreeModelSort, TreePath, TreeRowReference, T 
>reeSelection, TreeSortable, TreeStore, TreeView, TreeViewColumn, namespace CellR 
>enderer_Generation, namespace TreeView_Private, ColorButton, ColorChooser, Color 
>ChooserDialog, FileChooser, FileChooserDialog, FileChooserNative, FileChooserWid 
>get, FontButton, FontChooser, FontChooserDialog, FontChooserWidget, MessageDialo 
>g, TreeModelColumn, TreeModelColumnRecord, InfoBar, Assistant, AssistantPage, Lo 
>ckButton, Statusbar, VolumeButton." 
2763msgid ""
2764"Deprecated classes: AppChooser, AppChooserButton, AppChooserDialog, "
2765"AppChooserWidget, CellArea, CellAreaBox, CellAreaContext, CellLayout, "
2766"CellRenderer, CellRendererAccel, CellRendererCombo, CellRendererPixbuf, "
2767"CellRendererProgress, CellRendererSpin, CellRendererSpinner, "
2768"CellRendererText, CellRendererToggle, CellView, ComboBox, ComboBoxText, "
2769"EntryCompletion, IconView, ListStore, ListViewText, StyleContext, "
2770"TreeDragDest, TreeDragSource, TreeIter and other classes in treeiter.h, "
2771"TreeModel, TreeModelFilter, TreeModelSort, TreePath, TreeRowReference, "
2772"TreeSelection, TreeSortable, TreeStore, TreeView, TreeViewColumn, namespace "
2773"CellRenderer_Generation, namespace TreeView_Private, ColorButton, "
2774"ColorChooser, ColorChooserDialog, FileChooser, FileChooserDialog, "
2775"FileChooserNative, FileChooserWidget, FontButton, FontChooser, "
2776"FontChooserDialog, FontChooserWidget, MessageDialog, TreeModelColumn, "
2777"TreeModelColumnRecord, InfoBar, Assistant, AssistantPage, LockButton, "
2778"Statusbar, VolumeButton."
1170msgstr ""2779msgstr ""
nn2780"Föråldrade klasser: AppChooser, AppChooserButton, AppChooserDialog, "
2781"AppChooserWidget, CellArea, CellAreaBox, CellAreaContext, CellLayout, "
2782"CellRenderer, CellRendererAccel, CellRendererCombo, CellRendererPixbuf, "
2783"CellRendererProgress, CellRendererSpin, CellRendererSpinner, "
2784"CellRendererText, CellRendererToggle, CellView, ComboBox, ComboBoxText, "
2785"EntryCompletion, IconView, ListStore, ListViewText, StyleContext, "
2786"TreeDragDest, TreeDragSource, TreeIter och andra klasser i treeiter.h, "
2787"TreeModel, TreeModelFilter, TreeModelSort, TreePath, TreeRowReference, "
2788"TreeSelection, TreeSortable, TreeStore, TreeView, TreeViewColumn, namnrymden "
2789"CellRenderer_Generation, namnrymden TreeView_Private, ColorButton, "
2790"ColorChooser, ColorChooserDialog, FileChooser, FileChooserDialog, "
2791"FileChooserNative, FileChooserWidget, FontButton, FontChooser, "
2792"FontChooserDialog, FontChooserWidget, MessageDialog, TreeModelColumn, "
2793"TreeModelColumnRecord, InfoBar."
11712794
1172#. (itstool) path: section/para2795#. (itstool) path: section/para
1173#: C/index-in.docbook:8982796#: C/index-in.docbook:898
n1174msgid "New classes and enums: AlertDialog, ColorDialog, ColorDialogButton, Column2797#, fuzzy
>nViewSorter, FileDialog, FontDialog, FontDialogButton, FileLauncher, UriLauncher 
>, ATContext, enums DialogError, FontLevel, Collation." 
2798msgid ""
2799"New classes and enums: AlertDialog, ColorDialog, ColorDialogButton, "
2800"ColumnViewSorter, FileDialog, FontDialog, FontDialogButton, FileLauncher, "
2801"UriLauncher, ATContext, enums DialogError, FontLevel, Collation."
1175msgstr ""2802msgstr ""
nn2803"Nya klasser och enum-uppräkningar: AlertDialog, ColorDialog, "
2804"ColorDialogButton, ColumnViewSorter, FileDialog, FontDialog, "
2805"FontDialogButton, enum: DialogError, FontLevel."
11762806
1177#. (itstool) path: section/para2807#. (itstool) path: section/para
1178#: C/index-in.docbook:9032808#: C/index-in.docbook:903
nn2809msgid ""
1179msgid "In most cases there are replacements for the deprecated classes. See the 2810"In most cases there are replacements for the deprecated classes. See the "
>reference documentation." 
2811"reference documentation."
1180msgstr ""2812msgstr ""
nn2813"I de flesta fall finns det ersättningar för de föråldrade klasserna. Se "
2814"referensdokumentationen."
11812815
1182#. (itstool) path: chapter/title2816#. (itstool) path: chapter/title
1183#: C/index-in.docbook:9112817#: C/index-in.docbook:911
1184msgid "Buttons"2818msgid "Buttons"
n1185msgstr ""n2819msgstr "Knappar"
11862820
1187#. (itstool) path: chapter/para2821#. (itstool) path: chapter/para
1188#: C/index-in.docbook:9132822#: C/index-in.docbook:913
1189msgid "<application>gtkmm</application> provides four basic types of buttons:"2823msgid "<application>gtkmm</application> provides four basic types of buttons:"
1190msgstr ""2824msgstr ""
nn2825"<application>gtkmm</application> tillhandahåller fyra grundläggande "
2826"knapptyper:"
11912827
1192#. (itstool) path: varlistentry/term2828#. (itstool) path: varlistentry/term
1193#: C/index-in.docbook:9202829#: C/index-in.docbook:920
1194msgid "Push buttons"2830msgid "Push buttons"
n1195msgstr ""n2831msgstr "Tryckknappar"
11962832
1197#. (itstool) path: listitem/para2833#. (itstool) path: listitem/para
1198#: C/index-in.docbook:9222834#: C/index-in.docbook:922
n1199msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n2835msgid ""
>1Button.html\"><classname>Gtk::Button</classname></link>. Standard buttons, usua 
>lly marked with a label or picture. Pushing one triggers an action. See the <lin 
>k linkend=\"sec-pushbuttons\">Button</link> section." 
2836"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2837"classGtk_1_1Button.html\"><classname>Gtk::Button</classname></link>. "
2838"Standard buttons, usually marked with a label or picture. Pushing one "
2839"triggers an action. See the <link linkend=\"sec-pushbuttons\">Button</link> "
2840"section."
1200msgstr ""2841msgstr ""
nn2842"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2843"classGtk_1_1Button.html\"><classname>Gtk::Button</classname></link>. "
2844"Standardknappar, vanligen markerade med en etikett eller bild. Att trycka på "
2845"en av dem utlöser en åtgärd. Se avsnittet <link linkend=\"sec-"
2846"pushbuttons\">Button</link>."
12012847
1202#. (itstool) path: varlistentry/term2848#. (itstool) path: varlistentry/term
1203#: C/index-in.docbook:9292849#: C/index-in.docbook:929
1204msgid "Toggle buttons"2850msgid "Toggle buttons"
n1205msgstr ""n2851msgstr "Växlingsknappar"
12062852
1207#. (itstool) path: listitem/para2853#. (itstool) path: listitem/para
1208#: C/index-in.docbook:9312854#: C/index-in.docbook:931
n1209msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n2855#, fuzzy
>1ToggleButton.html\"><classname>Gtk::ToggleButton</classname></link>. Unlike a n 
>ormal Button, which springs back up, a ToggleButton stays down until you press i 
>t again. It might be useful as an on/off switch. See the <link linkend=\"sec-tog 
>gle-buttons\">ToggleButton</link> section." 
2856msgid ""
2857"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2858"classGtk_1_1ToggleButton.html\"><classname>Gtk::ToggleButton</classname></"
2859"link>. Unlike a normal Button, which springs back up, a ToggleButton stays "
2860"down until you press it again. It might be useful as an on/off switch. See "
2861"the <link linkend=\"sec-toggle-buttons\">ToggleButton</link> section."
1210msgstr ""2862msgstr ""
nn2863"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2864"classGtk_1_1ToggleButton.html\"><classname>Gtk::ToggleButton</classname></"
2865"link>. Till skillnad från en vanlig Button som fjädrar upp igen förblir en "
2866"ToggleButton nedtryckt till du trycker på den igen. Den kan vara användbar "
2867"som en på/av-brytare. Se avsnittet <link linkend=\"sec-toggle-"
2868"buttons\">ToggleButton</link>."
12112869
1212#. (itstool) path: varlistentry/term2870#. (itstool) path: varlistentry/term
1213#: C/index-in.docbook:9392871#: C/index-in.docbook:939
1214msgid "Check buttons"2872msgid "Check buttons"
n1215msgstr ""n2873msgstr "Kryssrutor"
12162874
1217#. (itstool) path: listitem/para2875#. (itstool) path: listitem/para
1218#: C/index-in.docbook:9412876#: C/index-in.docbook:941
n1219msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n2877msgid ""
>1CheckButton.html\"><classname>Gtk::CheckButton</classname></link>. These act li 
>ke ToggleButtons, but show their state in small squares, with their label at the 
> side. They should be used in most situations which require an on/off setting. S 
>ee the <link linkend=\"sec-checkbuttons\">CheckButton</link> section." 
2878"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2879"classGtk_1_1CheckButton.html\"><classname>Gtk::CheckButton</classname></"
2880"link>. These act like ToggleButtons, but show their state in small squares, "
2881"with their label at the side. They should be used in most situations which "
2882"require an on/off setting. See the <link linkend=\"sec-"
2883"checkbuttons\">CheckButton</link> section."
1220msgstr ""2884msgstr ""
nn2885"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2886"classGtk_1_1CheckButton.html\"><classname>Gtk::CheckButton</classname></"
2887"link>. Dessa fungerar som ToggleButton, men visar sitt tillstånd i små "
2888"rutor, med sin etikett på sidan. De bör användas i de flesta situationer som "
2889"kräver en på/av-inställning. Se avsnittet <link linkend=\"sec-"
2890"checkbuttons\">CheckButton</link>."
12212891
1222#. (itstool) path: varlistentry/term2892#. (itstool) path: varlistentry/term
1223#: C/index-in.docbook:9512893#: C/index-in.docbook:951
1224msgid "Radio buttons"2894msgid "Radio buttons"
n1225msgstr ""n2895msgstr "Radioknappar"
12262896
1227#. (itstool) path: listitem/para2897#. (itstool) path: listitem/para
1228#: C/index-in.docbook:9532898#: C/index-in.docbook:953
n1229msgid "Named after the station selectors on old car radios, these buttons are usn2899msgid ""
>ed in groups for options which are mutually exclusive. Pressing one causes all t 
>he others in its group to turn off. They are similar to ToggleButtons or CheckBu 
>ttons (a small widget with a label at the side), but usually look different. The 
>re is no separate radio button class. Check buttons and toggle buttons can act a 
>s radio buttons. See the <link linkend=\"sec-radio-buttons\">Radio Button</link> 
> section." 
2900"Named after the station selectors on old car radios, these buttons are used "
2901"in groups for options which are mutually exclusive. Pressing one causes all "
2902"the others in its group to turn off. They are similar to ToggleButtons or "
2903"CheckButtons (a small widget with a label at the side), but usually look "
2904"different. There is no separate radio button class. Check buttons and toggle "
2905"buttons can act as radio buttons. See the <link linkend=\"sec-radio-"
2906"buttons\">Radio Button</link> section."
1230msgstr ""2907msgstr ""
nn2908"Dessa knappar har fått sitt namn efter stationsväljarna på gamla "
2909"bilradioapparater, och används i grupper för alternativ som är ömsesidigt "
2910"uteslutande. Att trycka på en av dem får alla andra i gruppen att slå av. De "
2911"liknar ToggleButton eller CheckButton (en liten komponent med en etikett på "
2912"sidan), men ser vanligen annorlunda ut. Det finns ingen separat klass för "
2913"radioknappar. Kryssrutor och växlingsknappar kan användas som radioknappar. "
2914"Se avsnittet <link linkend=\"sec-radio-buttons\">Radioknapp</link>."
12312915
1232#. (itstool) path: chapter/para2916#. (itstool) path: chapter/para
1233#: C/index-in.docbook:9672917#: C/index-in.docbook:967
n1234msgid "Note that, due to GTK's theming system, the appearance of these widgets wn2918msgid ""
>ill vary. In the case of check buttons and radio buttons, they may vary consider 
>ably." 
2919"Note that, due to GTK's theming system, the appearance of these widgets will "
2920"vary. In the case of check buttons and radio buttons, they may vary "
2921"considerably."
1235msgstr ""2922msgstr ""
nn2923"Observera att på grund av GTK:s temasystem kommer utseendet på dessa "
2924"komponenter att variera. I fallet med kryssrutor och radioknappar kan de "
2925"variera avsevärt."
12362926
1237#. (itstool) path: section/title2927#. (itstool) path: section/title
1238#: C/index-in.docbook:9742928#: C/index-in.docbook:974
1239msgid "Button"2929msgid "Button"
n1240msgstr ""n2930msgstr "Button"
12412931
1242#. (itstool) path: section/para2932#. (itstool) path: section/para
1243#: C/index-in.docbook:9762933#: C/index-in.docbook:976
n1244msgid "There are two ways to create a Button. You can specify a label string in n2934msgid ""
>the <classname>Gtk::Button</classname> constructor, or set it later with <method 
>name>set_label()</methodname>." 
2935"There are two ways to create a Button. You can specify a label string in the "
2936"<classname>Gtk::Button</classname> constructor, or set it later with "
2937"<methodname>set_label()</methodname>."
1245msgstr ""2938msgstr ""
nn2939"Det finns två sätt att skapa en Button. Du kan ange en etikettsträng i "
2940"<classname>Gtk::Button</classname>-konstruktorn, eller ställa in den senare "
2941"med <methodname>set_label()</methodname>."
12462942
1247#. (itstool) path: section/para2943#. (itstool) path: section/para
1248#: C/index-in.docbook:9822944#: C/index-in.docbook:982
n1249msgid "To define an accelerator key for keyboard navigation, place an underscoren2945msgid ""
> before one of the label's characters and specify <literal>true</literal> for th 
>e optional <literal>mnemonic</literal> parameter. For instance:" 
2946"To define an accelerator key for keyboard navigation, place an underscore "
2947"before one of the label's characters and specify <literal>true</literal> for "
2948"the optional <literal>mnemonic</literal> parameter. For instance:"
1250msgstr ""2949msgstr ""
nn2950"För att definiera en snabbtangent för tangentbordsnavigering sätter du ett "
2951"understreck före ett av etikettens tecken och anger <literal>true</literal> "
2952"för den valfria parametern <literal>mnemonic</literal>. Till exempel:"
12512953
1252#. (itstool) path: section/programlisting2954#. (itstool) path: section/programlisting
1253#: C/index-in.docbook:9842955#: C/index-in.docbook:984
n1254#, no-wrapn2956#, fuzzy, no-wrap
1255msgid ""
1256"<code>Gtk::Button* pButton = new Gtk::Button(\"_Something\", true);</code>"2957msgid "<code>Gtk::Button* pButton = new Gtk::Button(\"_Something\", true);</code
 >>"
1257msgstr ""2958msgstr "Gtk::Button* pButton = new Gtk::Button(\"_Något\", true);"
12582959
1259#. (itstool) path: section/para2960#. (itstool) path: section/para
1260#: C/index-in.docbook:9862961#: C/index-in.docbook:986
n1261msgid "<classname>Gtk::Button</classname> is also a container so you could put an2962msgid ""
>ny other widget, such as a <classname>Gtk::Image</classname> into it." 
2963"<classname>Gtk::Button</classname> is also a container so you could put any "
2964"other widget, such as a <classname>Gtk::Image</classname> into it."
1262msgstr ""2965msgstr ""
nn2966"<classname>Gtk::Button</classname> är också en behållare, så du kan stoppa "
2967"en valfri komponent, som en <classname>Gtk::Image</classname> i den."
12632968
1264#. (itstool) path: section/para2969#. (itstool) path: section/para
1265#: C/index-in.docbook:9922970#: C/index-in.docbook:992
n1266msgid "The <classname>Gtk::Button</classname> widget has the <literal>clicked</ln2971msgid ""
>iteral> signal which is emitted when the button is pressed and released." 
2972"The <classname>Gtk::Button</classname> widget has the <literal>clicked</"
2973"literal> signal which is emitted when the button is pressed and released."
1267msgstr ""2974msgstr ""
nn2975"Komponenten <classname>Gtk::Button</classname> har signalen "
2976"<literal>clicked</literal> som sänds ut när knappen trycks ned och släpps."
12682977
1269#. (itstool) path: section/para2978#. (itstool) path: section/para
1270#: C/index-in.docbook:9972979#: C/index-in.docbook:997
n1271msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n2980msgid ""
>1Button.html\">Reference</link>" 
2981"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2982"classGtk_1_1Button.html\">Reference</link>"
1272msgstr ""2983msgstr ""
nn2984"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
2985"classGtk_1_1Button.html\">Referens</link>"
12732986
1274#. (itstool) path: section/title2987#. (itstool) path: section/title
n1275#: C/index-in.docbook:1000n2988#: C/index-in.docbook:1000 C/index-in.docbook:1054 C/index-in.docbook:1113
1276#: C/index-in.docbook:10542989#: C/index-in.docbook:1229 C/index-in.docbook:1287 C/index-in.docbook:1605
1277#: C/index-in.docbook:11132990#: C/index-in.docbook:1672 C/index-in.docbook:1695 C/index-in.docbook:1730
1278#: C/index-in.docbook:12292991#: C/index-in.docbook:1784 C/index-in.docbook:1823 C/index-in.docbook:1864
1279#: C/index-in.docbook:12872992#: C/index-in.docbook:1897 C/index-in.docbook:2187 C/index-in.docbook:2219
1280#: C/index-in.docbook:16052993#: C/index-in.docbook:2273 C/index-in.docbook:2320 C/index-in.docbook:2481
1281#: C/index-in.docbook:16722994#: C/index-in.docbook:2505 C/index-in.docbook:2529 C/index-in.docbook:2567
1282#: C/index-in.docbook:16952995#: C/index-in.docbook:2595 C/index-in.docbook:2626 C/index-in.docbook:4523
1283#: C/index-in.docbook:17302996#: C/index-in.docbook:4552 C/index-in.docbook:4579 C/index-in.docbook:4606
1284#: C/index-in.docbook:17842997#: C/index-in.docbook:4638 C/index-in.docbook:4662 C/index-in.docbook:4840
1285#: C/index-in.docbook:18232998#: C/index-in.docbook:4991 C/index-in.docbook:5072 C/index-in.docbook:5144
1286#: C/index-in.docbook:18642999#: C/index-in.docbook:5212 C/index-in.docbook:5452 C/index-in.docbook:6302
1287#: C/index-in.docbook:18973000#: C/index-in.docbook:6350 C/index-in.docbook:6414 C/index-in.docbook:6945
1288#: C/index-in.docbook:21873001#: C/index-in.docbook:7063 C/index-in.docbook:7632 C/index-in.docbook:7717
1289#: C/index-in.docbook:22193002#: C/index-in.docbook:7778 C/index-in.docbook:7836 C/index-in.docbook:8061
1290#: C/index-in.docbook:2273
1291#: C/index-in.docbook:2320
1292#: C/index-in.docbook:2481
1293#: C/index-in.docbook:2505
1294#: C/index-in.docbook:2529
1295#: C/index-in.docbook:2567
1296#: C/index-in.docbook:2595
1297#: C/index-in.docbook:2626
1298#: C/index-in.docbook:4523
1299#: C/index-in.docbook:4552
1300#: C/index-in.docbook:4579
1301#: C/index-in.docbook:4606
1302#: C/index-in.docbook:4638
1303#: C/index-in.docbook:4662
1304#: C/index-in.docbook:4840
1305#: C/index-in.docbook:4991
1306#: C/index-in.docbook:5072
1307#: C/index-in.docbook:5144
1308#: C/index-in.docbook:5212
1309#: C/index-in.docbook:5452
1310#: C/index-in.docbook:6302
1311#: C/index-in.docbook:6350
1312#: C/index-in.docbook:6414
1313#: C/index-in.docbook:6945
1314#: C/index-in.docbook:7063
1315#: C/index-in.docbook:7632
1316#: C/index-in.docbook:7717
1317#: C/index-in.docbook:7778
1318#: C/index-in.docbook:7836
1319#: C/index-in.docbook:8061
1320#: C/index-in.docbook:94993003#: C/index-in.docbook:9499
1321msgid "Example"3004msgid "Example"
n1322msgstr ""n3005msgstr "Exempel"
13233006
1324#. (itstool) path: section/para3007#. (itstool) path: section/para
1325#: C/index-in.docbook:10023008#: C/index-in.docbook:1002
1326msgid "This example creates a button with a picture and a label."3009msgid "This example creates a button with a picture and a label."
n1327msgstr ""n3010msgstr "Detta exempel skapar en knapp med en bild och en etikett."
13283011
1329#. (itstool) path: figure/title3012#. (itstool) path: figure/title
1330#: C/index-in.docbook:10073013#: C/index-in.docbook:1007
1331msgid "buttons example"3014msgid "buttons example"
n1332msgstr ""n3015msgstr "knappexempel"
13333016
1334#. (itstool) path: imageobject/imagedata3017#. (itstool) path: imageobject/imagedata
1335#. This is a reference to an external file such as an image or video. When3018#. This is a reference to an external file such as an image or video. When
1336#. the file changes, the md5 hash will change to let you know you need to3019#. the file changes, the md5 hash will change to let you know you need to
1337#. update your localized copy. The msgstr is not used at all. Set it to3020#. update your localized copy. The msgstr is not used at all. Set it to
1338#. whatever you like once you have updated your copy of the file.3021#. whatever you like once you have updated your copy of the file.
1339#: C/index-in.docbook:10093022#: C/index-in.docbook:1009
nn3023#, fuzzy
1340msgctxt "_"3024msgctxt "_"
nn3025msgid ""
1341msgid "external ref='figures/buttons.png' md5='ab288a013ed7d6c0b797f5998961dea9'3026"external ref='figures/buttons.png' md5='ab288a013ed7d6c0b797f5998961dea9'"
>" 
1342msgstr ""3027msgstr ""
nn3028"external ref='figures/buttons.png' md5='ab288a013ed7d6c0b797f5998961dea9'"
13433029
1344#. (itstool) path: section/para3030#. (itstool) path: section/para
1345#: C/index-in.docbook:10133031#: C/index-in.docbook:1013
n1346msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3032msgid ""
>e/master/examples/book/buttons/button\">Source Code</link>" 
3033"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3034"master/examples/book/buttons/button\">Source Code</link>"
1347msgstr ""3035msgstr ""
nn3036"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3037"master/examples/book/buttons/button\">Källkod</link>"
13483038
1349#. (itstool) path: section/title3039#. (itstool) path: section/title
1350#: C/index-in.docbook:10203040#: C/index-in.docbook:1020
1351msgid "ToggleButton"3041msgid "ToggleButton"
n1352msgstr ""n3042msgstr "ToggleButton"
13533043
1354#. (itstool) path: section/para3044#. (itstool) path: section/para
1355#: C/index-in.docbook:10223045#: C/index-in.docbook:1022
n1356msgid "<classname>ToggleButton</classname>s are like normal <classname>Button</cn3046msgid ""
>lassname>s, but when clicked they remain activated, or pressed, until clicked ag 
>ain." 
3047"<classname>ToggleButton</classname>s are like normal <classname>Button</"
3048"classname>s, but when clicked they remain activated, or pressed, until "
3049"clicked again."
1357msgstr ""3050msgstr ""
nn3051"En <classname>ToggleButton</classname> är som en vanlig <classname>Button</"
3052"classname>, men när den klickas på förblir den aktiverad, eller nedtryckt, "
3053"tills den klickas på igen."
13583054
1359#. (itstool) path: section/para3055#. (itstool) path: section/para
1360#: C/index-in.docbook:10243056#: C/index-in.docbook:1024
n1361msgid "To retrieve the state of the <classname>ToggleButton</classname>, you cann3057msgid ""
> use the <methodname>get_active()</methodname> method. This returns <literal>tru 
>e</literal> if the button is \"down\". You can also set the toggle button's stat 
>e, with <methodname>set_active()</methodname>. Note that, if you do this, and th 
>e state actually changes, it causes the \"clicked\" signal to be emitted. This i 
>s usually what you want." 
3058"To retrieve the state of the <classname>ToggleButton</classname>, you can "
3059"use the <methodname>get_active()</methodname> method. This returns "
3060"<literal>true</literal> if the button is \"down\". You can also set the "
3061"toggle button's state, with <methodname>set_active()</methodname>. Note "
3062"that, if you do this, and the state actually changes, it causes the "
3063"\"clicked\" signal to be emitted. This is usually what you want."
1362msgstr ""3064msgstr ""
nn3065"För att erhålla tillståndet för vår <classname>ToggleButton</classname> kan "
3066"du använda metoden <methodname>get_active()</methodname>. Denna returnerar "
3067"<literal>true</literal> om knappen är ”nere”. Du kan också ställa in "
3068"växlingsknappens tillstånd med <methodname>set_active()</methodname>. "
3069"Observera att om du gör detta och tillståndet faktiskt ändras, så får det "
3070"signalen ”clicked” att sändas ut. Detta är vanligen vad du vill."
13633071
1364#. (itstool) path: section/para3072#. (itstool) path: section/para
1365#: C/index-in.docbook:10313073#: C/index-in.docbook:1031
n1366msgid "You can use the <methodname>toggled()</methodname> method to toggle the bn3074msgid ""
>utton, rather than forcing it to be up or down: This switches the button's state 
>, and causes the <literal>toggled</literal> signal to be emitted." 
3075"You can use the <methodname>toggled()</methodname> method to toggle the "
3076"button, rather than forcing it to be up or down: This switches the button's "
3077"state, and causes the <literal>toggled</literal> signal to be emitted."
1367msgstr ""3078msgstr ""
nn3079"Du kan använda metoden <methodname>toggled()</methodname> för att trycka på "
3080"knappen, snarare än att tvinga den att vara uppe eller nere: detta växlar "
3081"knappens tillstånd, och får signalen <literal>toggled</literal> att sändas "
3082"ut."
13683083
1369#. (itstool) path: section/para3084#. (itstool) path: section/para
1370#: C/index-in.docbook:10363085#: C/index-in.docbook:1036
n1371msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3086msgid ""
>1ToggleButton.html\">Reference</link>" 
3087"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3088"classGtk_1_1ToggleButton.html\">Reference</link>"
1372msgstr ""3089msgstr ""
nn3090"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3091"classGtk_1_1ToggleButton.html\">Referens</link>"
13733092
1374#. (itstool) path: section/title3093#. (itstool) path: section/title
1375#. (itstool) path: figure/title3094#. (itstool) path: figure/title
n1376#: C/index-in.docbook:1041n3095#: C/index-in.docbook:1041 C/index-in.docbook:1057
1377#: C/index-in.docbook:1057
1378msgid "CheckButton"3096msgid "CheckButton"
n1379msgstr ""n3097msgstr "CheckButton"
13803098
1381#. (itstool) path: section/para3099#. (itstool) path: section/para
1382#: C/index-in.docbook:10433100#: C/index-in.docbook:1043
n1383msgid "<classname>Gtk::CheckButton</classname> inherits directly from <classnamen3101msgid ""
>>Gtk::Widget</classname>. It is similar to <classname>Gtk::ToggleButton</classna 
>me>. The only real difference between the two is <classname>Gtk::CheckButton</cl 
>assname>'s appearance. You can check and set a check button using the same membe 
>r methods as for <classname>Gtk::ToggleButton</classname>." 
3102"<classname>Gtk::CheckButton</classname> inherits directly from "
3103"<classname>Gtk::Widget</classname>. It is similar to <classname>Gtk::"
3104"ToggleButton</classname>. The only real difference between the two is "
3105"<classname>Gtk::CheckButton</classname>'s appearance. You can check and set "
3106"a check button using the same member methods as for <classname>Gtk::"
3107"ToggleButton</classname>."
1384msgstr ""3108msgstr ""
nn3109"<classname>Gtk::CheckButton</classname> ärver direkt från <classname>Gtk::"
3110"Widget</classname>. Den liknar <classname>Gtk::ToggleButton</classname>. Den "
3111"enda verkliga skillnaden mellan de två är utseendet för <classname>Gtk::"
3112"CheckButton</classname>. Du kan kontrollera och ställa in en kryssruta med "
3113"samma medlemsmetoder som för <classname>Gtk::ToggleButton</classname>."
13853114
1386#. (itstool) path: section/para3115#. (itstool) path: section/para
1387#: C/index-in.docbook:10513116#: C/index-in.docbook:1051
n1388msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3117msgid ""
>1CheckButton.html\">Reference</link>" 
3118"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3119"classGtk_1_1CheckButton.html\">Reference</link>"
1389msgstr ""3120msgstr ""
nn3121"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3122"classGtk_1_1CheckButton.html\">Referens</link>"
13903123
1391#. (itstool) path: imageobject/imagedata3124#. (itstool) path: imageobject/imagedata
1392#. This is a reference to an external file such as an image or video. When3125#. This is a reference to an external file such as an image or video. When
1393#. the file changes, the md5 hash will change to let you know you need to3126#. the file changes, the md5 hash will change to let you know you need to
1394#. update your localized copy. The msgstr is not used at all. Set it to3127#. update your localized copy. The msgstr is not used at all. Set it to
1395#. whatever you like once you have updated your copy of the file.3128#. whatever you like once you have updated your copy of the file.
1396#: C/index-in.docbook:10593129#: C/index-in.docbook:1059
nn3130#, fuzzy
1397msgctxt "_"3131msgctxt "_"
nn3132msgid ""
1398msgid "external ref='figures/checkbutton.png' md5='4d0e8f846ce98aeeada64227dd2f53133"external ref='figures/checkbutton.png' md5='4d0e8f846ce98aeeada64227dd2f55a7'"
>5a7'" 
1399msgstr ""3134msgstr ""
nn3135"external ref='figures/checkbutton.png' md5='4d0e8f846ce98aeeada64227dd2f55a7'"
14003136
1401#. (itstool) path: section/para3137#. (itstool) path: section/para
1402#: C/index-in.docbook:10633138#: C/index-in.docbook:1063
n1403msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3139msgid ""
>e/master/examples/book/buttons/checkbutton\">Source Code</link>" 
3140"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3141"master/examples/book/buttons/checkbutton\">Source Code</link>"
1404msgstr ""3142msgstr ""
nn3143"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3144"master/examples/book/buttons/checkbutton\">Källkod</link>"
14053145
1406#. (itstool) path: section/title3146#. (itstool) path: section/title
1407#: C/index-in.docbook:10693147#: C/index-in.docbook:1069
1408msgid "Radio Button"3148msgid "Radio Button"
n1409msgstr ""n3149msgstr "Radioknapp"
14103150
1411#. (itstool) path: section/para3151#. (itstool) path: section/para
1412#: C/index-in.docbook:10713152#: C/index-in.docbook:1071
n1413msgid "There is no separate class for radio buttons. Check buttons and toggle bun3153msgid ""
>ttons act as radio buttons when they form a group. Only one button in a group ca 
>n be selected at any one time." 
3154"There is no separate class for radio buttons. Check buttons and toggle "
3155"buttons act as radio buttons when they form a group. Only one button in a "
3156"group can be selected at any one time."
1414msgstr ""3157msgstr ""
nn3158"Det finns ingen separat klass för radioknappar. Kryssrutor och "
3159"växlingsknappar agerar som radioknappar då de bildar en grupp. Endast en "
3160"knapp åt gången kan vara vald i en grupp."
14153161
1416#. (itstool) path: section/title3162#. (itstool) path: section/title
1417#: C/index-in.docbook:10783163#: C/index-in.docbook:1078
1418msgid "Groups"3164msgid "Groups"
n1419msgstr ""n3165msgstr "Grupper"
14203166
1421#. (itstool) path: section/para3167#. (itstool) path: section/para
1422#: C/index-in.docbook:10793168#: C/index-in.docbook:1079
nn3169msgid ""
1423msgid "You create the buttons, and set up their group afterwards. In the followi3170"You create the buttons, and set up their group afterwards. In the following "
>ng example, we put 3 radio buttons in a group:" 
3171"example, we put 3 radio buttons in a group:"
1424msgstr ""3172msgstr ""
nn3173"Du skapar knapparna, och konfigurerar deras grupp efteråt. I följande "
3174"exempel stoppar vi 3 radioknappar i en grupp:"
14253175
1426#. (itstool) path: section/programlisting3176#. (itstool) path: section/programlisting
1427#: C/index-in.docbook:10843177#: C/index-in.docbook:1084
n1428#, no-wrapn3178#, fuzzy, no-wrap
3179#| msgid ""
3180#| "\n"
3181#| "auto rb1 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button1\");\n"
3182#| "auto rb2 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button2\");\n"
3183#| "auto rb3 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button3\");\n"
3184#| "rb2-&gt;set_group(*rb1);\n"
3185#| "rb3-&gt;set_group(*rb1);\n"
1429msgid ""3186msgid ""
1430"<code>auto rb1 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button1\");\n"3187"<code>auto rb1 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button1\");\n"
1431"auto rb2 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button2\");\n"3188"auto rb2 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button2\");\n"
1432"auto rb3 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button3\");\n"3189"auto rb3 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"button3\");\n"
1433"rb2-&gt;set_group(*rb1);\n"3190"rb2-&gt;set_group(*rb1);\n"
1434"rb3-&gt;set_group(*rb1);\n"3191"rb3-&gt;set_group(*rb1);\n"
1435"</code>"3192"</code>"
1436msgstr ""3193msgstr ""
nn3194"\n"
3195"auto rb1 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"knapp1\");\n"
3196"auto rb2 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"knapp2\");\n"
3197"auto rb3 = Gtk::make_managed&lt;Gtk::CheckButton&gt;(\"knapp3\");\n"
3198"rb2-&gt;set_group(*rb1);\n"
3199"rb3-&gt;set_group(*rb1);\n"
14373200
1438#. (itstool) path: section/para3201#. (itstool) path: section/para
1439#: C/index-in.docbook:10913202#: C/index-in.docbook:1091
n1440msgid "We told <application>gtkmm</application> to put all three <classname>Checn3203msgid ""
>kButton</classname>s in the same group by using <methodname>set_group()</methodn 
>ame> to tell the other <classname>CheckButton</classname>s to share group with t 
>he first <classname>CheckButton</classname>." 
3204"We told <application>gtkmm</application> to put all three "
3205"<classname>CheckButton</classname>s in the same group by using "
3206"<methodname>set_group()</methodname> to tell the other "
3207"<classname>CheckButton</classname>s to share group with the first "
3208"<classname>CheckButton</classname>."
1441msgstr ""3209msgstr ""
nn3210"Vi sa till <application>gtkmm</application> att stoppa alla tre "
3211"<classname>CheckButton</classname>-knapparna i samma grupp genom att använda "
3212"<methodname>set_group()</methodname> för att säga till de andra två "
3213"<classname>CheckButton</classname>-knapparna att dela grupp med den första "
3214"<classname>CheckButton</classname>-knappen."
14423215
1443#. (itstool) path: section/title3216#. (itstool) path: section/title
n1444#: C/index-in.docbook:1101n3217#: C/index-in.docbook:1101 C/index-in.docbook:1566 C/index-in.docbook:5323
1445#: C/index-in.docbook:1566
1446#: C/index-in.docbook:5323
1447msgid "Methods"3218msgid "Methods"
n1448msgstr ""n3219msgstr "Metoder"
14493220
1450#. (itstool) path: section/para3221#. (itstool) path: section/para
1451#: C/index-in.docbook:11023222#: C/index-in.docbook:1102
n1452msgid "<classname>CheckButton</classname>s and <classname>ToggleButton</classnamn3223msgid ""
>e>s are \"off\" when created; this means that when you first make a group of the 
>m, they will all be off. Don't forget to turn one of them on using <methodname>s 
>et_active()</methodname>." 
3224"<classname>CheckButton</classname>s and <classname>ToggleButton</classname>s "
3225"are \"off\" when created; this means that when you first make a group of "
3226"them, they will all be off. Don't forget to turn one of them on using "
3227"<methodname>set_active()</methodname>."
1453msgstr ""3228msgstr ""
nn3229"<classname>CheckButton</classname> och <classname>ToggleButton</classname> "
3230"är ”av” när de skapas. Detta betyder att när du först gör en grupp av dem "
3231"kommer alla vara ”av”. Glöm inte att slå på en av dem med "
3232"<methodname>set_active()</methodname>."
14543233
1455#. (itstool) path: section/para3234#. (itstool) path: section/para
1456#: C/index-in.docbook:11083235#: C/index-in.docbook:1108
n1457msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3236msgid ""
>1RadioButton.html\">Reference</link>" 
3237"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3238"classGtk_1_1RadioButton.html\">Reference</link>"
1458msgstr ""3239msgstr ""
nn3240"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3241"classGtk_1_1RadioButton.html\">Referens</link>"
14593242
1460#. (itstool) path: section/para3243#. (itstool) path: section/para
1461#: C/index-in.docbook:11143244#: C/index-in.docbook:1114
n1462msgid "The following example demonstrates the use of grouped <classname>CheckButn3245msgid ""
>ton</classname>s:" 
3246"The following example demonstrates the use of grouped "
3247"<classname>CheckButton</classname>s:"
1463msgstr ""3248msgstr ""
nn3249"Följande exempel demonstrerar användningen av grupperade "
3250"<classname>CheckButton</classname>-knappar:"
14643251
1465#. (itstool) path: figure/title3252#. (itstool) path: figure/title
1466#: C/index-in.docbook:11203253#: C/index-in.docbook:1120
1467msgid "RadioButton"3254msgid "RadioButton"
n1468msgstr ""n3255msgstr "RadioButton"
14693256
1470#. (itstool) path: imageobject/imagedata3257#. (itstool) path: imageobject/imagedata
1471#. This is a reference to an external file such as an image or video. When3258#. This is a reference to an external file such as an image or video. When
1472#. the file changes, the md5 hash will change to let you know you need to3259#. the file changes, the md5 hash will change to let you know you need to
1473#. update your localized copy. The msgstr is not used at all. Set it to3260#. update your localized copy. The msgstr is not used at all. Set it to
1474#. whatever you like once you have updated your copy of the file.3261#. whatever you like once you have updated your copy of the file.
1475#: C/index-in.docbook:11223262#: C/index-in.docbook:1122
nn3263#, fuzzy
1476msgctxt "_"3264msgctxt "_"
n1477msgid "external ref='figures/radiobuttons.png' md5='49ad0ed4567104af07b1c6484ffbn3265msgid ""
>821e'" 
3266"external ref='figures/radiobuttons.png' "
3267"md5='49ad0ed4567104af07b1c6484ffb821e'"
1478msgstr ""3268msgstr ""
nn3269"external ref='figures/radiobuttons.png' "
3270"md5='49ad0ed4567104af07b1c6484ffb821e'"
14793271
1480#. (itstool) path: section/para3272#. (itstool) path: section/para
1481#: C/index-in.docbook:11263273#: C/index-in.docbook:1126
n1482msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3274msgid ""
>e/master/examples/book/buttons/radiobutton\">Source Code</link>" 
3275"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3276"master/examples/book/buttons/radiobutton\">Source Code</link>"
1483msgstr ""3277msgstr ""
nn3278"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3279"master/examples/book/buttons/radiobutton\">Källkod</link>"
14843280
1485#. (itstool) path: chapter/title3281#. (itstool) path: chapter/title
1486#. (itstool) path: figure/title3282#. (itstool) path: figure/title
n1487#: C/index-in.docbook:1133n3283#: C/index-in.docbook:1133 C/index-in.docbook:1240
1488#: C/index-in.docbook:12403284#, fuzzy
1489msgid "Range Widgets"3285msgid "Range Widgets"
n1490msgstr ""n3286msgstr "Intervallkomponenter"
14913287
1492#. (itstool) path: chapter/para3288#. (itstool) path: chapter/para
1493#: C/index-in.docbook:11353289#: C/index-in.docbook:1135
n1494msgid "<classname>Gtk::Scale</classname> inherits from <classname>Gtk::Range</cln3290#, fuzzy
>assname>. <classname>Gtk::Scrollbar</classname> does not inherit from <classname 
>>Gtk::Range</classname>, but it shares much functionality with <classname>Gtk::S 
>cale</classname>. They both contain a \"trough\" and a \"slider\" (sometimes cal 
>led a \"thumbwheel\" in other GUI environments). Dragging the slider with the po 
>inter moves it within the trough, while clicking in the trough advances the slid 
>er towards the location of the click, either completely, or by a designated amou 
>nt, depending on which mouse button is used. This should be familiar scrollbar b 
>ehavior." 
3291msgid ""
3292"<classname>Gtk::Scale</classname> inherits from <classname>Gtk::Range</"
3293"classname>. <classname>Gtk::Scrollbar</classname> does not inherit from "
3294"<classname>Gtk::Range</classname>, but it shares much functionality with "
3295"<classname>Gtk::Scale</classname>. They both contain a \"trough\" and a "
3296"\"slider\" (sometimes called a \"thumbwheel\" in other GUI environments). "
3297"Dragging the slider with the pointer moves it within the trough, while "
3298"clicking in the trough advances the slider towards the location of the "
3299"click, either completely, or by a designated amount, depending on which "
3300"mouse button is used. This should be familiar scrollbar behavior."
1495msgstr ""3301msgstr ""
nn3302"<classname>Gtk::Scale</classname> ärver från <classname>Gtk::Range</"
3303"classname>. <classname>Gtk::Scrollbar</classname> ärver inte från "
3304"<classname>Gtk::Range</classname>, men delar mycket funktionalitet med "
3305"<classname>Gtk::Scale</classname>. De innehåller båda ett ”tråg” och ett "
3306"”skjutreglage” (ibland kallat ett ”tumhjul” i andra grafiska "
3307"användargränssnittsmiljöer). Att dra skjutreglaget med pekaren flyttar den i "
3308"tråget, medan att klicka i tråget flyttar skjutreglaget i riktning mot "
3309"klickets plats, antingen fullständigt, eller med en angiven mängd, beroende "
3310"på vilken musknapp som används. Det här bör vara bekant beteende för "
3311"rullningslister."
14963312
1497#. (itstool) path: chapter/para3313#. (itstool) path: chapter/para
1498#: C/index-in.docbook:11473314#: C/index-in.docbook:1147
n1499msgid "As will be explained in the <link linkend=\"chapter-adjustment\">Adjustmen3315#, fuzzy
>nts</link> section, all range widgets are associated with an <classname>Adjustme 
>nt</classname> object. To change the lower, upper, and current values used by th 
>e widget you need to use the methods of its <classname>Adjustment</classname>, w 
>hich you can get with the <methodname>get_adjustment()</methodname> method. The  
>range widgets' default constructors create an <classname>Adjustment</classname>  
>automatically, or you can specify an existing <classname>Adjustment</classname>, 
> maybe to share it with another widget. See the <link linkend=\"chapter-adjustme 
>nt\">Adjustments</link> section for further details." 
3316msgid ""
3317"As will be explained in the <link linkend=\"chapter-"
3318"adjustment\">Adjustments</link> section, all range widgets are associated "
3319"with an <classname>Adjustment</classname> object. To change the lower, "
3320"upper, and current values used by the widget you need to use the methods of "
3321"its <classname>Adjustment</classname>, which you can get with the "
3322"<methodname>get_adjustment()</methodname> method. The range widgets' default "
3323"constructors create an <classname>Adjustment</classname> automatically, or "
3324"you can specify an existing <classname>Adjustment</classname>, maybe to "
3325"share it with another widget. See the <link linkend=\"chapter-"
3326"adjustment\">Adjustments</link> section for further details."
1500msgstr ""3327msgstr ""
nn3328"Som kommer förklaras i avsnittet <link linkend=\"chapter-"
3329"adjustment\">Justeringar</link> så är alla intervallkomponenter associerade "
3330"med ett <classname>Adjustment</classname>-objekt. För att ändra de lägsta, "
3331"högsta och aktuella värdena som används av komponenten behöver du använda "
3332"metoderna för dess <classname>Adjustment</classname> vilka du kan få med "
3333"metoden <methodname>get_adjustment()</methodname>. Intervallkomponenternas "
3334"standardkonstruktorer skapar automatiskt en <classname>Adjustment</"
3335"classname>, eller så kan du ange en befintlig <classname>Adjustment</"
3336"classname>, kanske för att dela med en annan komponent. Se avsnittet <link "
3337"linkend=\"chapter-adjustment\">Justeringar</link> för mer detaljer."
15013338
1502#. (itstool) path: chapter/para3339#. (itstool) path: chapter/para
1503#: C/index-in.docbook:11613340#: C/index-in.docbook:1161
n1504msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3341msgid ""
>1Range.html\">Reference</link>" 
3342"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3343"classGtk_1_1Range.html\">Reference</link>"
1505msgstr ""3344msgstr ""
nn3345"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3346"classGtk_1_1Range.html\">Referens</link>"
15063347
1507#. (itstool) path: section/title3348#. (itstool) path: section/title
1508#: C/index-in.docbook:11643349#: C/index-in.docbook:1164
1509msgid "Scrollbar Widgets"3350msgid "Scrollbar Widgets"
n1510msgstr ""n3351msgstr "Rullningslistkomponenter"
15113352
1512#. (itstool) path: section/para3353#. (itstool) path: section/para
1513#: C/index-in.docbook:11663354#: C/index-in.docbook:1166
n1514msgid "These are standard scrollbars. They should be used only to scroll anothern3355msgid ""
> widget, such as a <classname>Gtk::Entry</classname> or a <classname>Gtk::Viewpo 
>rt</classname>, though it's usually easier to use the <classname>Gtk::ScrolledWi 
>ndow</classname> widget in most cases." 
3356"These are standard scrollbars. They should be used only to scroll another "
3357"widget, such as a <classname>Gtk::Entry</classname> or a <classname>Gtk::"
3358"Viewport</classname>, though it's usually easier to use the <classname>Gtk::"
3359"ScrolledWindow</classname> widget in most cases."
1515msgstr ""3360msgstr ""
nn3361"Dessa är standardrullningslister. De bör endast användas för att rulla en "
3362"annan komponent, som en <classname>Gtk::Entry</classname> eller "
3363"<classname>Gtk::Viewport</classname>, men det är vanligen lättare att "
3364"använda komponenten <classname>Gtk::ScrolledWindow</classname> i de flesta "
3365"fall."
15163366
1517#. (itstool) path: section/para3367#. (itstool) path: section/para
1518#: C/index-in.docbook:11733368#: C/index-in.docbook:1173
nn3369msgid ""
1519msgid "The orientation of a <classname>Gtk::Scrollbar</classname> can be either 3370"The orientation of a <classname>Gtk::Scrollbar</classname> can be either "
>horizontal or vertical." 
3371"horizontal or vertical."
1520msgstr ""3372msgstr ""
nn3373"Orienteringen för en <classname>Gtk::Scrollbar</classname> kan vara antingen "
3374"horisontell eller vertikal."
15213375
1522#. (itstool) path: section/para3376#. (itstool) path: section/para
1523#: C/index-in.docbook:11783377#: C/index-in.docbook:1178
n1524msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3378msgid ""
>1Scrollbar.html\">Reference</link>" 
3379"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3380"classGtk_1_1Scrollbar.html\">Reference</link>"
1525msgstr ""3381msgstr ""
nn3382"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3383"classGtk_1_1Scrollbar.html\">Referens</link>"
15263384
1527#. (itstool) path: section/title3385#. (itstool) path: section/title
1528#: C/index-in.docbook:11833386#: C/index-in.docbook:1183
nn3387#, fuzzy
1529msgid "Scale Widgets"3388msgid "Scale Widgets"
n1530msgstr ""n3389msgstr "Skalkomponenter"
15313390
nn3391# TODO: color
1532#. (itstool) path: section/para3392#. (itstool) path: section/para
1533#: C/index-in.docbook:11853393#: C/index-in.docbook:1185
n1534msgid "<classname>Gtk::Scale</classname> widgets (or \"sliders\") allow the usern3394#, fuzzy
> to visually select and manipulate a value within a specific range. You might us 
>e one, for instance, to adjust the magnification level on a zoomed preview of a  
>picture, or to control the brightness of a colour, or to specify the number of m 
>inutes of inactivity before a screensaver takes over the screen." 
3395msgid ""
3396"<classname>Gtk::Scale</classname> widgets (or \"sliders\") allow the user to "
3397"visually select and manipulate a value within a specific range. You might "
3398"use one, for instance, to adjust the magnification level on a zoomed preview "
3399"of a picture, or to control the brightness of a colour, or to specify the "
3400"number of minutes of inactivity before a screensaver takes over the screen."
1535msgstr ""3401msgstr ""
nn3402"<classname>Gtk::Scale</classname>-komponenter (eller ”skjutreglage”) låter "
3403"användaren visuellt välja och manipulera ett värde inom ett visst intervall. "
3404"Du använder exempelvis kanske en för att justera förstoringsnivån på en "
3405"zoomad förhandsgranskning av en bild, eller för att styra ljusstyrkan för en "
3406"färg, eller för att ange antalet inaktiva minuter innan en skärmsläckare tar "
3407"över skärmen."
15363408
nn3409# TODO: behavior
1537#. (itstool) path: section/para3410#. (itstool) path: section/para
1538#: C/index-in.docbook:11943411#: C/index-in.docbook:1194
n1539msgid "As with <classname>Scrollbar</classname>s, the orientation can be either n3412#, fuzzy
>horizontal or vertical. The default constructor creates an <classname>Adjustment 
></classname> with all of its values set to <literal>0.0</literal>. This isn't us 
>eful so you will need to set some <classname>Adjustment</classname> details to g 
>et meaningful behavior." 
3413#| msgid ""
3414#| "As with <classname>Scrollbar</classname>s, the orientation can be either "
3415#| "horizontal or vertical. The default constructor creates an "
3416#| "<classname>Adjustment</classname> with all of its values set to "
3417#| "<literal>0.0</literal>. This isn't useful so you will need to set some "
3418#| "<classname>Adjustment</classname> details to get meaningful behaviour."
3419msgid ""
3420"As with <classname>Scrollbar</classname>s, the orientation can be either "
3421"horizontal or vertical. The default constructor creates an "
3422"<classname>Adjustment</classname> with all of its values set to "
3423"<literal>0.0</literal>. This isn't useful so you will need to set some "
3424"<classname>Adjustment</classname> details to get meaningful behavior."
1540msgstr ""3425msgstr ""
nn3426"Som med <classname>Scrollbar</classname> kan orienteringen vara antingen "
3427"horisontell eller vertikal. Standardkonstruktorn skapar en "
3428"<classname>Adjustment</classname> med alla sina värden satta till "
3429"<literal>0.0</literal>. Det här är inte användbart så du kommer behöva "
3430"ställa in några <classname>Adjustment</classname>-detaljer för att få "
3431"betydelsefullt beteende."
15413432
1542#. (itstool) path: section/title3433#. (itstool) path: section/title
1543#: C/index-in.docbook:12033434#: C/index-in.docbook:1203
1544msgid "Useful methods"3435msgid "Useful methods"
n1545msgstr ""n3436msgstr "Användbara metoder"
15463437
1547#. (itstool) path: section/para3438#. (itstool) path: section/para
1548#: C/index-in.docbook:12053439#: C/index-in.docbook:1205
n1549msgid "<classname>Scale</classname> widgets can display their current value as an3440#, fuzzy
> number next to the trough. By default they show the value, but you can change t 
>his with the <methodname>set_draw_value()</methodname> method." 
3441msgid ""
3442"<classname>Scale</classname> widgets can display their current value as a "
3443"number next to the trough. By default they show the value, but you can "
3444"change this with the <methodname>set_draw_value()</methodname> method."
1550msgstr ""3445msgstr ""
nn3446"<classname>Scale</classname>-komponenter kan visa sina aktuella värden som "
3447"ett tal intill tråget. Som standard visar de värdet, men du kan ändra detta "
3448"med metoden <methodname>set_draw_value()</methodname>."
15513449
1552#. (itstool) path: section/para3450#. (itstool) path: section/para
1553#: C/index-in.docbook:12113451#: C/index-in.docbook:1211
n1554msgid "The value displayed by a scale widget is rounded to one decimal point by n3452#, fuzzy
>default, as is the <literal>value</literal> field in its <classname>Gtk::Adjustm 
>ent</classname>. You can change this with the <methodname>set_digits()</methodna 
>me> method." 
3453msgid ""
3454"The value displayed by a scale widget is rounded to one decimal point by "
3455"default, as is the <literal>value</literal> field in its <classname>Gtk::"
3456"Adjustment</classname>. You can change this with the "
3457"<methodname>set_digits()</methodname> method."
1555msgstr ""3458msgstr ""
nn3459"Värdet som visas av en skalkomponent avrundas till en decimal som standard, "
3460"som det är i fältet <literal>value</literal> i dess <classname>Gtk::"
3461"Adjustment</classname>. Du kan ändra detta med metoden "
3462"<methodname>set_digits()</methodname>."
15563463
1557#. (itstool) path: section/para3464#. (itstool) path: section/para
1558#: C/index-in.docbook:12183465#: C/index-in.docbook:1218
n1559msgid "Also, the value can be drawn in different positions relative to the trougn3466#, fuzzy
>h, specified by the <methodname>set_value_pos()</methodname> method." 
3467msgid ""
3468"Also, the value can be drawn in different positions relative to the trough, "
3469"specified by the <methodname>set_value_pos()</methodname> method."
1560msgstr ""3470msgstr ""
nn3471"Värdet kan också skrivas ut i olika positions relativt till tråget, angivet "
3472"av metoden <methodname>set_value_pos()</methodname>."
15613473
1562#. (itstool) path: section/para3474#. (itstool) path: section/para
1563#: C/index-in.docbook:12233475#: C/index-in.docbook:1223
n1564msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3476msgid ""
>1Scale.html\">Reference</link>" 
3477"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3478"classGtk_1_1Scale.html\">Reference</link>"
1565msgstr ""3479msgstr ""
nn3480"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3481"classGtk_1_1Scale.html\">Referens</link>"
15663482
1567#. (itstool) path: section/para3483#. (itstool) path: section/para
1568#: C/index-in.docbook:12313484#: C/index-in.docbook:1231
n1569msgid "This example displays a window with three range widgets all connected to n3485#, fuzzy
>the same adjustment, along with a couple of controls for adjusting some of the p 
>arameters mentioned above and in the section on adjustments, so you can see how  
>they affect the way these widgets work for the user." 
3486msgid ""
3487"This example displays a window with three range widgets all connected to the "
3488"same adjustment, along with a couple of controls for adjusting some of the "
3489"parameters mentioned above and in the section on adjustments, so you can see "
3490"how they affect the way these widgets work for the user."
1570msgstr ""3491msgstr ""
nn3492"Detta exempel visar ett fönster med tre intervallkomponenter som alla "
3493"anslutits till samma justering, tillsammans med ett par kontroller för att "
3494"justera några av parametrarna som nämnts ovan och i avsnittet om "
3495"justeringar, så du kan se hur de påverkar sättet dessa komponenter fungerar "
3496"för användaren."
15713497
1572#. (itstool) path: imageobject/imagedata3498#. (itstool) path: imageobject/imagedata
1573#. This is a reference to an external file such as an image or video. When3499#. This is a reference to an external file such as an image or video. When
1574#. the file changes, the md5 hash will change to let you know you need to3500#. the file changes, the md5 hash will change to let you know you need to
1575#. update your localized copy. The msgstr is not used at all. Set it to3501#. update your localized copy. The msgstr is not used at all. Set it to
1576#. whatever you like once you have updated your copy of the file.3502#. whatever you like once you have updated your copy of the file.
1577#: C/index-in.docbook:12423503#: C/index-in.docbook:1242
nn3504#, fuzzy
1578msgctxt "_"3505msgctxt "_"
n1579msgid "external ref='figures/range_widgets.png' md5='8bebdf457c84aa921681a7f44f4n3506msgid ""
>6f244'" 
3507"external ref='figures/range_widgets.png' "
3508"md5='8bebdf457c84aa921681a7f44f46f244'"
1580msgstr ""3509msgstr ""
nn3510"external ref='figures/range_widgets.png' "
3511"md5='8bebdf457c84aa921681a7f44f46f244'"
15813512
1582#. (itstool) path: section/para3513#. (itstool) path: section/para
1583#: C/index-in.docbook:12463514#: C/index-in.docbook:1246
n1584msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3515msgid ""
>e/master/examples/book/range_widgets\">Source Code</link>" 
3516"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3517"master/examples/book/range_widgets\">Source Code</link>"
1585msgstr ""3518msgstr ""
nn3519"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3520"master/examples/book/range_widgets\">Källkod</link>"
15863521
1587#. (itstool) path: chapter/title3522#. (itstool) path: chapter/title
1588#: C/index-in.docbook:12533523#: C/index-in.docbook:1253
1589msgid "Miscellaneous Widgets"3524msgid "Miscellaneous Widgets"
n1590msgstr ""n3525msgstr "Diverse komponenter"
15913526
1592#. (itstool) path: section/title3527#. (itstool) path: section/title
1593#. (itstool) path: figure/title3528#. (itstool) path: figure/title
n1594#: C/index-in.docbook:1256n3529#: C/index-in.docbook:1256 C/index-in.docbook:1297
1595#: C/index-in.docbook:12973530#, fuzzy
1596msgid "Label"3531msgid "Label"
n1597msgstr ""n3532msgstr "Label"
15983533
1599#. (itstool) path: section/para3534#. (itstool) path: section/para
1600#: C/index-in.docbook:12583535#: C/index-in.docbook:1258
n1601msgid "Labels are the main method of placing non-editable text in windows, for in3536msgid ""
>nstance to place a title next to an <classname>Entry</classname> widget. You can 
> specify the text in the constructor, or later with the <methodname>set_text()</ 
>methodname> or <methodname>set_markup()</methodname> methods." 
3537"Labels are the main method of placing non-editable text in windows, for "
3538"instance to place a title next to an <classname>Entry</classname> widget. "
3539"You can specify the text in the constructor, or later with the "
3540"<methodname>set_text()</methodname> or <methodname>set_markup()</methodname> "
3541"methods."
1602msgstr ""3542msgstr ""
nn3543"Etiketter är huvudmetoden för att placera ej redigerbar text i fönster, "
3544"exempelvis för att placera en titel intill en <classname>Entry</classname>-"
3545"komponent. Du kan ange texten i konstruktorn, eller senare med metoderna "
3546"<methodname>set_text()</methodname> eller <methodname>set_markup()</"
3547"methodname>."
16033548
1604#. (itstool) path: section/para3549#. (itstool) path: section/para
1605#: C/index-in.docbook:12653550#: C/index-in.docbook:1265
n1606msgid "The width of the label will be adjusted automatically. You can produce mun3551msgid ""
>lti-line labels by putting line breaks (\"\\n\") in the label string." 
3552"The width of the label will be adjusted automatically. You can produce multi-"
3553"line labels by putting line breaks (\"\\n\") in the label string."
1607msgstr ""3554msgstr ""
nn3555"Bredden på etiketten kommer justeras automatiskt. Du kan skapa etiketter med "
3556"flera rader genom att stoppa nyrader (”\\n”) i etikettsträngen."
16083557
1609#. (itstool) path: section/para3558#. (itstool) path: section/para
1610#: C/index-in.docbook:12693559#: C/index-in.docbook:1269
n1611msgid "The label text can be justified using the <methodname>set_justify()</methn3560#, fuzzy
>odname> method. The widget is also capable of word-wrapping, which can be activa 
>ted with <methodname>set_wrap()</methodname>." 
3561msgid ""
3562"The label text can be justified using the <methodname>set_justify()</"
3563"methodname> method. The widget is also capable of word-wrapping, which can "
3564"be activated with <methodname>set_wrap()</methodname>."
1612msgstr ""3565msgstr ""
nn3566"Etikettexten kan justeras med metoden <methodname>set_justify()</"
3567"methodname>. Etiketten kan också radbryta ord, vilket kan aktiveras med "
3568"<methodname>set_wrap()</methodname>."
16133569
nn3570# TODO: remove space before . ?
1614#. (itstool) path: section/para3571#. (itstool) path: section/para
1615#: C/index-in.docbook:12753572#: C/index-in.docbook:1275
n1616msgid "Gtk::Label supports some simple formatting, for instance allowing you to n3573#, fuzzy
>make some text bold, colored, or larger. You can do this by providing a string t 
>o <methodname>set_markup()</methodname>, using the <link xlink:href=\"https://do 
>cs.gtk.org/Pango/pango_markup.html\">Pango Markup syntax</link>. For instance, < 
>code> &lt;b&gt;bold text&lt;/b&gt; and &lt;s&gt;strikethrough text&lt;/s&gt; </c 
>ode> ." 
3574msgid ""
3575"Gtk::Label supports some simple formatting, for instance allowing you to "
3576"make some text bold, colored, or larger. You can do this by providing a "
3577"string to <methodname>set_markup()</methodname>, using the <link xlink:"
3578"href=\"https://docs.gtk.org/Pango/pango_markup.html\">Pango Markup syntax</"
3579"link>. For instance, <code> &lt;b&gt;bold text&lt;/b&gt; and &lt;s&gt;"
3580"strikethrough text&lt;/s&gt; </code> ."
1617msgstr ""3581msgstr ""
nn3582"Gtk::Label stöder viss enkel formatering, till exempel låter det dig göra "
3583"text i fetstil, i färg, eller större. Du kan göra detta genom att "
3584"tillhandahålla en sträng till <methodname>set_markup()</methodname> med "
3585"<link xlink:href=\"https://docs.gtk.org/Pango/pango_markup.html\">Pango "
3586"Markup-syntax</link>. Exempelvis, <code> &lt;b&gt;text i fetstil&lt;/b&gt; "
3587"och &lt;s&gt;genomstruken text&lt;/s&gt; </code> ."
16183588
1619#. (itstool) path: section/para3589#. (itstool) path: section/para
1620#: C/index-in.docbook:12843590#: C/index-in.docbook:1284
n1621msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3591msgid ""
>1Label.html\">Reference</link>" 
3592"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3593"classGtk_1_1Label.html\">Reference</link>"
1622msgstr ""3594msgstr ""
nn3595"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3596"classGtk_1_1Label.html\">Referens</link>"
16233597
1624#. (itstool) path: section/para3598#. (itstool) path: section/para
1625#: C/index-in.docbook:12883599#: C/index-in.docbook:1288
n1626msgid "Below is a short example to illustrate these functions. This example maken3600msgid ""
>s use of the Frame widget to better demonstrate the label styles. (The Frame wid 
>get is explained in the <link linkend=\"sec-frame\">Frame</link> section.) It is 
> possible that the first character in <literal>m_Label_Normal</literal> is shown 
> underlined only when you press the <keycap>Alt</keycap> key." 
3601"Below is a short example to illustrate these functions. This example makes "
3602"use of the Frame widget to better demonstrate the label styles. (The Frame "
3603"widget is explained in the <link linkend=\"sec-frame\">Frame</link> "
3604"section.) It is possible that the first character in "
3605"<literal>m_Label_Normal</literal> is shown underlined only when you press "
3606"the <keycap>Alt</keycap> key."
1627msgstr ""3607msgstr ""
nn3608"Nedan är ett kort exempel för att illustrera dessa funktioner. Detta exempel "
3609"använder komponenten Frame för att bättre demonstrera etikettstilarna. "
3610"(Komponenten Frame förklaras i avsnittet <link linkend=\"sec-frame\">Frame</"
3611"link>.) Det är möjligt att det första tecknet i <literal>m_Label_Normal</"
3612"literal> endast visas understruket när du trycker på <keycap>Alt</keycap>-"
3613"tangenten."
16283614
1629#. (itstool) path: imageobject/imagedata3615#. (itstool) path: imageobject/imagedata
1630#. This is a reference to an external file such as an image or video. When3616#. This is a reference to an external file such as an image or video. When
1631#. the file changes, the md5 hash will change to let you know you need to3617#. the file changes, the md5 hash will change to let you know you need to
1632#. update your localized copy. The msgstr is not used at all. Set it to3618#. update your localized copy. The msgstr is not used at all. Set it to
1633#. whatever you like once you have updated your copy of the file.3619#. whatever you like once you have updated your copy of the file.
1634#: C/index-in.docbook:12993620#: C/index-in.docbook:1299
nn3621#, fuzzy
1635msgctxt "_"3622msgctxt "_"
1636msgid "external ref='figures/label.png' md5='107dd71338becc14c70fbd3a708caa89'"3623msgid "external ref='figures/label.png' md5='107dd71338becc14c70fbd3a708caa89'"
1637msgstr ""3624msgstr ""
nn3625"external ref='figures/label.png' md5='107dd71338becc14c70fbd3a708caa89'"
16383626
1639#. (itstool) path: section/para3627#. (itstool) path: section/para
1640#: C/index-in.docbook:13033628#: C/index-in.docbook:1303
n1641msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3629msgid ""
>e/master/examples/book/label\">Source Code</link>" 
3630"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3631"master/examples/book/label\">Source Code</link>"
1642msgstr ""3632msgstr ""
nn3633"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3634"master/examples/book/label\">Källkod</link>"
16433635
1644#. (itstool) path: section/title3636#. (itstool) path: section/title
1645#. (itstool) path: figure/title3637#. (itstool) path: figure/title
n1646#: C/index-in.docbook:1310n3638#: C/index-in.docbook:1310 C/index-in.docbook:1366
1647#: C/index-in.docbook:13663639#, fuzzy
1648msgid "Entry"3640msgid "Entry"
n1649msgstr ""n3641msgstr "Entry"
16503642
1651#. (itstool) path: section/title3643#. (itstool) path: section/title
1652#: C/index-in.docbook:13133644#: C/index-in.docbook:1313
1653msgid "Simple Use"3645msgid "Simple Use"
n1654msgstr ""n3646msgstr "Enkel användning"
16553647
1656#. (itstool) path: section/para3648#. (itstool) path: section/para
1657#: C/index-in.docbook:13153649#: C/index-in.docbook:1315
n1658msgid "Entry widgets allow the user to enter text. You can change the contents wn3650#, fuzzy
>ith the <methodname>set_text()</methodname> method, and read the current content 
>s with the <methodname>get_text()</methodname> method." 
3651msgid ""
3652"Entry widgets allow the user to enter text. You can change the contents with "
3653"the <methodname>set_text()</methodname> method, and read the current "
3654"contents with the <methodname>get_text()</methodname> method."
1659msgstr ""3655msgstr ""
nn3656"Inmatningskomponenter låter användaren mata in text. Du kan ändra innehållet "
3657"med metoden <methodname>set_text()</methodname>, och läsa aktuellt innehåll "
3658"med metoden <methodname>get_text()</methodname>."
16603659
1661#. (itstool) path: section/para3660#. (itstool) path: section/para
1662#: C/index-in.docbook:13203661#: C/index-in.docbook:1320
n1663msgid "Occasionally you might want to make an <classname>Entry</classname> widgen3662msgid ""
>t read-only. This can be done by passing <literal>false</literal> to the <method 
>name>set_editable()</methodname> method." 
3663"Occasionally you might want to make an <classname>Entry</classname> widget "
3664"read-only. This can be done by passing <literal>false</literal> to the "
3665"<methodname>set_editable()</methodname> method."
1664msgstr ""3666msgstr ""
nn3667"Ibland kan du vilja göra en <classname>Entry</classname>-komponent "
3668"skrivskyddad. Detta kan göras genom att skicka <literal>false</literal> till "
3669"metoden <methodname>set_editable()</methodname>."
16653670
1666#. (itstool) path: section/para3671#. (itstool) path: section/para
1667#: C/index-in.docbook:13263672#: C/index-in.docbook:1326
n1668msgid "For the input of passwords, passphrases and other information you don't wn3673msgid ""
>ant echoed on the screen, calling <methodname>set_visibility()</methodname> with 
> <literal>false</literal> will cause the text to be hidden." 
3674"For the input of passwords, passphrases and other information you don't want "
3675"echoed on the screen, calling <methodname>set_visibility()</methodname> with "
3676"<literal>false</literal> will cause the text to be hidden."
1669msgstr ""3677msgstr ""
nn3678"För inmatning av lösenord, lösenfraser och annan information du inte vill "
3679"ska skrivas ut på skärmen kan du anropa <methodname>set_visibility()</"
3680"methodname> med <literal>false</literal> för att texten ska vara dold."
16703681
1671#. (itstool) path: section/para3682#. (itstool) path: section/para
1672#: C/index-in.docbook:13323683#: C/index-in.docbook:1332
n1673msgid "You might want to be notified whenever the user types in a text entry widn3684#, fuzzy
>get. <classname>Gtk::Entry</classname> provides two signals, <literal>activate</ 
>literal> (since <application>gtkmm</application> 4.8) and <literal>changed</lite 
>ral>, for this purpose. <literal>activate</literal> is emitted when the user pre 
>sses the <keycap>Enter</keycap> key in a text-entry widget; <literal>changed</li 
>teral> is emitted when the text in the widget changes. You can use these, for in 
>stance, to validate or filter the text the user types. Moving the keyboard focus 
> to another widget may also signal that the user has finished entering text. The 
> <literal>leave</literal> signal in a <classname>Gtk::EventControllerFocus</clas 
>sname> can notify you when that happens. The <link linkend=\"sec-comboboxentry\" 
>>ComboBox with an Entry</link> section contains example programs that use these  
>signals." 
3685msgid ""
3686"You might want to be notified whenever the user types in a text entry "
3687"widget. <classname>Gtk::Entry</classname> provides two signals, "
3688"<literal>activate</literal> (since <application>gtkmm</application> 4.8) and "
3689"<literal>changed</literal>, for this purpose. <literal>activate</literal> is "
3690"emitted when the user presses the <keycap>Enter</keycap> key in a text-entry "
3691"widget; <literal>changed</literal> is emitted when the text in the widget "
3692"changes. You can use these, for instance, to validate or filter the text the "
3693"user types. Moving the keyboard focus to another widget may also signal that "
3694"the user has finished entering text. The <literal>leave</literal> signal in "
3695"a <classname>Gtk::EventControllerFocus</classname> can notify you when that "
3696"happens. The <link linkend=\"sec-comboboxentry\">ComboBox with an Entry</"
3697"link> section contains example programs that use these signals."
1674msgstr ""3698msgstr ""
nn3699"Du kan vilja meddelas närhelst användaren skriver i en "
3700"textinmatningskomponent. <classname>Gtk::Entry</classname> tillhandahåller "
3701"två signaler, <literal>activate</literal> (sedan <application>gtkmm</"
3702"application> 4.8.0) och <literal>changed</literal> för detta syfte. "
3703"<literal>activate</literal> sänds ut när användaren trycker på "
3704"<keycap>Retur</keycap>-tangenten i en textinmatningskomponent; "
3705"<literal>changed</literal> sänds ut när texten i komponenten ändras. Du kan "
3706"exempelvis använda dessa för att validera eller filtrera texten som "
3707"användaren skriver in. Att flytta tangentbordsfokus till en annan komponent "
3708"kan också signalera att användaren är klar med att mata in text. Signalen "
3709"<literal>leave</literal> i ett <classname>Gtk::EventControllerFocus</"
3710"classname> kan meddela dig när det händer. Avsnittet <link linkend=\"sec-"
3711"comboboxentry\">ComboBox med ett Entry</link> innehåller exempelprogram som "
3712"använder dessa signaler."
16753713
1676#. (itstool) path: section/para3714#. (itstool) path: section/para
1677#: C/index-in.docbook:13463715#: C/index-in.docbook:1346
n1678msgid "If you pass <literal>true</literal> to the <methodname>set_activates_defan3716#, fuzzy
>ult()</methodname> method, pressing <keycap>Enter</keycap> in the <classname>Gtk 
>::Entry</classname> will activate the default widget for the window containing t 
>he <classname>Gtk::Entry</classname>. This is especially useful in dialog boxes. 
> The default widget is usually one of the dialog buttons, which e.g. will close  
>the dialog box. To set a widget as the default widget, use <methodname>Gtk::Wind 
>ow::set_default_widget()</methodname>." 
3717msgid ""
3718"If you pass <literal>true</literal> to the "
3719"<methodname>set_activates_default()</methodname> method, pressing "
3720"<keycap>Enter</keycap> in the <classname>Gtk::Entry</classname> will "
3721"activate the default widget for the window containing the <classname>Gtk::"
3722"Entry</classname>. This is especially useful in dialog boxes. The default "
3723"widget is usually one of the dialog buttons, which e.g. will close the "
3724"dialog box. To set a widget as the default widget, use <methodname>Gtk::"
3725"Window::set_default_widget()</methodname>."
1679msgstr ""3726msgstr ""
nn3727"Om du skickar <literal>true</literal> till metoden "
3728"<methodname>set_activates_default()</methodname> kommer att trycka "
3729"<keycap>Retur</keycap> i vår <classname>Gtk::Entry</classname> aktivera "
3730"standardkomponenten för fönstret som innehåller vår <classname>Gtk::Entry</"
3731"classname>. Detta är speciellt användbart i dialogrutor. Standardkomponenten "
3732"är vanligen en av dialogknapparna, vilken t.ex. kommer stänga dialogrutan. "
3733"Använd <methodname>Gtk::Window::set_default_widget()</methodname> för att "
3734"ställa in en komponent som standardkomponenten."
16803735
1681#. (itstool) path: section/para3736#. (itstool) path: section/para
1682#: C/index-in.docbook:13553737#: C/index-in.docbook:1355
n1683msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3738msgid ""
>1Entry.html\">Reference</link>" 
3739"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3740"classGtk_1_1Entry.html\">Reference</link>"
1684msgstr ""3741msgstr ""
nn3742"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3743"classGtk_1_1Entry.html\">Referens</link>"
16853744
1686#. (itstool) path: section/title3745#. (itstool) path: section/title
1687#: C/index-in.docbook:13583746#: C/index-in.docbook:1358
nn3747#, fuzzy
1688msgid "Simple Entry Example"3748msgid "Simple Entry Example"
n1689msgstr ""n3749msgstr "Enkelt inmatningsexempel"
16903750
1691#. (itstool) path: section/para3751#. (itstool) path: section/para
1692#: C/index-in.docbook:13593752#: C/index-in.docbook:1359
n1693msgid "This example uses <classname>Gtk::Entry</classname>. It also has two <clan3753msgid ""
>ssname>CheckButton</classname>s, with which you can toggle the editable and visi 
>ble flags." 
3754"This example uses <classname>Gtk::Entry</classname>. It also has two "
3755"<classname>CheckButton</classname>s, with which you can toggle the editable "
3756"and visible flags."
1694msgstr ""3757msgstr ""
nn3758"Detta exempel använder <classname>Gtk::Entry</classname>. Det har också två "
3759"<classname>CheckButton</classname>-knappar, med vilka du kan växla flaggorna "
3760"för redigering och synlighet."
16953761
1696#. (itstool) path: imageobject/imagedata3762#. (itstool) path: imageobject/imagedata
1697#. This is a reference to an external file such as an image or video. When3763#. This is a reference to an external file such as an image or video. When
1698#. the file changes, the md5 hash will change to let you know you need to3764#. the file changes, the md5 hash will change to let you know you need to
1699#. update your localized copy. The msgstr is not used at all. Set it to3765#. update your localized copy. The msgstr is not used at all. Set it to
1700#. whatever you like once you have updated your copy of the file.3766#. whatever you like once you have updated your copy of the file.
1701#: C/index-in.docbook:13683767#: C/index-in.docbook:1368
nn3768#, fuzzy
1702msgctxt "_"3769msgctxt "_"
1703msgid "external ref='figures/entry.png' md5='ae877c1b982f8c6cadebc9867f6d9075'"3770msgid "external ref='figures/entry.png' md5='ae877c1b982f8c6cadebc9867f6d9075'"
1704msgstr ""3771msgstr ""
nn3772"external ref='figures/entry.png' md5='ae877c1b982f8c6cadebc9867f6d9075'"
17053773
1706#. (itstool) path: section/para3774#. (itstool) path: section/para
1707#: C/index-in.docbook:13723775#: C/index-in.docbook:1372
n1708msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3776msgid ""
>e/master/examples/book/entry/simple\">Source Code</link>" 
3777"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3778"master/examples/book/entry/simple\">Source Code</link>"
1709msgstr ""3779msgstr ""
nn3780"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3781"master/examples/book/entry/simple\">Källkod</link>"
17103782
1711#. (itstool) path: section/title3783#. (itstool) path: section/title
1712#. (itstool) path: figure/title3784#. (itstool) path: figure/title
n1713#: C/index-in.docbook:1379n3785#: C/index-in.docbook:1379 C/index-in.docbook:1419
1714#: C/index-in.docbook:14193786#, fuzzy
1715msgid "Entry Completion"3787msgid "Entry Completion"
n1716msgstr ""n3788msgstr "Inmatningskomplettering"
17173789
1718#. (itstool) path: note/para3790#. (itstool) path: note/para
1719#: C/index-in.docbook:13813791#: C/index-in.docbook:1381
n1720msgid "<classname>Gtk::EntryCompletion</classname> is deprecated since <applicatn3792msgid ""
>ion>gtkmm</application> 4.10. There is no replacement in <application>gtkmm</app 
>lication>." 
3793"<classname>Gtk::EntryCompletion</classname> is deprecated since "
3794"<application>gtkmm</application> 4.10. There is no replacement in "
3795"<application>gtkmm</application>."
1721msgstr ""3796msgstr ""
nn3797"<classname>Gtk::EntryCompletion</classname> är föråldrad sedan "
3798"<application>gtkmm</application> 4.10. Det finns ingen ersättning i "
3799"<application>gtkmm</application>."
17223800
1723#. (itstool) path: section/para3801#. (itstool) path: section/para
1724#: C/index-in.docbook:13853802#: C/index-in.docbook:1385
n1725msgid "An <classname>Entry</classname> widget can offer a drop-down list of pre-n3803msgid ""
>existing choices based on the first few characters typed by the user. For instan 
>ce, a search dialog could suggest text from previous searches." 
3804"An <classname>Entry</classname> widget can offer a drop-down list of pre-"
3805"existing choices based on the first few characters typed by the user. For "
3806"instance, a search dialog could suggest text from previous searches."
1726msgstr ""3807msgstr ""
nn3808"En <classname>Entry</classname>-komponent kan erbjuda en rullgardinslista "
3809"med befintliga val baserat på de första tecken som användaren skrivit in. En "
3810"sökdialog skulle exempelvis kunna föreslå text från tidigare sökningar."
17273811
1728#. (itstool) path: section/para3812#. (itstool) path: section/para
1729#: C/index-in.docbook:13903813#: C/index-in.docbook:1390
n1730msgid "To enable this functionality, you must create an <classname>EntryCompletin3814msgid ""
>on</classname> object, and provide it to the <classname>Entry</classname> widget 
> via the <methodname>set_completion()</methodname> method." 
3815"To enable this functionality, you must create an <classname>EntryCompletion</"
3816"classname> object, and provide it to the <classname>Entry</classname> widget "
3817"via the <methodname>set_completion()</methodname> method."
1731msgstr ""3818msgstr ""
nn3819"För att aktivera denna funktionalitet måste du skapa ett "
3820"<classname>EntryCompletion</classname>-objekt, och tillhandahålla det till "
3821"<classname>Entry</classname>-komponenten genom metoden "
3822"<methodname>set_completion()</methodname>."
17323823
1733#. (itstool) path: section/para3824#. (itstool) path: section/para
1734#: C/index-in.docbook:13953825#: C/index-in.docbook:1395
n1735msgid "The <classname>EntryCompletion</classname> may use a <classname>TreeModeln3826#, fuzzy
></classname> containing possible entries, specified with <methodname>set_model() 
></methodname>. You should then call <methodname>set_text_column()</methodname> t 
>o specify which of your model columns should be used to match possible text entr 
>ies." 
3827msgid ""
3828"The <classname>EntryCompletion</classname> may use a <classname>TreeModel</"
3829"classname> containing possible entries, specified with "
3830"<methodname>set_model()</methodname>. You should then call "
3831"<methodname>set_text_column()</methodname> to specify which of your model "
3832"columns should be used to match possible text entries."
1736msgstr ""3833msgstr ""
nn3834"Denna <classname>EntryCompletion</classname> kan använda en "
3835"<classname>TreeModel</classname> som innehåller möjliga inmatningar, angivet "
3836"med <methodname>set_model()</methodname>. Du bör sedan anropa "
3837"<methodname>set_text_column()</methodname> för att ange vilka av dina "
3838"modellkolumner som ska användas för att matcha möjliga textinmatningar."
17373839
1738#. (itstool) path: section/para3840#. (itstool) path: section/para
1739#: C/index-in.docbook:14013841#: C/index-in.docbook:1401
n1740msgid "Alternatively, if a complete list of possible entries would be too large n3842#, fuzzy
>or too inconvenient to generate, a callback slot may instead be specified with < 
>methodname>set_match_func()</methodname>. This is also useful if you wish to mat 
>ch on a part of the string other than the start." 
3843msgid ""
3844"Alternatively, if a complete list of possible entries would be too large or "
3845"too inconvenient to generate, a callback slot may instead be specified with "
3846"<methodname>set_match_func()</methodname>. This is also useful if you wish "
3847"to match on a part of the string other than the start."
1741msgstr ""3848msgstr ""
nn3849"Alternativt kan, om en fullständig lista över möjliga inmatningar skulle "
3850"vara för stor eller opraktisk att skapa, ett återanropsfack i stället anges "
3851"med <methodname>set_match_func()</methodname>. Detta är även användbart om "
3852"du vill matcha strängen på en annan del än starten."
17423853
1743#. (itstool) path: section/para3854#. (itstool) path: section/para
1744#: C/index-in.docbook:14073855#: C/index-in.docbook:1407
n1745msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n3856msgid ""
>1EntryCompletion.html\">Reference</link>" 
3857"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3858"classGtk_1_1EntryCompletion.html\">Reference</link>"
1746msgstr ""3859msgstr ""
nn3860"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
3861"classGtk_1_1EntryCompletion.html\">Referens</link>"
17473862
1748#. (itstool) path: section/title3863#. (itstool) path: section/title
1749#: C/index-in.docbook:14103864#: C/index-in.docbook:1410
nn3865#, fuzzy
1750msgid "Entry Completion Example"3866msgid "Entry Completion Example"
n1751msgstr ""n3867msgstr "Exempel på inmatningskomplettering"
17523868
1753#. (itstool) path: section/para3869#. (itstool) path: section/para
1754#: C/index-in.docbook:14113870#: C/index-in.docbook:1411
n1755msgid "This example creates a <classname>Gtk::EntryCompletion</classname> and asn3871msgid ""
>sociates it with a <classname>Gtk::Entry</classname> widget. The completion uses 
> a <classname>Gtk::TreeModel</classname> of possible entries, and some additiona 
>l actions." 
3872"This example creates a <classname>Gtk::EntryCompletion</classname> and "
3873"associates it with a <classname>Gtk::Entry</classname> widget. The "
3874"completion uses a <classname>Gtk::TreeModel</classname> of possible entries, "
3875"and some additional actions."
1756msgstr ""3876msgstr ""
nn3877"Detta exempel skapar en <classname>Gtk::EntryCompletion</classname> och "
3878"associerar den med en <classname>Gtk::Entry</classname>-komponent. "
3879"Kompletteringen använder en <classname>Gtk::TreeModel</classname> med "
3880"möjliga inmatningar och några ytterligare åtgärder."
17573881
1758#. (itstool) path: imageobject/imagedata3882#. (itstool) path: imageobject/imagedata
1759#. This is a reference to an external file such as an image or video. When3883#. This is a reference to an external file such as an image or video. When
1760#. the file changes, the md5 hash will change to let you know you need to3884#. the file changes, the md5 hash will change to let you know you need to
1761#. update your localized copy. The msgstr is not used at all. Set it to3885#. update your localized copy. The msgstr is not used at all. Set it to
1762#. whatever you like once you have updated your copy of the file.3886#. whatever you like once you have updated your copy of the file.
1763#: C/index-in.docbook:14213887#: C/index-in.docbook:1421
nn3888#, fuzzy
1764msgctxt "_"3889msgctxt "_"
n1765msgid "external ref='figures/entry_completion.png' md5='5b9015c5bd9c04c2c51eb1den3890msgid ""
>40ab7534'" 
3891"external ref='figures/entry_completion.png' "
3892"md5='5b9015c5bd9c04c2c51eb1de40ab7534'"
1766msgstr ""3893msgstr ""
nn3894"external ref='figures/entry_completion.png' "
3895"md5='5b9015c5bd9c04c2c51eb1de40ab7534'"
17673896
1768#. (itstool) path: section/para3897#. (itstool) path: section/para
1769#: C/index-in.docbook:14253898#: C/index-in.docbook:1425
n1770msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3899msgid ""
>e/master/examples/book/entry/completion\">Source Code</link>" 
3900"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3901"master/examples/book/entry/completion\">Source Code</link>"
1771msgstr ""3902msgstr ""
nn3903"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3904"master/examples/book/entry/completion\">Källkod</link>"
17723905
1773#. (itstool) path: section/title3906#. (itstool) path: section/title
1774#: C/index-in.docbook:14313907#: C/index-in.docbook:1431
nn3908#, fuzzy
1775msgid "Entry Icons"3909msgid "Entry Icons"
n1776msgstr ""n3910msgstr "Inmatningsikoner"
17773911
1778#. (itstool) path: section/para3912#. (itstool) path: section/para
1779#: C/index-in.docbook:14333913#: C/index-in.docbook:1433
n1780msgid "An <classname>Entry</classname> widget can show an icon at the start or en3914msgid ""
>nd of the text area. The icon can be specified by methods such as <methodname>se 
>t_icon_from_paintable()</methodname> or <methodname>set_icon_from_icon_name()</m 
>ethodname>. An application can respond to the user pressing the icon by handling 
> the <methodname>signal_icon_press</methodname> signal." 
3915"An <classname>Entry</classname> widget can show an icon at the start or end "
3916"of the text area. The icon can be specified by methods such as "
3917"<methodname>set_icon_from_paintable()</methodname> or "
3918"<methodname>set_icon_from_icon_name()</methodname>. An application can "
3919"respond to the user pressing the icon by handling the "
3920"<methodname>signal_icon_press</methodname> signal."
1781msgstr ""3921msgstr ""
nn3922"En <classname>Entry</classname>-komponent kan visa en ikon i början eller i "
3923"slutet på textområdet. Ikonen kan anges av metoder som "
3924"<methodname>set_icon_from_paintable()</methodname> eller "
3925"<methodname>set_icon_from_icon_name()</methodname>. Ett program kan svara på "
3926"tryck på ikonen genom att hantera signalen <methodname>signal_icon_press</"
3927"methodname>."
17823928
1783#. (itstool) path: section/title3929#. (itstool) path: section/title
1784#: C/index-in.docbook:14413930#: C/index-in.docbook:1441
nn3931#, fuzzy
1785msgid "Entry Icon Example"3932msgid "Entry Icon Example"
n1786msgstr ""n3933msgstr "Exempel på inmatningsikon"
17873934
1788#. (itstool) path: section/para3935#. (itstool) path: section/para
1789#: C/index-in.docbook:14423936#: C/index-in.docbook:1442
n1790msgid "This example shows a <classname>Gtk::Entry</classname> widget with a namen3937msgid ""
>d search icon, and prints text to the terminal when the icon is pressed." 
3938"This example shows a <classname>Gtk::Entry</classname> widget with a named "
3939"search icon, and prints text to the terminal when the icon is pressed."
1791msgstr ""3940msgstr ""
nn3941"Detta exempel visar en <classname>Gtk::Entry</classname>-komponent med en "
3942"namngiven sökikon, och skriver ut text till terminalen när ikonen trycks ned."
17923943
1793#. (itstool) path: figure/title3944#. (itstool) path: figure/title
1794#: C/index-in.docbook:14483945#: C/index-in.docbook:1448
nn3946#, fuzzy
1795msgid "Entry with Icon"3947msgid "Entry with Icon"
n1796msgstr ""n3948msgstr "Entry med ikon"
17973949
1798#. (itstool) path: imageobject/imagedata3950#. (itstool) path: imageobject/imagedata
1799#. This is a reference to an external file such as an image or video. When3951#. This is a reference to an external file such as an image or video. When
1800#. the file changes, the md5 hash will change to let you know you need to3952#. the file changes, the md5 hash will change to let you know you need to
1801#. update your localized copy. The msgstr is not used at all. Set it to3953#. update your localized copy. The msgstr is not used at all. Set it to
1802#. whatever you like once you have updated your copy of the file.3954#. whatever you like once you have updated your copy of the file.
1803#: C/index-in.docbook:14503955#: C/index-in.docbook:1450
nn3956#, fuzzy
1804msgctxt "_"3957msgctxt "_"
nn3958msgid ""
1805msgid "external ref='figures/entry_icon.png' md5='fb1db5f1b82bb2849d352170ada8913959"external ref='figures/entry_icon.png' md5='fb1db5f1b82bb2849d352170ada89191'"
>91'" 
1806msgstr ""3960msgstr ""
nn3961"external ref='figures/entry_icon.png' md5='fb1db5f1b82bb2849d352170ada89191'"
18073962
1808#. (itstool) path: section/para3963#. (itstool) path: section/para
1809#: C/index-in.docbook:14543964#: C/index-in.docbook:1454
n1810msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren3965msgid ""
>e/master/examples/book/entry/icon\">Source Code</link>" 
3966"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3967"master/examples/book/entry/icon\">Source Code</link>"
1811msgstr ""3968msgstr ""
nn3969"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
3970"master/examples/book/entry/icon\">Källkod</link>"
18123971
1813#. (itstool) path: section/title3972#. (itstool) path: section/title
1814#: C/index-in.docbook:14603973#: C/index-in.docbook:1460
nn3974#, fuzzy
1815msgid "Entry Progress"3975msgid "Entry Progress"
n1816msgstr ""n3976msgstr "Inmatningsförlopp"
18173977
1818#. (itstool) path: section/para3978#. (itstool) path: section/para
1819#: C/index-in.docbook:14623979#: C/index-in.docbook:1462
n1820msgid "An <classname>Entry</classname> widget can show a progress bar inside then3980msgid ""
> text area, under the entered text. The progress bar will be shown if the <metho 
>dname>set_progress_fraction()</methodname> or <methodname>set_progress_pulse_ste 
>p()</methodname> methods are called." 
3981"An <classname>Entry</classname> widget can show a progress bar inside the "
3982"text area, under the entered text. The progress bar will be shown if the "
3983"<methodname>set_progress_fraction()</methodname> or "
3984"<methodname>set_progress_pulse_step()</methodname> methods are called."
1821msgstr ""3985msgstr ""
nn3986"En <classname>Entry</classname>-komponent kan visa en förloppsindikator "
3987"inuti textområdet, under den inmatade texten. Förloppsindikatorn kommer "
3988"visas om metoderna <methodname>set_progress_fraction()</methodname> eller "
3989"<methodname>set_progress_pulse_step()</methodname> anropas."
18223990
1823#. (itstool) path: section/title3991#. (itstool) path: section/title
1824#: C/index-in.docbook:14683992#: C/index-in.docbook:1468
nn3993#, fuzzy
1825msgid "Entry Progress Example"3994msgid "Entry Progress Example"
n1826msgstr ""n3995msgstr "Exempel på inmatningsförlopp"
18273996
1828#. (itstool) path: section/para3997#. (itstool) path: section/para
1829#: C/index-in.docbook:14693998#: C/index-in.docbook:1469
nn3999msgid ""
1830msgid "This example shows a <classname>Gtk::Entry</classname> widget with a prog4000"This example shows a <classname>Gtk::Entry</classname> widget with a "
>ress bar." 
4001"progress bar."
1831msgstr ""4002msgstr ""
nn4003"Detta exempel visar en <classname>Gtk::Entry</classname>-komponent med en "
4004"förloppsindikator."
18324005
1833#. (itstool) path: figure/title4006#. (itstool) path: figure/title
1834#: C/index-in.docbook:14754007#: C/index-in.docbook:1475
nn4008#, fuzzy
1835msgid "Entry with Progress Bar"4009msgid "Entry with Progress Bar"
n1836msgstr ""n4010msgstr "Entry med förloppsindikator"
18374011
1838#. (itstool) path: imageobject/imagedata4012#. (itstool) path: imageobject/imagedata
1839#. This is a reference to an external file such as an image or video. When4013#. This is a reference to an external file such as an image or video. When
1840#. the file changes, the md5 hash will change to let you know you need to4014#. the file changes, the md5 hash will change to let you know you need to
1841#. update your localized copy. The msgstr is not used at all. Set it to4015#. update your localized copy. The msgstr is not used at all. Set it to
1842#. whatever you like once you have updated your copy of the file.4016#. whatever you like once you have updated your copy of the file.
1843#: C/index-in.docbook:14774017#: C/index-in.docbook:1477
nn4018#, fuzzy
1844msgctxt "_"4019msgctxt "_"
n1845msgid "external ref='figures/entry_progress.png' md5='07a446c645744d0ab351611227n4020msgid ""
>1cf4e3'" 
4021"external ref='figures/entry_progress.png' "
4022"md5='07a446c645744d0ab3516112271cf4e3'"
1846msgstr ""4023msgstr ""
nn4024"external ref='figures/entry_progress.png' "
4025"md5='07a446c645744d0ab3516112271cf4e3'"
18474026
1848#. (itstool) path: section/para4027#. (itstool) path: section/para
1849#: C/index-in.docbook:14814028#: C/index-in.docbook:1481
n1850msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4029msgid ""
>e/master/examples/book/entry/progress\">Source Code</link>" 
4030"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4031"master/examples/book/entry/progress\">Source Code</link>"
1851msgstr ""4032msgstr ""
nn4033"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4034"master/examples/book/entry/progress\">Källkod</link>"
18524035
1853#. (itstool) path: section/title4036#. (itstool) path: section/title
1854#. (itstool) path: figure/title4037#. (itstool) path: figure/title
n1855#: C/index-in.docbook:1489n4038#: C/index-in.docbook:1489 C/index-in.docbook:1612
1856#: C/index-in.docbook:1612
1857msgid "SpinButton"4039msgid "SpinButton"
n1858msgstr ""n4040msgstr "SpinButton"
18594041
1860#. (itstool) path: section/para4042#. (itstool) path: section/para
1861#: C/index-in.docbook:14914043#: C/index-in.docbook:1491
n1862msgid "A <classname>SpinButton</classname> allows the user to select a value fron4044#, fuzzy
>m a range of numeric values. It has an <classname>Entry</classname> widget with  
>increment and decrement buttons at the side. Clicking the buttons causes the val 
>ue to 'spin' up and down across the range of possible values. The <classname>Ent 
>ry</classname> widget may also be used to enter a value directly." 
4045msgid ""
4046"A <classname>SpinButton</classname> allows the user to select a value from a "
4047"range of numeric values. It has an <classname>Entry</classname> widget with "
4048"increment and decrement buttons at the side. Clicking the buttons causes the "
4049"value to 'spin' up and down across the range of possible values. The "
4050"<classname>Entry</classname> widget may also be used to enter a value "
4051"directly."
1863msgstr ""4052msgstr ""
nn4053"En <classname>SpinButton</classname> låter användaren välja ett värde från "
4054"ett numeriskt intervall. Den har en <classname>Entry</classname>-komponent "
4055"med öknings- och minskningsknappar på sidan. Att klicka på knapparna får "
4056"värdet att ”snurras” upp och ner längs intervallet av möjliga värden. "
4057"<classname>Entry</classname>-komponenten kan också användas för att direkt "
4058"mata in ett värde."
18644059
1865#. (itstool) path: section/para4060#. (itstool) path: section/para
1866#: C/index-in.docbook:14994061#: C/index-in.docbook:1499
n1867msgid "The value can have an adjustable number of decimal places, and the step sn4062msgid ""
>ize is configurable. <classname>SpinButton</classname>s have an 'auto-repeat' fe 
>ature as well: holding down the increment or decrement button can optionally cau 
>se the value to change more quickly the longer the button is held down." 
4063"The value can have an adjustable number of decimal places, and the step size "
4064"is configurable. <classname>SpinButton</classname>s have an 'auto-repeat' "
4065"feature as well: holding down the increment or decrement button can "
4066"optionally cause the value to change more quickly the longer the button is "
4067"held down."
1868msgstr ""4068msgstr ""
nn4069"Värdet kan ha ett justerbart antal decimaler, och stegstorleken kan "
4070"konfigureras. <classname>SpinButton</classname> har även en funktion för "
4071"”automatisk upprepning”: att hålla ner öknings- eller minskningsknappen kan "
4072"valfritt få värdet att ändras snabbare ju längre knappen hålls ner."
18694073
1870#. (itstool) path: listitem/para4074#. (itstool) path: listitem/para
1871#: C/index-in.docbook:15134075#: C/index-in.docbook:1513
1872msgid "<literal>value</literal>: value for the Spin Button"4076msgid "<literal>value</literal>: value for the Spin Button"
n1873msgstr ""n4077msgstr "<literal>value</literal>: värdet på stegningsrutan"
18744078
1875#. (itstool) path: listitem/para4079#. (itstool) path: listitem/para
1876#: C/index-in.docbook:15194080#: C/index-in.docbook:1519
1877msgid "<literal>lower</literal>: lower range value"4081msgid "<literal>lower</literal>: lower range value"
n1878msgstr ""n4082msgstr "<literal>lower</literal>: lägsta intervallvärde"
18794083
1880#. (itstool) path: listitem/para4084#. (itstool) path: listitem/para
1881#: C/index-in.docbook:15254085#: C/index-in.docbook:1525
1882msgid "<literal>upper</literal>: upper range value"4086msgid "<literal>upper</literal>: upper range value"
n1883msgstr ""n4087msgstr "<literal>upper</literal>: högsta intervallvärde"
18844088
1885#. (itstool) path: listitem/para4089#. (itstool) path: listitem/para
1886#: C/index-in.docbook:15304090#: C/index-in.docbook:1530
nn4091msgid ""
1887msgid "<literal>step_increment</literal>: value to increment/decrement when pres4092"<literal>step_increment</literal>: value to increment/decrement when "
>sing mouse button 1" 
4093"pressing mouse button 1"
1888msgstr ""4094msgstr ""
nn4095"<literal>step_increment</literal>: värde att öka/minska med när musknapp 1 "
4096"trycks ned"
18894097
1890#. (itstool) path: listitem/para4098#. (itstool) path: listitem/para
1891#: C/index-in.docbook:15374099#: C/index-in.docbook:1537
nn4100msgid ""
1892msgid "<literal>page_increment</literal>: value to increment/decrement when pres4101"<literal>page_increment</literal>: value to increment/decrement when "
>sing mouse button 2" 
4102"pressing mouse button 2"
1893msgstr ""4103msgstr ""
nn4104"<literal>page_increment</literal>: värde att öka/minska med när musknapp 2 "
4105"trycks ned"
18944106
1895#. (itstool) path: listitem/para4107#. (itstool) path: listitem/para
1896#: C/index-in.docbook:15444108#: C/index-in.docbook:1544
1897msgid "<literal>page_size</literal>: unused"4109msgid "<literal>page_size</literal>: unused"
n1898msgstr ""n4110msgstr "<literal>page_size</literal>: används inte"
18994111
1900#. (itstool) path: section/para4112#. (itstool) path: section/para
1901#: C/index-in.docbook:15064113#: C/index-in.docbook:1506
n1902msgid "<classname>SpinButton</classname>s use an <link linkend=\"chapter-adjustmn4114#, fuzzy
>ent\">Adjustment</link> object to hold information about the range of values. Th 
>ese Adjustment attributes are used by the Spin Button like so: <_:itemizedlist-1 
>/>" 
4115msgid ""
4116"<classname>SpinButton</classname>s use an <link linkend=\"chapter-"
4117"adjustment\">Adjustment</link> object to hold information about the range of "
4118"values. These Adjustment attributes are used by the Spin Button like so: <_:"
4119"itemizedlist-1/>"
1903msgstr ""4120msgstr ""
nn4121"<classname>SpinButton</classname>-rutor använder ett <link linkend=\"chapter-"
4122"adjustment\">Adjustment</link>-objekt för att hålla information om "
4123"värdeintervallet. Dessa Adjustment-attribut används så här av "
4124"stegningsrutan: <_:itemizedlist-1/>"
19044125
1905#. (itstool) path: section/para4126#. (itstool) path: section/para
1906#: C/index-in.docbook:15524127#: C/index-in.docbook:1552
n1907msgid "Additionally, mouse button 3 can be used to jump directly to the <literaln4128msgid ""
>>upper</literal> or <literal>lower</literal> values." 
4129"Additionally, mouse button 3 can be used to jump directly to the "
4130"<literal>upper</literal> or <literal>lower</literal> values."
1908msgstr ""4131msgstr ""
nn4132"Vidare kan musknapp 3 användas för att hoppa direkt till värdena "
4133"<literal>upper</literal> eller <literal>lower</literal>."
19094134
1910#. (itstool) path: section/para4135#. (itstool) path: section/para
1911#: C/index-in.docbook:15574136#: C/index-in.docbook:1557
n1912msgid "The <classname>SpinButton</classname> can create a default <classname>Adjn4137msgid ""
>ustment</classname>, which you can access via the <methodname>get_adjustment()</ 
>methodname> method, or you can specify an existing <classname>Adjustment</classn 
>ame> in the constructor." 
4138"The <classname>SpinButton</classname> can create a default "
4139"<classname>Adjustment</classname>, which you can access via the "
4140"<methodname>get_adjustment()</methodname> method, or you can specify an "
4141"existing <classname>Adjustment</classname> in the constructor."
1913msgstr ""4142msgstr ""
nn4143"<classname>SpinButton</classname> kan skapa en standard-"
4144"<classname>Adjustment</classname> som du kan komma åt genom "
4145"<methodname>get_adjustment()</methodname>-metoden, eller så kan du ange en "
4146"befintlig <classname>Adjustment</classname> i konstruktorn."
19144147
1915#. (itstool) path: section/para4148#. (itstool) path: section/para
1916#: C/index-in.docbook:15684149#: C/index-in.docbook:1568
n1917msgid "The number of decimal places can be altered using the <methodname>set_dign4150msgid ""
>its()</methodname> method." 
4151"The number of decimal places can be altered using the "
4152"<methodname>set_digits()</methodname> method."
1918msgstr ""4153msgstr ""
nn4154"Antalet decimaltecken kan ändras med metoden <methodname>set_digits()</"
4155"methodname>."
19194156
1920#. (itstool) path: section/para4157#. (itstool) path: section/para
1921#: C/index-in.docbook:15734158#: C/index-in.docbook:1573
n1922msgid "You can set the spinbutton's value using the <methodname>set_value()</metn4159msgid ""
>hodname> method, and retrieve it with <methodname>get_value()</methodname>." 
4160"You can set the spinbutton's value using the <methodname>set_value()</"
4161"methodname> method, and retrieve it with <methodname>get_value()</"
4162"methodname>."
1923msgstr ""4163msgstr ""
nn4164"Du kan ställa in stegningsrutans värde med metoden <methodname>set_value()</"
4165"methodname>, och erhålla det med <methodname>get_value()</methodname>."
19244166
1925#. (itstool) path: section/para4167#. (itstool) path: section/para
1926#: C/index-in.docbook:15784168#: C/index-in.docbook:1578
n1927msgid "The <methodname>spin()</methodname> method 'spins' the <classname>SpinButn4169#, fuzzy
>ton</classname>, as if its increment or decrement button had been clicked. You n 
>eed to specify a <classname>Gtk::SpinType</classname> to specify the direction o 
>r new position." 
4170msgid ""
4171"The <methodname>spin()</methodname> method 'spins' the "
4172"<classname>SpinButton</classname>, as if its increment or decrement button "
4173"had been clicked. You need to specify a <classname>Gtk::SpinType</classname> "
4174"to specify the direction or new position."
1928msgstr ""4175msgstr ""
nn4176"Metoden <methodname>spin()</methodname> ”snurrar” vår <classname>SpinButton</"
4177"classname> som om dess knapp för ökning eller minskning har klickats på. Du "
4178"behöver ange en <classname>Gtk::SpinType</classname> för att ange riktningen "
4179"eller ny position."
19294180
1930#. (itstool) path: section/para4181#. (itstool) path: section/para
1931#: C/index-in.docbook:15854182#: C/index-in.docbook:1585
n1932msgid "To prevent the user from typing non-numeric characters into the entry boxn4183msgid ""
>, pass <literal>true</literal> to the <methodname>set_numeric()</methodname> met 
>hod." 
4184"To prevent the user from typing non-numeric characters into the entry box, "
4185"pass <literal>true</literal> to the <methodname>set_numeric()</methodname> "
4186"method."
1933msgstr ""4187msgstr ""
nn4188"För att hindra användaren från att mata in icke-numeriska tecken i "
4189"inmatningsfältet skickar du <literal>true</literal> till metoden "
4190"<methodname>set_numeric()</methodname>."
19344191
1935#. (itstool) path: section/para4192#. (itstool) path: section/para
1936#: C/index-in.docbook:15904193#: C/index-in.docbook:1590
n1937msgid "To make the <classname>SpinButton</classname> 'wrap' between its upper ann4194#, fuzzy
>d lower bounds, use the <methodname>set_wrap()</methodname> method." 
4195msgid ""
4196"To make the <classname>SpinButton</classname> 'wrap' between its upper and "
4197"lower bounds, use the <methodname>set_wrap()</methodname> method."
1938msgstr ""4198msgstr ""
nn4199"För att få <classname>SpinButton</classname> att ”slå runt” mellan sina "
4200"högsta och lägsta gränser, använd metoden <methodname>set_wrap()</"
4201"methodname>."
19394202
1940#. (itstool) path: section/para4203#. (itstool) path: section/para
1941#: C/index-in.docbook:15954204#: C/index-in.docbook:1595
n1942msgid "To force it to snap to the nearest <literal>step_increment</literal>, usen4205#, fuzzy
> <methodname>set_snap_to_ticks()</methodname>." 
4206msgid ""
4207"To force it to snap to the nearest <literal>step_increment</literal>, use "
4208"<methodname>set_snap_to_ticks()</methodname>."
1943msgstr ""4209msgstr ""
nn4210"För att tvinga den att fästa vid närmaste <literal>step_increment</literal>, "
4211"använd <methodname>set_snap_to_ticks()</methodname>."
19444212
1945#. (itstool) path: section/para4213#. (itstool) path: section/para
1946#: C/index-in.docbook:16004214#: C/index-in.docbook:1600
n1947msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4215msgid ""
>1SpinButton.html\">Reference</link>" 
4216"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4217"classGtk_1_1SpinButton.html\">Reference</link>"
1948msgstr ""4218msgstr ""
nn4219"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4220"classGtk_1_1SpinButton.html\">Referens</link>"
19494221
1950#. (itstool) path: section/para4222#. (itstool) path: section/para
1951#: C/index-in.docbook:16074223#: C/index-in.docbook:1607
1952msgid "Here's an example of a <classname>SpinButton</classname> in action:"4224msgid "Here's an example of a <classname>SpinButton</classname> in action:"
1953msgstr ""4225msgstr ""
nn4226"Här är ett exempel på användning av en <classname>SpinButton</classname>:"
19544227
1955#. (itstool) path: imageobject/imagedata4228#. (itstool) path: imageobject/imagedata
1956#. This is a reference to an external file such as an image or video. When4229#. This is a reference to an external file such as an image or video. When
1957#. the file changes, the md5 hash will change to let you know you need to4230#. the file changes, the md5 hash will change to let you know you need to
1958#. update your localized copy. The msgstr is not used at all. Set it to4231#. update your localized copy. The msgstr is not used at all. Set it to
1959#. whatever you like once you have updated your copy of the file.4232#. whatever you like once you have updated your copy of the file.
1960#: C/index-in.docbook:16144233#: C/index-in.docbook:1614
nn4234#, fuzzy
1961msgctxt "_"4235msgctxt "_"
nn4236msgid ""
1962msgid "external ref='figures/spinbutton.png' md5='2157244b231fea5619793aa8ba25d44237"external ref='figures/spinbutton.png' md5='2157244b231fea5619793aa8ba25d4d8'"
>d8'" 
1963msgstr ""4238msgstr ""
nn4239"external ref='figures/spinbutton.png' md5='2157244b231fea5619793aa8ba25d4d8'"
19644240
1965#. (itstool) path: section/para4241#. (itstool) path: section/para
1966#: C/index-in.docbook:16184242#: C/index-in.docbook:1618
n1967msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4243msgid ""
>e/master/examples/book/spinbutton\">Source Code</link>" 
4244"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4245"master/examples/book/spinbutton\">Source Code</link>"
1968msgstr ""4246msgstr ""
nn4247"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4248"master/examples/book/spinbutton\">Källkod</link>"
19694249
1970#. (itstool) path: section/title4250#. (itstool) path: section/title
1971#. (itstool) path: figure/title4251#. (itstool) path: figure/title
n1972#: C/index-in.docbook:1625n4252#: C/index-in.docbook:1625 C/index-in.docbook:1675
1973#: C/index-in.docbook:1675
1974msgid "ProgressBar"4253msgid "ProgressBar"
n1975msgstr ""n4254msgstr "ProgressBar"
19764255
1977#. (itstool) path: section/para4256#. (itstool) path: section/para
1978#: C/index-in.docbook:16274257#: C/index-in.docbook:1627
n1979msgid "Progress bars are used to show the status of an ongoing operation. For inn4258msgid ""
>stance, a <classname>ProgressBar</classname> can show how much of a task has bee 
>n completed." 
4259"Progress bars are used to show the status of an ongoing operation. For "
4260"instance, a <classname>ProgressBar</classname> can show how much of a task "
4261"has been completed."
1980msgstr ""4262msgstr ""
nn4263"Förloppsindikatorer används för att visa status för en pågående operation. "
4264"Exempelvis kan <classname>ProgressBar</classname> visa hur mycket av en "
4265"uppgift som har slutförts."
19814266
1982#. (itstool) path: section/para4267#. (itstool) path: section/para
1983#: C/index-in.docbook:16334268#: C/index-in.docbook:1633
n1984msgid "To change the value shown, use the <methodname>set_fraction()</methodnamen4269#, fuzzy
>> method, passing a <type>double</type> between 0.0 and 1.0 to provide the new f 
>raction." 
4270msgid ""
4271"To change the value shown, use the <methodname>set_fraction()</methodname> "
4272"method, passing a <type>double</type> between 0.0 and 1.0 to provide the new "
4273"fraction."
1985msgstr ""4274msgstr ""
nn4275"För att ändra det visade värdet, använd metoden <methodname>set_fraction()</"
4276"methodname>, och skicka med en <type>double</type> mellan 0.0 och 1.0 för "
4277"att ge den nya bråkdelen."
19864278
1987#. (itstool) path: section/para4279#. (itstool) path: section/para
1988#: C/index-in.docbook:16384280#: C/index-in.docbook:1638
n1989msgid "A <classname>ProgressBar</classname> is horizontal and left-to-right by dn4281msgid ""
>efault, but you can change it to a vertical progress bar by using the <methodnam 
>e>set_orientation()</methodname> method." 
4282"A <classname>ProgressBar</classname> is horizontal and left-to-right by "
4283"default, but you can change it to a vertical progress bar by using the "
4284"<methodname>set_orientation()</methodname> method."
1990msgstr ""4285msgstr ""
nn4286"En <classname>ProgressBar</classname> är som standard horisontell och "
4287"vänster-till-höger, men du kan ändra den till en vertikal förloppsindikator "
4288"genom att använda metoden <methodname>set_orientation()</methodname>."
19914289
1992#. (itstool) path: section/para4290#. (itstool) path: section/para
1993#: C/index-in.docbook:16444291#: C/index-in.docbook:1644
n1994msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4292msgid ""
>1ProgressBar.html\">Reference</link>" 
4293"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4294"classGtk_1_1ProgressBar.html\">Reference</link>"
1995msgstr ""4295msgstr ""
nn4296"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4297"classGtk_1_1ProgressBar.html\">Referens</link>"
19964298
1997#. (itstool) path: section/title4299#. (itstool) path: section/title
1998#: C/index-in.docbook:16474300#: C/index-in.docbook:1647
1999msgid "Activity Mode"4301msgid "Activity Mode"
n2000msgstr ""n4302msgstr "Aktivitetsläge"
20014303
2002#. (itstool) path: section/para4304#. (itstool) path: section/para
2003#: C/index-in.docbook:16494305#: C/index-in.docbook:1649
n2004msgid "Besides indicating the amount of progress that has occurred, the progressn4306#, fuzzy
> bar can also be used to indicate that there is some activity; this is done by p 
>lacing the progress bar in <emphasis>activity mode</emphasis>. In this mode, the 
> progress bar displays a small rectangle which moves back and forth. Activity mo 
>de is useful in situations where the progress of an operation cannot be calculat 
>ed as a value range (e.g., receiving a file of unknown length)." 
4307msgid ""
4308"Besides indicating the amount of progress that has occurred, the progress "
4309"bar can also be used to indicate that there is some activity; this is done "
4310"by placing the progress bar in <emphasis>activity mode</emphasis>. In this "
4311"mode, the progress bar displays a small rectangle which moves back and "
4312"forth. Activity mode is useful in situations where the progress of an "
4313"operation cannot be calculated as a value range (e.g., receiving a file of "
4314"unknown length)."
2005msgstr ""4315msgstr ""
nn4316"Förutom att visa mängden framsteg som har nåtts så kan även "
4317"förloppsindikatorn användas för att visa att aktivitet råder; detta görs "
4318"genom att försätta förloppsindikatorn <emphasis>aktivitetsläge</emphasis>. I "
4319"detta läge visar förloppsindikatorn en liten rektangel som rör sig fram och "
4320"tillbaka. Aktivitetsläge är användbart i situationer när en operations "
4321"förlopp inte kan beräknas som ett värdeintervall (t.ex. vid mottagande av en "
4322"fil av okänd storlek)."
20064323
2007#. (itstool) path: section/para4324#. (itstool) path: section/para
2008#: C/index-in.docbook:16594325#: C/index-in.docbook:1659
n2009msgid "To do this, you need to call the <methodname>pulse()</methodname> method n4326#, fuzzy
>at regular intervals. You can also choose the step size, with the <methodname>se 
>t_pulse_step()</methodname> method." 
4327msgid ""
4328"To do this, you need to call the <methodname>pulse()</methodname> method at "
4329"regular intervals. You can also choose the step size, with the "
4330"<methodname>set_pulse_step()</methodname> method."
2010msgstr ""4331msgstr ""
nn4332"För att göra detta behöver du anropa metoden <methodname>pulse()</"
4333"methodname> med regelbundna intervall. Du kan också välja stegstorleken med "
4334"metoden <methodname>set_pulse_step()</methodname>."
20114335
2012#. (itstool) path: section/para4336#. (itstool) path: section/para
2013#: C/index-in.docbook:16654337#: C/index-in.docbook:1665
n2014msgid "The progress bar can also display a configurable text string next to the n4338#, fuzzy
>bar, using the <methodname>set_text()</methodname> method." 
4339msgid ""
4340"The progress bar can also display a configurable text string next to the "
4341"bar, using the <methodname>set_text()</methodname> method."
2015msgstr ""4342msgstr ""
nn4343"Förloppsindikatorn kan också visa en konfigurerbar textsträng intill "
4344"indikatorn med metoden <methodname>set_text()</methodname>."
20164345
2017#. (itstool) path: imageobject/imagedata4346#. (itstool) path: imageobject/imagedata
2018#. This is a reference to an external file such as an image or video. When4347#. This is a reference to an external file such as an image or video. When
2019#. the file changes, the md5 hash will change to let you know you need to4348#. the file changes, the md5 hash will change to let you know you need to
2020#. update your localized copy. The msgstr is not used at all. Set it to4349#. update your localized copy. The msgstr is not used at all. Set it to
2021#. whatever you like once you have updated your copy of the file.4350#. whatever you like once you have updated your copy of the file.
2022#: C/index-in.docbook:16774351#: C/index-in.docbook:1677
nn4352#, fuzzy
2023msgctxt "_"4353msgctxt "_"
nn4354msgid ""
2024msgid "external ref='figures/progressbar.png' md5='c7dcbf44476378ef1d0c601f619c74355"external ref='figures/progressbar.png' md5='c7dcbf44476378ef1d0c601f619c7918'"
>918'" 
2025msgstr ""4356msgstr ""
nn4357"external ref='figures/progressbar.png' md5='c7dcbf44476378ef1d0c601f619c7918'"
20264358
2027#. (itstool) path: section/para4359#. (itstool) path: section/para
2028#: C/index-in.docbook:16814360#: C/index-in.docbook:1681
n2029msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4361msgid ""
>e/master/examples/book/progressbar\">Source Code</link>" 
4362"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4363"master/examples/book/progressbar\">Source Code</link>"
2030msgstr ""4364msgstr ""
nn4365"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4366"master/examples/book/progressbar\">Källkod</link>"
20314367
2032#. (itstool) path: section/title4368#. (itstool) path: section/title
2033#. (itstool) path: figure/title4369#. (itstool) path: figure/title
n2034#: C/index-in.docbook:1687n4370#: C/index-in.docbook:1687 C/index-in.docbook:1702
2035#: C/index-in.docbook:1702
2036msgid "InfoBar"4371msgid "InfoBar"
n2037msgstr ""n4372msgstr "InfoBar"
20384373
2039#. (itstool) path: section/para4374#. (itstool) path: section/para
2040#: C/index-in.docbook:16894375#: C/index-in.docbook:1689
n2041msgid "An <classname>InfoBar</classname> may show small items of information or n4376msgid ""
>ask brief questions. Unlike a <classname>Dialog</classname>, it appears at the t 
>op of the current window instead of opening a new window. Its API is very simila 
>r to the <link linkend=\"chapter-dialogs\">Gtk::Dialog</link> API." 
4377"An <classname>InfoBar</classname> may show small items of information or ask "
4378"brief questions. Unlike a <classname>Dialog</classname>, it appears at the "
4379"top of the current window instead of opening a new window. Its API is very "
4380"similar to the <link linkend=\"chapter-dialogs\">Gtk::Dialog</link> API."
2042msgstr ""4381msgstr ""
nn4382"En <classname>InfoBar</classname> kan visa små informationsobjekt eller "
4383"fråga korta frågor. Till skillnad från en <classname>Dialog</classname> "
4384"dyker den upp högst upp i det aktuella fönstret i stället för att öppna ett "
4385"nytt fönster. Dess API är väldigt likt API:t för <link linkend=\"chapter-"
4386"dialogs\">Gtk::Dialog</link>."
20434387
2044#. (itstool) path: section/para4388#. (itstool) path: section/para
2045#: C/index-in.docbook:16924389#: C/index-in.docbook:1692
n2046msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4390msgid ""
>1InfoBar.html\">Reference</link>" 
4391"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4392"classGtk_1_1InfoBar.html\">Reference</link>"
2047msgstr ""4393msgstr ""
nn4394"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4395"classGtk_1_1InfoBar.html\">Referens</link>"
20484396
2049#. (itstool) path: section/para4397#. (itstool) path: section/para
2050#: C/index-in.docbook:16974398#: C/index-in.docbook:1697
n2051msgid "The <classname>InfoBar</classname> widget is deprecated since <application4399msgid ""
>n>gtkmm</application> 4.10. The example shows an info bar consisting of a <class 
>name>Box</classname> with a <classname>Label</classname> and a <classname>Button 
></classname>." 
4400"The <classname>InfoBar</classname> widget is deprecated since "
4401"<application>gtkmm</application> 4.10. The example shows an info bar "
4402"consisting of a <classname>Box</classname> with a <classname>Label</"
4403"classname> and a <classname>Button</classname>."
2052msgstr ""4404msgstr ""
nn4405"<classname>InfoBar</classname>-komponenten är föråldrad sedan "
4406"<application>gtkmm</application> 4.10. Exemplen visar en inforad som består "
4407"av en <classname>Box</classname> med en <classname>Label</classname> och en "
4408"<classname>Button</classname>."
20534409
2054#. (itstool) path: imageobject/imagedata4410#. (itstool) path: imageobject/imagedata
2055#. This is a reference to an external file such as an image or video. When4411#. This is a reference to an external file such as an image or video. When
2056#. the file changes, the md5 hash will change to let you know you need to4412#. the file changes, the md5 hash will change to let you know you need to
2057#. update your localized copy. The msgstr is not used at all. Set it to4413#. update your localized copy. The msgstr is not used at all. Set it to
2058#. whatever you like once you have updated your copy of the file.4414#. whatever you like once you have updated your copy of the file.
2059#: C/index-in.docbook:17044415#: C/index-in.docbook:1704
nn4416#, fuzzy
2060msgctxt "_"4417msgctxt "_"
nn4418msgid ""
2061msgid "external ref='figures/infobar.png' md5='4da1d3d7d3011221c3a1d896436b1931'4419"external ref='figures/infobar.png' md5='4da1d3d7d3011221c3a1d896436b1931'"
>" 
2062msgstr ""4420msgstr ""
nn4421"external ref='figures/infobar.png' md5='cce31c49b5d951433103d2ab9a752477'"
20634422
2064#. (itstool) path: section/para4423#. (itstool) path: section/para
2065#: C/index-in.docbook:17084424#: C/index-in.docbook:1708
n2066msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4425msgid ""
>e/master/examples/book/infobar\">Source Code</link>" 
4426"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4427"master/examples/book/infobar\">Source Code</link>"
2067msgstr ""4428msgstr ""
nn4429"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4430"master/examples/book/infobar\">Källkod</link>"
20684431
2069#. (itstool) path: section/title4432#. (itstool) path: section/title
2070#: C/index-in.docbook:17154433#: C/index-in.docbook:1715
2071msgid "Tooltips"4434msgid "Tooltips"
n2072msgstr ""n4435msgstr "Inforutor"
20734436
2074#. (itstool) path: section/para4437#. (itstool) path: section/para
2075#: C/index-in.docbook:17174438#: C/index-in.docbook:1717
n2076msgid "Tooltips are the little information windows that pop up when you leave yon4439msgid ""
>ur pointer over a widget for a few seconds. Use <methodname>set_tooltip_text()</ 
>methodname> to set a text string as a tooltip on any <classname>Widget</classnam 
>e>. <classname>Gtk::Tooltip</classname> is used for more advanced tooltip usage, 
> such as showing an image as well as text." 
4440"Tooltips are the little information windows that pop up when you leave your "
4441"pointer over a widget for a few seconds. Use <methodname>set_tooltip_text()</"
4442"methodname> to set a text string as a tooltip on any <classname>Widget</"
4443"classname>. <classname>Gtk::Tooltip</classname> is used for more advanced "
4444"tooltip usage, such as showing an image as well as text."
2077msgstr ""4445msgstr ""
nn4446"Inforutor är de små informationsfönster som poppar upp när du lämnar pekaren "
4447"över en komponent i några sekunder. Använd <methodname>set_tooltip_text()</"
4448"methodname> för att ställa in en textsträng som en inforuta på en "
4449"<classname>Widget</classname>. <classname>Gtk::Tooltip</classname> används "
4450"för mer avancerad inforuteanvändning, som att visa en bild såväl som text."
20784451
2079#. (itstool) path: section/para4452#. (itstool) path: section/para
2080#: C/index-in.docbook:17264453#: C/index-in.docbook:1726
n2081msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4454msgid ""
>1Widget.html\">Widget Reference</link>" 
4455"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4456"classGtk_1_1Widget.html\">Widget Reference</link>"
2082msgstr ""4457msgstr ""
nn4458"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4459"classGtk_1_1Widget.html\">Widget-referens</link>"
20834460
2084#. (itstool) path: section/para4461#. (itstool) path: section/para
2085#: C/index-in.docbook:17274462#: C/index-in.docbook:1727
n2086msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4463msgid ""
>1Tooltip.html\">Tooltip Reference</link>" 
4464"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4465"classGtk_1_1Tooltip.html\">Tooltip Reference</link>"
2087msgstr ""4466msgstr ""
nn4467"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4468"classGtk_1_1Tooltip.html\">Tooltip-referens</link>"
20884469
2089#. (itstool) path: figure/title4470#. (itstool) path: figure/title
2090#: C/index-in.docbook:17334471#: C/index-in.docbook:1733
nn4472#, fuzzy
2091msgid "Tooltip"4473msgid "Tooltip"
n2092msgstr ""n4474msgstr "Tooltip"
20934475
2094#. (itstool) path: imageobject/imagedata4476#. (itstool) path: imageobject/imagedata
2095#. This is a reference to an external file such as an image or video. When4477#. This is a reference to an external file such as an image or video. When
2096#. the file changes, the md5 hash will change to let you know you need to4478#. the file changes, the md5 hash will change to let you know you need to
2097#. update your localized copy. The msgstr is not used at all. Set it to4479#. update your localized copy. The msgstr is not used at all. Set it to
2098#. whatever you like once you have updated your copy of the file.4480#. whatever you like once you have updated your copy of the file.
2099#: C/index-in.docbook:17354481#: C/index-in.docbook:1735
nn4482#, fuzzy
2100msgctxt "_"4483msgctxt "_"
nn4484msgid ""
2101msgid "external ref='figures/tooltip.png' md5='85a18bdc5b7301f2d4d4a1886176a38c'4485"external ref='figures/tooltip.png' md5='85a18bdc5b7301f2d4d4a1886176a38c'"
>" 
2102msgstr ""4486msgstr ""
nn4487"external ref='figures/tooltip.png' md5='85a18bdc5b7301f2d4d4a1886176a38c'"
21034488
2104#. (itstool) path: section/para4489#. (itstool) path: section/para
2105#: C/index-in.docbook:17394490#: C/index-in.docbook:1739
n2106msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4491msgid ""
>e/master/examples/book/tooltips\">Source Code</link>" 
4492"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4493"master/examples/book/tooltips\">Source Code</link>"
2107msgstr ""4494msgstr ""
nn4495"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4496"master/examples/book/tooltips\">Källkod</link>"
21084497
2109#. (itstool) path: chapter/title4498#. (itstool) path: chapter/title
2110#: C/index-in.docbook:17464499#: C/index-in.docbook:1746
2111msgid "Container Widgets"4500msgid "Container Widgets"
n2112msgstr ""n4501msgstr "Behållarkomponenter"
21134502
2114#. (itstool) path: chapter/para4503#. (itstool) path: chapter/para
2115#: C/index-in.docbook:17484504#: C/index-in.docbook:1748
n2116msgid "Container widgets, like other widgets, derive from <classname>Gtk::Widgetn4505msgid ""
></classname>. Some container widgets, such as <classname>Gtk::Grid</classname> c 
>an hold many child widgets, so these typically have more complex interfaces. Oth 
>ers, such as <classname>Gtk::Frame</classname> contain only one child widget." 
4506"Container widgets, like other widgets, derive from <classname>Gtk::Widget</"
4507"classname>. Some container widgets, such as <classname>Gtk::Grid</classname> "
4508"can hold many child widgets, so these typically have more complex "
4509"interfaces. Others, such as <classname>Gtk::Frame</classname> contain only "
4510"one child widget."
2117msgstr ""4511msgstr ""
nn4512"Behållarkomponenter härleds som andra komponenter från <classname>Gtk::"
4513"Widget</classname>. Vissa behållarkomponenter, som <classname>Gtk::Grid</"
4514"classname> kan innehålla många underordnade komponenter, så de har vanligen "
4515"mer komplexa gränssnitt. Andra, som <classname>Gtk::Frame</classname> "
4516"innehåller bara en underordnad komponent."
21184517
2119#. (itstool) path: section/title4518#. (itstool) path: section/title
2120#: C/index-in.docbook:17564519#: C/index-in.docbook:1756
2121msgid "Single-item Containers"4520msgid "Single-item Containers"
n2122msgstr ""n4521msgstr "Enobjektsbehållare"
21234522
2124#. (itstool) path: section/para4523#. (itstool) path: section/para
2125#: C/index-in.docbook:17584524#: C/index-in.docbook:1758
n2126msgid "Most single-item container widgets have <methodname>set_child()</methodnan4525msgid ""
>me> and <methodname>unset_child()</methodname> methods for the child widget. <cl 
>assname>Gtk::Button</classname> and <classname>Gtk::Window</classname> are techn 
>ically single-item containers, but we have discussed them already elsewhere." 
4526"Most single-item container widgets have <methodname>set_child()</methodname> "
4527"and <methodname>unset_child()</methodname> methods for the child widget. "
4528"<classname>Gtk::Button</classname> and <classname>Gtk::Window</classname> "
4529"are technically single-item containers, but we have discussed them already "
4530"elsewhere."
2127msgstr ""4531msgstr ""
nn4532"De flesta behållarkomponenter för ett objekt har metoderna "
4533"<methodname>set_child()</methodname> och <methodname>unset_child()</"
4534"methodname> för den underordnade komponenten. <classname>Gtk::Button</"
4535"classname> och <classname>Gtk::Window</classname> är tekniskt sett "
4536"enobjektsbehållare, men vi har redan diskuterat dem på annat håll."
21284537
2129#. (itstool) path: section/para4538#. (itstool) path: section/para
2130#: C/index-in.docbook:17654539#: C/index-in.docbook:1765
n2131msgid "We also discuss the <classname>Gtk::Paned</classname> widget, which allown4540msgid ""
>s you to divide a window into two separate \"panes\". This widget actually conta 
>ins two child widgets, but the number is fixed so it seems appropriate." 
4541"We also discuss the <classname>Gtk::Paned</classname> widget, which allows "
4542"you to divide a window into two separate \"panes\". This widget actually "
4543"contains two child widgets, but the number is fixed so it seems appropriate."
2132msgstr ""4544msgstr ""
nn4545"Vi kommer också diskutera komponenten <classname>Gtk::Paned</classname> som "
4546"låter dig dela ett fönster i två separata ”paneler”. Denna komponent kommer "
4547"faktiskt innehålla två underordnade komponenter, men antalet är fast så det "
4548"verkar lämpligt."
21334549
2134#. (itstool) path: section/title4550#. (itstool) path: section/title
2135#. (itstool) path: figure/title4551#. (itstool) path: figure/title
n2136#: C/index-in.docbook:1772n4552#: C/index-in.docbook:1772 C/index-in.docbook:1787
2137#: C/index-in.docbook:17874553#, fuzzy
2138msgid "Frame"4554msgid "Frame"
n2139msgstr ""n4555msgstr "Frame"
21404556
2141#. (itstool) path: section/para4557#. (itstool) path: section/para
2142#: C/index-in.docbook:17744558#: C/index-in.docbook:1774
n2143msgid "Frames can enclose one or a group of widgets within a box, optionally witn4559#, fuzzy
>h a title. For instance, you might place a group of <classname>ToggleButton</cla 
>ssname>s or <classname>CheckButton</classname>s in a <classname>Frame</classname 
>>." 
4560msgid ""
4561"Frames can enclose one or a group of widgets within a box, optionally with a "
4562"title. For instance, you might place a group of <classname>ToggleButton</"
4563"classname>s or <classname>CheckButton</classname>s in a <classname>Frame</"
4564"classname>."
2144msgstr ""4565msgstr ""
nn4566"Ramar kan omsluta en eller en grupp av komponenter i en ruta, valfritt med "
4567"en titel. Exempelvis kan du placera en grupp med <classname>ToggleButton</"
4568"classname> eller <classname>CheckButton</classname> i en <classname>Frame</"
4569"classname>."
21454570
2146#. (itstool) path: section/para4571#. (itstool) path: section/para
2147#: C/index-in.docbook:17814572#: C/index-in.docbook:1781
n2148msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4573msgid ""
>1Frame.html\">Reference</link>" 
4574"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4575"classGtk_1_1Frame.html\">Reference</link>"
2149msgstr ""4576msgstr ""
nn4577"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4578"classGtk_1_1Frame.html\">Referens</link>"
21504579
2151#. (itstool) path: imageobject/imagedata4580#. (itstool) path: imageobject/imagedata
2152#. This is a reference to an external file such as an image or video. When4581#. This is a reference to an external file such as an image or video. When
2153#. the file changes, the md5 hash will change to let you know you need to4582#. the file changes, the md5 hash will change to let you know you need to
2154#. update your localized copy. The msgstr is not used at all. Set it to4583#. update your localized copy. The msgstr is not used at all. Set it to
2155#. whatever you like once you have updated your copy of the file.4584#. whatever you like once you have updated your copy of the file.
2156#: C/index-in.docbook:17894585#: C/index-in.docbook:1789
nn4586#, fuzzy
2157msgctxt "_"4587msgctxt "_"
2158msgid "external ref='figures/frame.png' md5='e7b49b5f57afa5c0d4c487c187f1be55'"4588msgid "external ref='figures/frame.png' md5='e7b49b5f57afa5c0d4c487c187f1be55'"
2159msgstr ""4589msgstr ""
nn4590"external ref='figures/frame.png' md5='e7b49b5f57afa5c0d4c487c187f1be55'"
21604591
2161#. (itstool) path: section/para4592#. (itstool) path: section/para
2162#: C/index-in.docbook:17934593#: C/index-in.docbook:1793
n2163msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4594msgid ""
>e/master/examples/book/frame\">Source Code</link>" 
4595"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4596"master/examples/book/frame\">Source Code</link>"
2164msgstr ""4597msgstr ""
nn4598"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4599"master/examples/book/frame\">Källkod</link>"
21654600
2166#. (itstool) path: section/title4601#. (itstool) path: section/title
2167#. (itstool) path: figure/title4602#. (itstool) path: figure/title
n2168#: C/index-in.docbook:1799n4603#: C/index-in.docbook:1799 C/index-in.docbook:1826
2169#: C/index-in.docbook:1826
2170msgid "Paned"4604msgid "Paned"
n2171msgstr ""n4605msgstr "Paned"
21724606
2173#. (itstool) path: section/para4607#. (itstool) path: section/para
2174#: C/index-in.docbook:18014608#: C/index-in.docbook:1801
n2175msgid "Panes divide a widget into two halves, separated by a moveable divider. Tn4609msgid ""
>he two halves (panes) can be oriented either horizontally (side by side) or vert 
>ically (one above the other)." 
4610"Panes divide a widget into two halves, separated by a moveable divider. The "
4611"two halves (panes) can be oriented either horizontally (side by side) or "
4612"vertically (one above the other)."
2176msgstr ""4613msgstr ""
nn4614"Paneler delar en komponent i två halvor, separerade av en flyttbar "
4615"avskiljare. De två halvorna (panelerna) kan orienteras antingen horisontellt "
4616"(sida vid sida) eller vertikalt (en ovanpå den andra)."
21774617
2178#. (itstool) path: section/para4618#. (itstool) path: section/para
2179#: C/index-in.docbook:18074619#: C/index-in.docbook:1807
n2180msgid "Unlike the other widgets in this section, pane widgets contain not one bun4620msgid ""
>t two child widgets, one in each pane. Therefore, you should use <methodname>set 
>_start_child()</methodname> and <methodname>set_end_child()</methodname> instead 
> of a <methodname>set_child()</methodname> method." 
4621"Unlike the other widgets in this section, pane widgets contain not one but "
4622"two child widgets, one in each pane. Therefore, you should use "
4623"<methodname>set_start_child()</methodname> and <methodname>set_end_child()</"
4624"methodname> instead of a <methodname>set_child()</methodname> method."
2181msgstr ""4625msgstr ""
nn4626"Till skillnad från de andra komponenterna i detta avsnitt innehåller "
4627"panelkomponenter inte en utan två underordnade komponenter, en i varje "
4628"panel. Du ska därför använda <methodname>set_start_child()</methodname> och "
4629"<methodname>set_end_child()</methodname> i stället för en "
4630"<methodname>set_child()</methodname>-metod."
21824631
2183#. (itstool) path: section/para4632#. (itstool) path: section/para
2184#: C/index-in.docbook:18144633#: C/index-in.docbook:1814
n2185msgid "You can adjust the position of the divider using the <methodname>set_posin4634msgid ""
>tion()</methodname> method, and you will probably need to do so." 
4635"You can adjust the position of the divider using the "
4636"<methodname>set_position()</methodname> method, and you will probably need "
4637"to do so."
2186msgstr ""4638msgstr ""
nn4639"Du kan justera avskiljarens position genom att använda metoden "
4640"<methodname>set_position()</methodname>, och kommer troligen behöva göra det."
21874641
2188#. (itstool) path: section/para4642#. (itstool) path: section/para
2189#: C/index-in.docbook:18204643#: C/index-in.docbook:1820
n2190msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4644msgid ""
>1Paned.html\">Reference</link>" 
4645"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4646"classGtk_1_1Paned.html\">Reference</link>"
2191msgstr ""4647msgstr ""
nn4648"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4649"classGtk_1_1Paned.html\">Referens</link>"
21924650
2193#. (itstool) path: imageobject/imagedata4651#. (itstool) path: imageobject/imagedata
2194#. This is a reference to an external file such as an image or video. When4652#. This is a reference to an external file such as an image or video. When
2195#. the file changes, the md5 hash will change to let you know you need to4653#. the file changes, the md5 hash will change to let you know you need to
2196#. update your localized copy. The msgstr is not used at all. Set it to4654#. update your localized copy. The msgstr is not used at all. Set it to
2197#. whatever you like once you have updated your copy of the file.4655#. whatever you like once you have updated your copy of the file.
2198#: C/index-in.docbook:18284656#: C/index-in.docbook:1828
nn4657#, fuzzy
2199msgctxt "_"4658msgctxt "_"
2200msgid "external ref='figures/paned.png' md5='874e9d11227d6d10d2ab7cb0b04de32d'"4659msgid "external ref='figures/paned.png' md5='874e9d11227d6d10d2ab7cb0b04de32d'"
2201msgstr ""4660msgstr ""
nn4661"external ref='figures/paned.png' md5='874e9d11227d6d10d2ab7cb0b04de32d'"
22024662
2203#. (itstool) path: section/para4663#. (itstool) path: section/para
2204#: C/index-in.docbook:18324664#: C/index-in.docbook:1832
n2205msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4665msgid ""
>e/master/examples/book/paned\">Source Code</link>" 
4666"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4667"master/examples/book/paned\">Source Code</link>"
2206msgstr ""4668msgstr ""
nn4669"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4670"master/examples/book/paned\">Källkod</link>"
22074671
2208#. (itstool) path: section/title4672#. (itstool) path: section/title
2209#. (itstool) path: figure/title4673#. (itstool) path: figure/title
n2210#: C/index-in.docbook:1838n4674#: C/index-in.docbook:1838 C/index-in.docbook:1871
2211#: C/index-in.docbook:1871
2212msgid "ScrolledWindow"4675msgid "ScrolledWindow"
n2213msgstr ""n4676msgstr "ScrolledWindow"
22144677
2215#. (itstool) path: section/para4678#. (itstool) path: section/para
2216#: C/index-in.docbook:18404679#: C/index-in.docbook:1840
n2217msgid "<classname>ScrolledWindow</classname> widgets create a scrollable area. Yn4680msgid ""
>ou can insert any type of widget into a <classname>ScrolledWindow</classname>, a 
>nd it will be accessible regardless of its size by using the scrollbars. Note th 
>at <classname>ScrolledWindow</classname> is not a <classname>Gtk::Window</classn 
>ame> despite the slightly misleading name." 
4681"<classname>ScrolledWindow</classname> widgets create a scrollable area. You "
4682"can insert any type of widget into a <classname>ScrolledWindow</classname>, "
4683"and it will be accessible regardless of its size by using the scrollbars. "
4684"Note that <classname>ScrolledWindow</classname> is not a <classname>Gtk::"
4685"Window</classname> despite the slightly misleading name."
2218msgstr ""4686msgstr ""
nn4687"<classname>ScrolledWindow</classname>-komponenter skapar ett rullningsbart "
4688"område. Du kan infoga en komponent av valfri typ i ett "
4689"<classname>ScrolledWindow</classname>, så kommer den vara åtkomlig oavsett "
4690"dess storlek genom att använda rullningslisterna. Observera att "
4691"<classname>ScrolledWindow</classname> inte är ett <classname>Gtk::Window</"
4692"classname> trots det något missvisande namnet."
22194693
2220#. (itstool) path: section/para4694#. (itstool) path: section/para
2221#: C/index-in.docbook:18494695#: C/index-in.docbook:1849
n2222msgid "Scrolled windows have <emphasis>scrollbar policies</emphasis> which detern4696#, fuzzy
>mine whether the <classname>Scrollbar</classname>s will be displayed. The polici 
>es can be set with the <methodname>set_policy()</methodname> method. The policy  
>may be for instance <literal>Gtk::PolicyType::AUTOMATIC</literal> or <literal>Gt 
>k::PolicyType::ALWAYS</literal>. <literal>Gtk::PolicyType::AUTOMATIC</literal> w 
>ill cause the scrolled window to display the scrollbar only if the contained wid 
>get is larger than the visible area. <literal>Gtk::PolicyType::ALWAYS</literal>  
>will cause the scrollbar to be displayed always." 
4697msgid ""
4698"Scrolled windows have <emphasis>scrollbar policies</emphasis> which "
4699"determine whether the <classname>Scrollbar</classname>s will be displayed. "
4700"The policies can be set with the <methodname>set_policy()</methodname> "
4701"method. The policy may be for instance <literal>Gtk::PolicyType::AUTOMATIC</"
4702"literal> or <literal>Gtk::PolicyType::ALWAYS</literal>. <literal>Gtk::"
4703"PolicyType::AUTOMATIC</literal> will cause the scrolled window to display "
4704"the scrollbar only if the contained widget is larger than the visible area. "
4705"<literal>Gtk::PolicyType::ALWAYS</literal> will cause the scrollbar to be "
4706"displayed always."
2223msgstr ""4707msgstr ""
nn4708"Rullade fönster har <emphasis>rullningslistpolicyer</emphasis> som avgör "
4709"huruvida <classname>Scrollbar</classname>-listerna kommer visas. Policyerna "
4710"kan ställas in med metoden <methodname>set_policy()</methodname>. Policyn "
4711"kan exempelvis vara <literal>Gtk::PolicyType::AUTOMATIC</literal> eller "
4712"<literal>Gtk::PolicyType::ALWAYS</literal>. <literal>Gtk::PolicyType::"
4713"AUTOMATIC</literal> kommer få det rullade fönstret att visa rullningslisten "
4714"endast om den innehållna komponenten är större än det synliga området. "
4715"<literal>Gtk::PolicyType::ALWAYS</literal> kommer få rullningslisten att "
4716"alltid visas."
22244717
2225#. (itstool) path: section/para4718#. (itstool) path: section/para
2226#: C/index-in.docbook:18614719#: C/index-in.docbook:1861
n2227msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4720msgid ""
>1ScrolledWindow.html\">Reference</link>" 
4721"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4722"classGtk_1_1ScrolledWindow.html\">Reference</link>"
2228msgstr ""4723msgstr ""
nn4724"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4725"classGtk_1_1ScrolledWindow.html\">Referens</link>"
22294726
2230#. (itstool) path: section/para4727#. (itstool) path: section/para
2231#: C/index-in.docbook:18664728#: C/index-in.docbook:1866
n2232msgid "Here is a simple example that packs 100 toggle buttons into a ScrolledWinn4729msgid ""
>dow. Try resizing the window to see the scrollbars react." 
4730"Here is a simple example that packs 100 toggle buttons into a "
4731"ScrolledWindow. Try resizing the window to see the scrollbars react."
2233msgstr ""4732msgstr ""
nn4733"Här är ett enkelt exempel som packar 100 växlingsknappar i ett "
4734"ScrolledWindow. Försök ändra storlek på fönstret för att se hur "
4735"rullningslisterna reagerar."
22344736
2235#. (itstool) path: imageobject/imagedata4737#. (itstool) path: imageobject/imagedata
2236#. This is a reference to an external file such as an image or video. When4738#. This is a reference to an external file such as an image or video. When
2237#. the file changes, the md5 hash will change to let you know you need to4739#. the file changes, the md5 hash will change to let you know you need to
2238#. update your localized copy. The msgstr is not used at all. Set it to4740#. update your localized copy. The msgstr is not used at all. Set it to
2239#. whatever you like once you have updated your copy of the file.4741#. whatever you like once you have updated your copy of the file.
2240#: C/index-in.docbook:18734742#: C/index-in.docbook:1873
nn4743#, fuzzy
2241msgctxt "_"4744msgctxt "_"
n2242msgid "external ref='figures/scrolledwindow.png' md5='b99f195d17b39197af733087e0n4745msgid ""
>e69def'" 
4746"external ref='figures/scrolledwindow.png' "
4747"md5='b99f195d17b39197af733087e0e69def'"
2243msgstr ""4748msgstr ""
nn4749"external ref='figures/scrolledwindow.png' "
4750"md5='b99f195d17b39197af733087e0e69def'"
22444751
2245#. (itstool) path: section/para4752#. (itstool) path: section/para
2246#: C/index-in.docbook:18774753#: C/index-in.docbook:1877
n2247msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4754msgid ""
>e/master/examples/book/scrolledwindow\">Source Code</link>" 
4755"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4756"master/examples/book/scrolledwindow\">Source Code</link>"
2248msgstr ""4757msgstr ""
nn4758"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4759"master/examples/book/scrolledwindow\">Källkod</link>"
22494760
2250#. (itstool) path: section/title4761#. (itstool) path: section/title
2251#. (itstool) path: figure/title4762#. (itstool) path: figure/title
n2252#: C/index-in.docbook:1883n4763#: C/index-in.docbook:1883 C/index-in.docbook:1906
2253#: C/index-in.docbook:1906
2254msgid "AspectFrame"4764msgid "AspectFrame"
n2255msgstr ""n4765msgstr "AspectFrame"
22564766
2257#. (itstool) path: section/para4767#. (itstool) path: section/para
2258#: C/index-in.docbook:18854768#: C/index-in.docbook:1885
n2259msgid "The <classname>AspectFrame</classname> widget looks like a <classname>Fran4769msgid ""
>me</classname> widget, but it also enforces the <emphasis>aspect ratio</emphasis 
>> (the ratio of the width to the height) of the child widget, adding extra space 
> if necessary. For instance, this would allow you to display a photograph withou 
>t allowing the user to distort it horizontally or vertically while resizing." 
4770"The <classname>AspectFrame</classname> widget looks like a <classname>Frame</"
4771"classname> widget, but it also enforces the <emphasis>aspect ratio</"
4772"emphasis> (the ratio of the width to the height) of the child widget, adding "
4773"extra space if necessary. For instance, this would allow you to display a "
4774"photograph without allowing the user to distort it horizontally or "
4775"vertically while resizing."
2260msgstr ""4776msgstr ""
nn4777"<classname>AspectFrame</classname>-komponenten ser ut som en "
4778"<classname>Frame</classname>-komponent, men den upprätthåller även "
4779"<emphasis>bildförhållandet</emphasis> (kvoten mellan bredden och höjden) för "
4780"den underordnade komponenten, och lägger till extra utrymme om nödvändigt. "
4781"Exempelvis skulle detta låta dig visa ett foto utan att användaren kan "
4782"förvränga det horisontellt eller vertikalt då storleken ändras."
22614783
2262#. (itstool) path: section/para4784#. (itstool) path: section/para
2263#: C/index-in.docbook:18944785#: C/index-in.docbook:1894
n2264msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n4786msgid ""
>1AspectFrame.html\">Reference</link>" 
4787"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4788"classGtk_1_1AspectFrame.html\">Reference</link>"
2265msgstr ""4789msgstr ""
nn4790"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
4791"classGtk_1_1AspectFrame.html\">Referens</link>"
22664792
2267#. (itstool) path: section/para4793#. (itstool) path: section/para
2268#: C/index-in.docbook:18994794#: C/index-in.docbook:1899
n2269msgid "The following program uses a <classname>Gtk::AspectFrame</classname> to pn4795msgid ""
>resent a drawing area whose aspect ratio will always be 2:1, no matter how the u 
>ser resizes the top-level window." 
4796"The following program uses a <classname>Gtk::AspectFrame</classname> to "
4797"present a drawing area whose aspect ratio will always be 2:1, no matter how "
4798"the user resizes the top-level window."
2270msgstr ""4799msgstr ""
nn4800"Följande program använder en <classname>Gtk::AspectFrame</classname> för att "
4801"presentera en rityta vars bildförhållande alltid kommer vara 2:1, oavsett "
4802"hur användaren ändrar storleken på toppnivåfönstret."
22714803
2272#. (itstool) path: imageobject/imagedata4804#. (itstool) path: imageobject/imagedata
2273#. This is a reference to an external file such as an image or video. When4805#. This is a reference to an external file such as an image or video. When
2274#. the file changes, the md5 hash will change to let you know you need to4806#. the file changes, the md5 hash will change to let you know you need to
2275#. update your localized copy. The msgstr is not used at all. Set it to4807#. update your localized copy. The msgstr is not used at all. Set it to
2276#. whatever you like once you have updated your copy of the file.4808#. whatever you like once you have updated your copy of the file.
2277#: C/index-in.docbook:19084809#: C/index-in.docbook:1908
nn4810#, fuzzy
2278msgctxt "_"4811msgctxt "_"
nn4812msgid ""
2279msgid "external ref='figures/aspectframe.png' md5='9d8aac9521789ed27036a97a22fed4813"external ref='figures/aspectframe.png' md5='9d8aac9521789ed27036a97a22fedece'"
>ece'" 
2280msgstr ""4814msgstr ""
nn4815"external ref='figures/aspectframe.png' md5='9d8aac9521789ed27036a97a22fedece'"
22814816
2282#. (itstool) path: section/para4817#. (itstool) path: section/para
2283#: C/index-in.docbook:19124818#: C/index-in.docbook:1912
n2284msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4819msgid ""
>e/master/examples/book/aspectframe\">Source Code</link>" 
4820"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4821"master/examples/book/aspectframe\">Source Code</link>"
2285msgstr ""4822msgstr ""
nn4823"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4824"master/examples/book/aspectframe\">Källkod</link>"
22864825
2287#. (itstool) path: section/title4826#. (itstool) path: section/title
2288#: C/index-in.docbook:19184827#: C/index-in.docbook:1918
2289msgid "Other Single-item Containers"4828msgid "Other Single-item Containers"
n2290msgstr ""n4829msgstr "Andra enobjektsbehållare"
22914830
2292#. (itstool) path: section/para4831#. (itstool) path: section/para
2293#: C/index-in.docbook:19204832#: C/index-in.docbook:1920
n2294msgid "There are other single-item containers. See the reference documentation fn4833msgid ""
>or a complete list. Here are links to some example programs that show containers 
>, which are not mentioned elsewhere in this tutorial." 
4834"There are other single-item containers. See the reference documentation for "
4835"a complete list. Here are links to some example programs that show "
4836"containers, which are not mentioned elsewhere in this tutorial."
2295msgstr ""4837msgstr ""
nn4838"Det finns andra enobjektsbehållare. Se referensdokumentationen för en "
4839"fullständig lista. Här är länkar till några exempelprogram som visar "
4840"behållare som inte nämns någon annanstans i denna handledning."
22964841
2297#. (itstool) path: section/para4842#. (itstool) path: section/para
2298#: C/index-in.docbook:19264843#: C/index-in.docbook:1926
n2299msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4844msgid ""
>e/master/examples/book/expander\">Source Code, Expander</link>" 
4845"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4846"master/examples/book/expander\">Source Code, Expander</link>"
2300msgstr ""4847msgstr ""
nn4848"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4849"master/examples/book/expander\">Källkod, Expander</link>"
23014850
2302#. (itstool) path: section/para4851#. (itstool) path: section/para
2303#: C/index-in.docbook:19274852#: C/index-in.docbook:1927
n2304msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren4853msgid ""
>e/master/examples/book/popover\">Source Code, Popover</link>" 
4854"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4855"master/examples/book/popover\">Source Code, Popover</link>"
2305msgstr ""4856msgstr ""
nn4857"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
4858"master/examples/book/popover\">Källkod, Popover</link>"
23064859
2307#. (itstool) path: section/title4860#. (itstool) path: section/title
2308#: C/index-in.docbook:19344861#: C/index-in.docbook:1934
2309msgid "Multiple-item Containers"4862msgid "Multiple-item Containers"
n2310msgstr ""n4863msgstr "Flerobjektsbehållare"
23114864
2312#. (itstool) path: section/para4865#. (itstool) path: section/para
2313#: C/index-in.docbook:19364866#: C/index-in.docbook:1936
n2314msgid "Multiple-item container widgets have other methods than <methodname>set_cn4867#, fuzzy
>hild()</methodname> and <methodname>unset_child()</methodname>. Different contai 
>ners can have different methods for adding and removing child widgets. For insta 
>nce, <classname>Gtk::Box</classname> has <methodname>append()</methodname> and < 
>methodname>remove()</methodname> as well as other methods. The <methodname>remov 
>e()</methodname> method for multiple-item containers takes an argument, specifyi 
>ng which widget to remove." 
4868msgid ""
4869"Multiple-item container widgets have other methods than "
4870"<methodname>set_child()</methodname> and <methodname>unset_child()</"
4871"methodname>. Different containers can have different methods for adding and "
4872"removing child widgets. For instance, <classname>Gtk::Box</classname> has "
4873"<methodname>append()</methodname> and <methodname>remove()</methodname> as "
4874"well as other methods. The <methodname>remove()</methodname> method for "
4875"multiple-item containers takes an argument, specifying which widget to "
4876"remove."
2315msgstr ""4877msgstr ""
nn4878"Behållarkomponenter för flera objekt har andra metoder än "
4879"<methodname>set_child()</methodname> och <methodname>unset_child()</"
4880"methodname>. Olika behållare kan ha olika metoder för att lägga till och ta "
4881"bort underordnade komponenter. <classname>Gtk::Box</classname> har "
4882"exempelvis <methodname>append()</methodname> och <methodname>remove()</"
4883"methodname> såväl som andra metoder. Metoden <methodname>remove()</"
4884"methodname> för flerobjektsbehållare tar ett argument som anger vilken "
4885"komponent som ska tas bort."
23164886
2317#. (itstool) path: section/title4887#. (itstool) path: section/title
2318#: C/index-in.docbook:19464888#: C/index-in.docbook:1946
2319msgid "Packing"4889msgid "Packing"
n2320msgstr ""n4890msgstr "Packning"
23214891
2322#. (itstool) path: section/para4892#. (itstool) path: section/para
2323#: C/index-in.docbook:19484893#: C/index-in.docbook:1948
n2324msgid "You've probably noticed that <application>gtkmm</application> windows seen4894msgid ""
>m \"elastic\" - they can usually be stretched in many different ways. This is du 
>e to the <emphasis>widget packing</emphasis> system." 
4895"You've probably noticed that <application>gtkmm</application> windows seem "
4896"\"elastic\" - they can usually be stretched in many different ways. This is "
4897"due to the <emphasis>widget packing</emphasis> system."
2325msgstr ""4898msgstr ""
nn4899"Du har troligen upptäckt att <application>gtkmm</application>-fönster verkar "
4900"”elastiska” - de kan vanligen sträckas ut på många olika sätt. Det här är på "
4901"grund av systemet för <emphasis>komponentpackning</emphasis>."
23264902
2327#. (itstool) path: section/para4903#. (itstool) path: section/para
2328#: C/index-in.docbook:19534904#: C/index-in.docbook:1953
n2329msgid "Many GUI toolkits require you to precisely place widgets in a window, usin4905msgid ""
>ng absolute positioning, often using a visual editor. This leads to several prob 
>lems:" 
4906"Many GUI toolkits require you to precisely place widgets in a window, using "
4907"absolute positioning, often using a visual editor. This leads to several "
4908"problems:"
2330msgstr ""4909msgstr ""
nn4910"Många verktygslådor för grafiska användargränssnitt kräver att du precist "
4911"placerar komponenter i ett fönster med absolut positionering, ofta med en "
4912"visuell redigerare. Detta leder till flera problem:"
23314913
2332#. (itstool) path: listitem/para4914#. (itstool) path: listitem/para
2333#: C/index-in.docbook:19604915#: C/index-in.docbook:1960
n2334msgid "The widgets don't rearrange themselves when the window is resized. Some wn4916msgid ""
>idgets are hidden when the window is made smaller, and lots of useless space app 
>ears when the window is made larger." 
4917"The widgets don't rearrange themselves when the window is resized. Some "
4918"widgets are hidden when the window is made smaller, and lots of useless "
4919"space appears when the window is made larger."
2335msgstr ""4920msgstr ""
nn4921"Komponenterna arrangerar inte om sig själva när fönstrets storlek ändras. "
4922"Vissa komponenter döljs när fönstret görs mindre, och mycket onödigt utrymme "
4923"uppstår när fönstret görs större."
23364924
2337#. (itstool) path: listitem/para4925#. (itstool) path: listitem/para
2338#: C/index-in.docbook:19644926#: C/index-in.docbook:1964
n2339msgid "It's impossible to predict the amount of space necessary for text after in4927msgid ""
>t has been translated to other languages, or displayed in a different font. On U 
>nix it is also impossible to anticipate the effects of every theme and window ma 
>nager." 
4928"It's impossible to predict the amount of space necessary for text after it "
4929"has been translated to other languages, or displayed in a different font. On "
4930"Unix it is also impossible to anticipate the effects of every theme and "
4931"window manager."
2340msgstr ""4932msgstr ""
nn4933"Det är omöjligt att förutse mängden utrymme som krävs för text efter att den "
4934"har översatts till andra språk, eller visas med ett annat typsnitt. På Unix "
4935"är det också omöjligt att förutse effekterna av varje tema och "
4936"fönsterhanterare."
23414937
2342#. (itstool) path: listitem/para4938#. (itstool) path: listitem/para
2343#: C/index-in.docbook:19684939#: C/index-in.docbook:1968
n2344msgid "Changing the layout of a window \"on the fly\", to make some extra widgetn4940msgid ""
>s appear, for instance, is complex. It requires tedious recalculation of every w 
>idget's position." 
4941"Changing the layout of a window \"on the fly\", to make some extra widgets "
4942"appear, for instance, is complex. It requires tedious recalculation of every "
4943"widget's position."
2345msgstr ""4944msgstr ""
nn4945"Att ändra layouten för ett fönster ”i farten”, exempelvis för att få några "
4946"extra komponenter att visas, är komplext. Det kräver tröttsam omräkning av "
4947"varje komponents position."
23464948
2347#. (itstool) path: section/para4949#. (itstool) path: section/para
2348#: C/index-in.docbook:19744950#: C/index-in.docbook:1974
n2349msgid "<application>gtkmm</application> uses the packing system to solve these pn4951#, fuzzy
>roblems. Rather than specifying the position and size of each widget in the wind 
>ow, you can arrange your widgets in rows, columns, and/or grids. <application>gt 
>kmm</application> can size your window automatically, based on the sizes of the  
>widgets it contains. And the sizes of the widgets are, in turn, determined by th 
>e amount of text they contain, or the minimum and maximum sizes that you specify 
>, and/or how you have requested that the available space should be shared betwee 
>n sets of widgets. You can perfect your layout by specifying margins and centeri 
>ng values for each of your widgets. <application>gtkmm</application> then uses a 
>ll this information to resize and reposition everything sensibly and smoothly wh 
>en the user manipulates the window." 
4952msgid ""
4953"<application>gtkmm</application> uses the packing system to solve these "
4954"problems. Rather than specifying the position and size of each widget in the "
4955"window, you can arrange your widgets in rows, columns, and/or grids. "
4956"<application>gtkmm</application> can size your window automatically, based "
4957"on the sizes of the widgets it contains. And the sizes of the widgets are, "
4958"in turn, determined by the amount of text they contain, or the minimum and "
4959"maximum sizes that you specify, and/or how you have requested that the "
4960"available space should be shared between sets of widgets. You can perfect "
4961"your layout by specifying margins and centering values for each of your "
4962"widgets. <application>gtkmm</application> then uses all this information to "
4963"resize and reposition everything sensibly and smoothly when the user "
4964"manipulates the window."
2350msgstr ""4965msgstr ""
nn4966"<application>gtkmm</application> använder packningssystemet för att lösa "
4967"dessa problem. Snarare än att ange position och storlek för varje komponent "
4968"i fönstret så kan du arrangera dina komponenter i rader, kolumner och/eller "
4969"rutnät. <application>gtkmm</application> kan ändra storlek på ditt fönster "
4970"automatiskt, baserat på storlekarna på komponenterna det innehåller. "
4971"Storlekarna på komponenterna avgörs i sin tur av mängden text de innehåller, "
4972"eller de minsta och största storlekarna som du anger, och/eller hur du har "
4973"begärt att tillgängligt utrymme ska delas mellan uppsättningar av "
4974"komponenter. <application>gtkmm</application> använder sedan all denna "
4975"information för att ändra storlek och position på allt på ett rimligt och "
4976"smidigt sätt när användaren manipulerar fönstret."
23514977
nn4978# TODO: flavors
2352#. (itstool) path: section/para4979#. (itstool) path: section/para
2353#: C/index-in.docbook:19834980#: C/index-in.docbook:1983
n2354msgid "<application>gtkmm</application> arranges widgets hierarchically, using <n4981#, fuzzy
>emphasis>containers</emphasis>. A container widget contains other widgets. Most  
><application>gtkmm</application> widgets are containers. Windows, Notebook tabs, 
> and Buttons are all container widgets. There are two flavors of containers: sin 
>gle-child containers and multiple-child containers. Most container widgets in <a 
>pplication>gtkmm</application> are single-child containers, including <classname 
>>Gtk::Window</classname>." 
4982msgid ""
4983"<application>gtkmm</application> arranges widgets hierarchically, using "
4984"<emphasis>containers</emphasis>. A container widget contains other widgets. "
4985"Most <application>gtkmm</application> widgets are containers. Windows, "
4986"Notebook tabs, and Buttons are all container widgets. There are two flavors "
4987"of containers: single-child containers and multiple-child containers. Most "
4988"container widgets in <application>gtkmm</application> are single-child "
4989"containers, including <classname>Gtk::Window</classname>."
2355msgstr ""4990msgstr ""
nn4991"<application>gtkmm</application> arrangerar komponenter hierarkiskt med "
4992"<emphasis>behållare</emphasis>. En behållarkomponent innehåller andra "
4993"komponenter. De flesta <application>gtkmm</application>-komponenter är "
4994"behållare. Fönster, anteckningsblocksflikar och knappar är alla "
4995"behållarkomponenter. Det finns två sorters behållare: behållare med en "
4996"underordnad och de med flera underordnade. De flesta behållarkomponenter i "
4997"<application>gtkmm</application> är behållare med en underordnad, inklusive "
4998"<classname>Gtk::Window</classname>."
23564999
2357#. (itstool) path: section/para5000#. (itstool) path: section/para
2358#: C/index-in.docbook:19925001#: C/index-in.docbook:1992
n2359msgid "Yes, that's correct: a Window can contain at most one widget. How, then, n5002msgid ""
>can we use a window for anything useful? By placing a multiple-child container i 
>n the window. The most useful container widgets are <classname>Gtk::Grid</classn 
>ame> and <classname>Gtk::Box</classname>." 
5003"Yes, that's correct: a Window can contain at most one widget. How, then, can "
5004"we use a window for anything useful? By placing a multiple-child container "
5005"in the window. The most useful container widgets are <classname>Gtk::Grid</"
5006"classname> and <classname>Gtk::Box</classname>."
2360msgstr ""5007msgstr ""
nn5008"Det stämmer: ett Window kan innehålla högst en komponent. Men hur kan vi då "
5009"använda ett fönster för något användbart? Genom att placera en "
5010"flerobjektsbehållare i fönstret. De mest användbara behållarkomponenterna är "
5011"<classname>Gtk::Grid</classname> och <classname>Gtk::Box</classname>."
23615012
2362#. (itstool) path: listitem/para5013#. (itstool) path: listitem/para
2363#: C/index-in.docbook:20035014#: C/index-in.docbook:2003
n2364msgid "<classname>Gtk::Grid</classname> arranges its child widgets in rows and cn5015msgid ""
>olumns. Use <methodname>attach()</methodname> and <methodname>attach_next_to()</ 
>methodname> to insert child widgets." 
5016"<classname>Gtk::Grid</classname> arranges its child widgets in rows and "
5017"columns. Use <methodname>attach()</methodname> and "
5018"<methodname>attach_next_to()</methodname> to insert child widgets."
2365msgstr ""5019msgstr ""
nn5020"<classname>Gtk::Grid</classname> arrangerar sina underordnade komponenter i "
5021"rader och kolumner. Använd <methodname>attach()</methodname> och "
5022"<methodname>attach_next_to()</methodname> för att infoga underordnade "
5023"komponenter."
23665024
2367#. (itstool) path: listitem/para5025#. (itstool) path: listitem/para
2368#: C/index-in.docbook:20115026#: C/index-in.docbook:2011
n2369msgid "<classname>Gtk::Box</classname> arranges its child widgets vertically or n5027msgid ""
>horizontally. Use <methodname>append()</methodname> to insert child widgets." 
5028"<classname>Gtk::Box</classname> arranges its child widgets vertically or "
5029"horizontally. Use <methodname>append()</methodname> to insert child widgets."
2370msgstr ""5030msgstr ""
nn5031"<classname>Gtk::Box</classname> arrangerar sina underordnade komponenter "
5032"vertikalt eller horisontellt. Använd <methodname>append()</methodname> för "
5033"att infoga underordnade komponenter."
23715034
2372#. (itstool) path: section/para5035#. (itstool) path: section/para
2373#: C/index-in.docbook:20195036#: C/index-in.docbook:2019
2374msgid "There are several other containers, which we will also discuss."5037msgid "There are several other containers, which we will also discuss."
n2375msgstr ""n5038msgstr "Det finns flera andra behållare som vi också kommer diskutera."
23765039
2377#. (itstool) path: section/para5040#. (itstool) path: section/para
2378#: C/index-in.docbook:20235041#: C/index-in.docbook:2023
n2379msgid "If you've never used a packing toolkit before, it can take some getting un5042#, fuzzy
>sed to. You'll probably find, however, that you don't need to rely on visual for 
>m editors quite as much as you might with other toolkits." 
5043msgid ""
5044"If you've never used a packing toolkit before, it can take some getting used "
5045"to. You'll probably find, however, that you don't need to rely on visual "
5046"form editors quite as much as you might with other toolkits."
2380msgstr ""5047msgstr ""
nn5048"Om du aldrig använt en packningsverktygslåda förut kan det ta tid att vänja "
5049"sig vid. Du kommer dock troligen se att du inte kommer förlita dig på "
5050"visuella redigerare riktigt lika mycket som du kan göra med andra "
5051"verktygslådor."
23815052
2382#. (itstool) path: section/title5053#. (itstool) path: section/title
2383#: C/index-in.docbook:20335054#: C/index-in.docbook:2033
2384msgid "An improved Hello World"5055msgid "An improved Hello World"
n2385msgstr ""n5056msgstr "Ett förbättrat Hej världen"
23865057
2387#. (itstool) path: section/para5058#. (itstool) path: section/para
2388#: C/index-in.docbook:20355059#: C/index-in.docbook:2035
nn5060msgid ""
2389msgid "Let's take a look at a slightly improved <literal>helloworld</literal>, s5061"Let's take a look at a slightly improved <literal>helloworld</literal>, "
>howing what we've learnt." 
5062"showing what we've learnt."
2390msgstr ""5063msgstr ""
nn5064"Låt oss ta en titt på ett något förbättrat <literal>helloworld</literal> som "
5065"visar vad vi lärt oss."
23915066
2392#. (itstool) path: figure/title5067#. (itstool) path: figure/title
2393#: C/index-in.docbook:20405068#: C/index-in.docbook:2040
2394msgid "Hello World 2"5069msgid "Hello World 2"
n2395msgstr ""n5070msgstr "Hej världen 2"
23965071
2397#. (itstool) path: imageobject/imagedata5072#. (itstool) path: imageobject/imagedata
2398#. This is a reference to an external file such as an image or video. When5073#. This is a reference to an external file such as an image or video. When
2399#. the file changes, the md5 hash will change to let you know you need to5074#. the file changes, the md5 hash will change to let you know you need to
2400#. update your localized copy. The msgstr is not used at all. Set it to5075#. update your localized copy. The msgstr is not used at all. Set it to
2401#. whatever you like once you have updated your copy of the file.5076#. whatever you like once you have updated your copy of the file.
2402#: C/index-in.docbook:20425077#: C/index-in.docbook:2042
nn5078#, fuzzy
2403msgctxt "_"5079msgctxt "_"
nn5080msgid ""
2404msgid "external ref='figures/helloworld2.png' md5='6067abf252497571f50684895c26c5081"external ref='figures/helloworld2.png' md5='6067abf252497571f50684895c26ca29'"
>a29'" 
2405msgstr ""5082msgstr ""
nn5083"external ref='figures/helloworld.png' md5='02f7e986e608661d5a1524ac5f0c0b2e'"
24065084
2407#. (itstool) path: section/para5085#. (itstool) path: section/para
2408#: C/index-in.docbook:20465086#: C/index-in.docbook:2046
n2409msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren5087msgid ""
>e/master/examples/book/helloworld2\">Source Code</link>" 
5088"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5089"master/examples/book/helloworld2\">Source Code</link>"
2410msgstr ""5090msgstr ""
nn5091"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5092"master/examples/book/helloworld2\">Källkod</link>"
24115093
nn5094# TODO: behavior
2412#. (itstool) path: section/para5095#. (itstool) path: section/para
2413#: C/index-in.docbook:20485096#: C/index-in.docbook:2048
n2414msgid "After building and running this program, try resizing the window to see tn5097#, fuzzy
>he behavior. Also, try playing with <methodname>set_expand()</methodname>, <meth 
>odname>set_hexpand()</methodname>, <methodname>set_vexpand()</methodname>, <meth 
>odname>set_halign()</methodname> and <methodname>set_valign()</methodname> while 
> reading the <link linkend=\"sec-boxes\">Boxes</link> section." 
5098msgid ""
5099"After building and running this program, try resizing the window to see the "
5100"behavior. Also, try playing with <methodname>set_expand()</methodname>, "
5101"<methodname>set_hexpand()</methodname>, <methodname>set_vexpand()</"
5102"methodname>, <methodname>set_halign()</methodname> and "
5103"<methodname>set_valign()</methodname> while reading the <link linkend=\"sec-"
5104"boxes\">Boxes</link> section."
2415msgstr ""5105msgstr ""
nn5106"Försök efter att ha byggt och kört detta program att ändra storlek på "
5107"fönstret för att se beteendet. Pröva även leka med <methodname>set_expand()</"
5108"methodname>, <methodname>set_hexpand()</methodname>, "
5109"<methodname>set_vexpand()</methodname>, <methodname>set_halign()</"
5110"methodname> och <methodname>set_valign()</methodname> medan du läser "
5111"avsnittet <link linkend=\"sec-boxes\">Boxar</link>."
24165112
2417#. (itstool) path: section/title5113#. (itstool) path: section/title
2418#: C/index-in.docbook:20595114#: C/index-in.docbook:2059
nn5115#, fuzzy
2419msgid "Boxes"5116msgid "Boxes"
n2420msgstr ""n5117msgstr "Boxar"
24215118
2422#. (itstool) path: section/para5119#. (itstool) path: section/para
2423#: C/index-in.docbook:20615120#: C/index-in.docbook:2061
n2424msgid "Most packing uses boxes as in the above example. These are invisible contn5121#, fuzzy
>ainers into which we can pack our widgets. When packing widgets into a horizonta 
>l box, the objects are inserted horizontally from left to right. In a vertical b 
>ox, widgets are packed from top to bottom. You may use any combination of boxes  
>inside or beside other boxes to create the desired effect." 
5122msgid ""
5123"Most packing uses boxes as in the above example. These are invisible "
5124"containers into which we can pack our widgets. When packing widgets into a "
5125"horizontal box, the objects are inserted horizontally from left to right. In "
5126"a vertical box, widgets are packed from top to bottom. You may use any "
5127"combination of boxes inside or beside other boxes to create the desired "
5128"effect."
2425msgstr ""5129msgstr ""
nn5130"Den mesta packningen använder boxar som i exemplet ovan. Dessa är osynliga "
5131"behållare som vi kan packa våra komponenter i. När komponenter packas i en "
5132"horisontell box sätts objekten in horisontellt från vänster till höger. I en "
5133"horisontell box packas komponenter uppifrån och ner. Du kan använda valfri "
5134"kombination av boxar inuti eller bredvid andra boxar för att skapa önskade "
5135"effekt."
24265136
2427#. (itstool) path: section/title5137#. (itstool) path: section/title
2428#: C/index-in.docbook:20715138#: C/index-in.docbook:2071
2429msgid "Adding widgets"5139msgid "Adding widgets"
n2430msgstr ""n5140msgstr "Lägga till komponenter"
24315141
2432#. (itstool) path: section/title5142#. (itstool) path: section/title
2433#: C/index-in.docbook:20735143#: C/index-in.docbook:2073
2434msgid "Per-child packing options"5144msgid "Per-child packing options"
n2435msgstr ""n5145msgstr "Packningsalternativ per underordnad"
24365146
2437#. (itstool) path: section/para5147#. (itstool) path: section/para
2438#: C/index-in.docbook:20745148#: C/index-in.docbook:2074
n2439msgid "The <methodname>append()</methodname> method places widgets inside these n5149msgid ""
>containers. It will start at the top and work its way down in a <classname>Box</ 
>classname> with vertical orientation, or pack left to right in a <classname>Box< 
>/classname> with horizontal orientation. If it's inconvenient to add widgets in  
>this order, use <methodname>insert_child_after()</methodname> or <methodname>ins 
>ert_child_at_start()</methodname>. We will use <methodname>append()</methodname> 
> in our examples." 
5150"The <methodname>append()</methodname> method places widgets inside these "
5151"containers. It will start at the top and work its way down in a "
5152"<classname>Box</classname> with vertical orientation, or pack left to right "
5153"in a <classname>Box</classname> with horizontal orientation. If it's "
5154"inconvenient to add widgets in this order, use "
5155"<methodname>insert_child_after()</methodname> or "
5156"<methodname>insert_child_at_start()</methodname>. We will use "
5157"<methodname>append()</methodname> in our examples."
2440msgstr ""5158msgstr ""
nn5159"Metoden <methodname>append()</methodname> placerar komponenter inuti dessa "
5160"behållare. Den kommer starta uppifrån och arbeta sig nedåt i en "
5161"<classname>Box</classname> med vertikal orientering, eller packa från "
5162"vänster till höger i en <classname>Box</classname> med horisontell "
5163"orientering. Om det är opraktiskt att lägga till komponenter i denna ordning "
5164"kan du använda <methodname>insert_child_after()</methodname> eller "
5165"<methodname>insert_child_at_start()</methodname>. Vi kommer använda "
5166"<methodname>append()</methodname> i våra exempel."
24415167
2442#. (itstool) path: section/para5168#. (itstool) path: section/para
2443#: C/index-in.docbook:20845169#: C/index-in.docbook:2084
n2444msgid "There are several options governing how widgets are to be packed, and thin5170#, fuzzy
>s can be confusing at first. You can modify the packing by using <methodname>set 
>_expand()</methodname>, <methodname>set_hexpand()</methodname>, <methodname>set_ 
>vexpand()</methodname>, <methodname>set_halign()</methodname>, <methodname>set_v 
>align()</methodname> and/or <methodname>set_margin()</methodname> on the child w 
>idgets. If you have difficulties, then it is sometimes a good idea to play with  
>the <application>Cambalache</application> GUI designer to see what is possible.  
>You can then use the <classname>Gtk::Builder</classname> API to load your GUI at 
> runtime." 
5171msgid ""
5172"There are several options governing how widgets are to be packed, and this "
5173"can be confusing at first. You can modify the packing by using "
5174"<methodname>set_expand()</methodname>, <methodname>set_hexpand()</"
5175"methodname>, <methodname>set_vexpand()</methodname>, "
5176"<methodname>set_halign()</methodname>, <methodname>set_valign()</methodname> "
5177"and/or <methodname>set_margin()</methodname> on the child widgets. If you "
5178"have difficulties, then it is sometimes a good idea to play with the "
5179"<application>Cambalache</application> GUI designer to see what is possible. "
5180"You can then use the <classname>Gtk::Builder</classname> API to load your "
5181"GUI at runtime."
2445msgstr ""5182msgstr ""
nn5183"Det finns flera alternativ som styr hur komponenter ska packas, och detta "
5184"kan till en början vara förvirrande. Du kan ändra packningen genom att "
5185"använda <methodname>set_expand()</methodname>, <methodname>set_hexpand()</"
5186"methodname>, <methodname>set_vexpand()</methodname>, "
5187"<methodname>set_halign()</methodname>, <methodname>set_valign()</methodname> "
5188"och/eller <methodname>set_margin()</methodname> på de underordnade "
5189"komponenterna. Om du har svårigheter är det ibland en god idé att leka med "
5190"GUI-designern <application>glade</application> för att se vad som är "
5191"möjligt. Du kan till och med bestämma dig för att använda <classname>Gtk::"
5192"Builder</classname>-API:t för att läsa in ditt GUI vid körning."
24465193
2447#. (itstool) path: section/para5194#. (itstool) path: section/para
2448#: C/index-in.docbook:20955195#: C/index-in.docbook:2095
2449msgid "There are basically five different styles, as shown in this picture:"5196msgid "There are basically five different styles, as shown in this picture:"
n2450msgstr ""n5197msgstr "Det finns i grunden fem olika stilar som kan ses i denna bild:"
24515198
2452#. (itstool) path: figure/title5199#. (itstool) path: figure/title
2453#: C/index-in.docbook:21015200#: C/index-in.docbook:2101
nn5201#, fuzzy
2454msgid "Box Packing 1"5202msgid "Box Packing 1"
n2455msgstr ""n5203msgstr "Boxpackning 1"
24565204
2457#. (itstool) path: imageobject/imagedata5205#. (itstool) path: imageobject/imagedata
2458#. This is a reference to an external file such as an image or video. When5206#. This is a reference to an external file such as an image or video. When
2459#. the file changes, the md5 hash will change to let you know you need to5207#. the file changes, the md5 hash will change to let you know you need to
2460#. update your localized copy. The msgstr is not used at all. Set it to5208#. update your localized copy. The msgstr is not used at all. Set it to
2461#. whatever you like once you have updated your copy of the file.5209#. whatever you like once you have updated your copy of the file.
2462#: C/index-in.docbook:21035210#: C/index-in.docbook:2103
nn5211#, fuzzy
2463msgctxt "_"5212msgctxt "_"
n2464msgid "external ref='figures/box_packing1.png' md5='dedb723a5ca690ed542d09361fc8n5213msgid ""
>ad4a'" 
5214"external ref='figures/box_packing1.png' "
5215"md5='dedb723a5ca690ed542d09361fc8ad4a'"
2465msgstr ""5216msgstr ""
nn5217"external ref='figures/box_packing1.png' "
5218"md5='dedb723a5ca690ed542d09361fc8ad4a'"
24665219
2467#. (itstool) path: section/para5220#. (itstool) path: section/para
2468#: C/index-in.docbook:21075221#: C/index-in.docbook:2107
n2469msgid "Each line contains one horizontal <classname>Box</classname> with severaln5222#, fuzzy
> buttons. Each of the buttons on a line is packed into the <classname>Box</class 
>name> with the same arguments to the <methodname>set_hexpand()</methodname>, <me 
>thodname>set_halign()</methodname>, <methodname>set_margin_start()</methodname>  
>and <methodname>set_margin_end()</methodname> methods." 
5223msgid ""
5224"Each line contains one horizontal <classname>Box</classname> with several "
5225"buttons. Each of the buttons on a line is packed into the <classname>Box</"
5226"classname> with the same arguments to the <methodname>set_hexpand()</"
5227"methodname>, <methodname>set_halign()</methodname>, "
5228"<methodname>set_margin_start()</methodname> and "
5229"<methodname>set_margin_end()</methodname> methods."
2470msgstr ""5230msgstr ""
nn5231"Varje rad innehåller en horisontell <classname>Box</classname> med flera "
5232"knappar. Var och en av knapparna på en rad packas i <classname>Box</"
5233"classname>en med samma argument till metoderna <methodname>set_hexpand()</"
5234"methodname>, <methodname>set_halign()</methodname>, "
5235"<methodname>set_margin_start()</methodname> och "
5236"<methodname>set_margin_end()</methodname> methods."
24715237
2472#. (itstool) path: section/para5238#. (itstool) path: section/para
2473#: C/index-in.docbook:21165239#: C/index-in.docbook:2116
n2474msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5240msgid ""
>1Box.html\">Reference</link>" 
5241"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5242"classGtk_1_1Box.html\">Reference</link>"
2475msgstr ""5243msgstr ""
nn5244"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5245"classGtk_1_1Box.html\">Referens</link>"
24765246
2477#. (itstool) path: section/title5247#. (itstool) path: section/title
2478#: C/index-in.docbook:21215248#: C/index-in.docbook:2121
nn5249#, fuzzy
2479msgid "Per-container packing options"5250msgid "Per-container packing options"
n2480msgstr ""n5251msgstr "Packningsalternativ per behållare"
24815252
2482#. (itstool) path: section/para5253#. (itstool) path: section/para
2483#: C/index-in.docbook:21225254#: C/index-in.docbook:2122
n2484msgid "Here's the constructor for the <classname>Box</classname> widget, and metn5255msgid ""
>hods that set per-container packing options:" 
5256"Here's the constructor for the <classname>Box</classname> widget, and "
5257"methods that set per-container packing options:"
2485msgstr ""5258msgstr ""
24865259
2487#. (itstool) path: section/programlisting5260#. (itstool) path: section/programlisting
2488#: C/index-in.docbook:21255261#: C/index-in.docbook:2125
n2489#, no-wrapn5262#, fuzzy, no-wrap
5263#| msgid ""
5264#| "Gtk::Box(Gtk::Orientation orientation = Gtk::Orientation::HORIZONTAL, int sp
 >acing = 0);\n"
5265#| "void set_orientation(Gtk::Orientation orientation);\n"
5266#| "void set_spacing(int spacing);\n"
5267#| "void set_homogeneous(bool homogeneous = true);"
2490msgid ""5268msgid ""
2491"<code>Gtk::Box(Gtk::Orientation orientation = Gtk::Orientation::HORIZONTAL, int5269"<code>Gtk::Box(Gtk::Orientation orientation = Gtk::Orientation::HORIZONTAL, int
> spacing = 0);\n"> spacing = 0);\n"
2492"void set_orientation(Gtk::Orientation orientation);\n"5270"void set_orientation(Gtk::Orientation orientation);\n"
2493"void set_spacing(int spacing);\n"5271"void set_spacing(int spacing);\n"
2494"void set_homogeneous(bool homogeneous = true);</code>"5272"void set_homogeneous(bool homogeneous = true);</code>"
2495msgstr ""5273msgstr ""
nn5274"Gtk::Box(Gtk::Orientation orientation = Gtk::Orientation::HORIZONTAL, int spaci
 >ng = 0);\n"
5275"void set_orientation(Gtk::Orientation orientation);\n"
5276"void set_spacing(int spacing);\n"
5277"void set_homogeneous(bool homogeneous = true);"
24965278
2497#. (itstool) path: section/para5279#. (itstool) path: section/para
2498#: C/index-in.docbook:21295280#: C/index-in.docbook:2129
n2499msgid "Passing <literal>true</literal> to <methodname>set_homogeneous()</methodnn5281#, fuzzy
>ame> will cause all of the contained widgets to be the same size. <parameter>spa 
>cing</parameter> is a (minimum) number of pixels to leave between each widget." 
5282msgid ""
5283"Passing <literal>true</literal> to <methodname>set_homogeneous()</"
5284"methodname> will cause all of the contained widgets to be the same size. "
5285"<parameter>spacing</parameter> is a (minimum) number of pixels to leave "
5286"between each widget."
2500msgstr ""5287msgstr ""
nn5288"Här är konstruktorn för komponenten <classname>Box</classname>, och metoder "
5289"som ställer in packningsalternativ per behållare: <_:programlisting-1/> Att "
5290"skicka <literal>true</literal> till <methodname>set_homogeneous()</"
5291"methodname> kommer få alla inneslutna komponenter att vara samma storlek. "
5292"<parameter>spacing</parameter> är ett (minsta) antal bildpunkter att lämna "
5293"mellan varje komponent."
25015294
2502#. (itstool) path: section/para5295#. (itstool) path: section/para
2503#: C/index-in.docbook:21355296#: C/index-in.docbook:2135
n2504msgid "What's the difference between spacing (set when the box is created) and mn5297#, fuzzy
>argins (set separately for each child widget)? Spacing is added between objects, 
> and margins are added on one or more sides of a widget. The following figure sh 
>ould make it clearer. The shown margins are the left and right margins of each b 
>utton in the row." 
5298msgid ""
5299"What's the difference between spacing (set when the box is created) and "
5300"margins (set separately for each child widget)? Spacing is added between "
5301"objects, and margins are added on one or more sides of a widget. The "
5302"following figure should make it clearer. The shown margins are the left and "
5303"right margins of each button in the row."
2505msgstr ""5304msgstr ""
nn5305"Vad är skillnaden mellan utrymme (ställs in när boxen skapas) och marginaler "
5306"(ställs in separat för varje underordnad komponent)? Utrymme läggs in mellan "
5307"objekt, och marginaler läggs till på en eller flera sidor av en komponent. "
5308"Följande figur bör göra det tydligare. De visade marginalerna är vänster- "
5309"och högermarginalerna för varje knapp i raden."
25065310
2507#. (itstool) path: figure/title5311#. (itstool) path: figure/title
2508#: C/index-in.docbook:21445312#: C/index-in.docbook:2144
nn5313#, fuzzy
2509msgid "Box Packing 2"5314msgid "Box Packing 2"
n2510msgstr ""n5315msgstr "Boxpackning 2"
25115316
2512#. (itstool) path: imageobject/imagedata5317#. (itstool) path: imageobject/imagedata
2513#. This is a reference to an external file such as an image or video. When5318#. This is a reference to an external file such as an image or video. When
2514#. the file changes, the md5 hash will change to let you know you need to5319#. the file changes, the md5 hash will change to let you know you need to
2515#. update your localized copy. The msgstr is not used at all. Set it to5320#. update your localized copy. The msgstr is not used at all. Set it to
2516#. whatever you like once you have updated your copy of the file.5321#. whatever you like once you have updated your copy of the file.
2517#: C/index-in.docbook:21465322#: C/index-in.docbook:2146
nn5323#, fuzzy
2518msgctxt "_"5324msgctxt "_"
n2519msgid "external ref='figures/box_packing2.png' md5='48e64123d27cc8e66137c8a2edf9n5325msgid ""
>589f'" 
5326"external ref='figures/box_packing2.png' "
5327"md5='48e64123d27cc8e66137c8a2edf9589f'"
2520msgstr ""5328msgstr ""
nn5329"external ref='figures/box_packing2.png' "
5330"md5='48e64123d27cc8e66137c8a2edf9589f'"
25215331
2522#. (itstool) path: section/title5332#. (itstool) path: section/title
2523#: C/index-in.docbook:21545333#: C/index-in.docbook:2154
2524msgid "Gtk::Application and command-line options"5334msgid "Gtk::Application and command-line options"
n2525msgstr ""n5335msgstr "Gtk::Application och kommandoradsflaggor"
25265336
2527#. (itstool) path: section/para5337#. (itstool) path: section/para
2528#: C/index-in.docbook:21565338#: C/index-in.docbook:2156
n2529msgid "The following example program requires a command-line option. The source n5339msgid ""
>code shows two ways of handling command-line options in combination with <classn 
>ame>Gtk::Application</classname>." 
5340"The following example program requires a command-line option. The source "
5341"code shows two ways of handling command-line options in combination with "
5342"<classname>Gtk::Application</classname>."
2530msgstr ""5343msgstr ""
nn5344"Följande exempelprogram kräver en kommandoradsflagga. Källkoden visar två "
5345"sätt att hantera kommandoradsflaggor i kombination med <classname>Gtk::"
5346"Application</classname>."
25315347
2532#. (itstool) path: listitem/para5348#. (itstool) path: listitem/para
2533#: C/index-in.docbook:21625349#: C/index-in.docbook:2162
n2534msgid "Handle the options in <function>main()</function> and hide them from <clan5350msgid ""
>ssname>Gtk::Application</classname> by setting <literal>argc = 1</literal> in th 
>e call to <methodname>Gtk::Application::run()</methodname>." 
5351"Handle the options in <function>main()</function> and hide them from "
5352"<classname>Gtk::Application</classname> by setting <literal>argc = 1</"
5353"literal> in the call to <methodname>Gtk::Application::run()</methodname>."
2535msgstr ""5354msgstr ""
nn5355"Hantera flaggorna i <function>main()</function> och dölj dem från "
5356"<classname>Gtk::Application</classname> genom att ställa in <literal>argc = "
5357"1</literal> i anropet till <methodname>Gtk::Application::run()</methodname>."
25365358
2537#. (itstool) path: listitem/para5359#. (itstool) path: listitem/para
2538#: C/index-in.docbook:21685360#: C/index-in.docbook:2168
n2539msgid "Give all command-line options to <methodname>Gtk::Application::run()</metn5361msgid ""
>hodname> and add the flag <literal>Gio::Application::Flags::HANDLES_COMMAND_LINE 
></literal> to <methodname>Gtk::Application::create()</methodname>. Connect a sig 
>nal handler to the <literal>command_line</literal> signal, and handle the comman 
>d-line options in the signal handler." 
5362"Give all command-line options to <methodname>Gtk::Application::run()</"
5363"methodname> and add the flag <literal>Gio::Application::Flags::"
5364"HANDLES_COMMAND_LINE</literal> to <methodname>Gtk::Application::create()</"
5365"methodname>. Connect a signal handler to the <literal>command_line</literal> "
5366"signal, and handle the command-line options in the signal handler."
2540msgstr ""5367msgstr ""
nn5368"Ge alla kommandoradsflaggor till <methodname>Gtk::Application::run()</"
5369"methodname> och lägg till flaggan <literal>Gio::Application::Flags::"
5370"HANDLES_COMMAND_LINE</literal> till <methodname>Gtk::Application::create()</"
5371"methodname>. Anslut en signalhanterare till signalen <literal>command_line</"
5372"literal>, och hantera kommandoradsflaggorna i signalhanteraren."
25415373
2542#. (itstool) path: listitem/para5374#. (itstool) path: listitem/para
2543#: C/index-in.docbook:21755375#: C/index-in.docbook:2175
n2544msgid "You must set the optional parameter <literal>after = false</literal> in tn5376#, fuzzy
>he call to <literal>signal_command_line().connect()</literal>, because your sign 
>al handler must be called before the default signal handler. You must also call  
><methodname>Gio::Application::activate()</methodname> in the signal handler, unl 
>ess you want your application to exit without showing its main window. (<classna 
>me>Gio::Application</classname> is a base class of <classname>Gtk::Application</ 
>classname>.)" 
5377msgid ""
5378"You must set the optional parameter <literal>after = false</literal> in the "
5379"call to <literal>signal_command_line().connect()</literal>, because your "
5380"signal handler must be called before the default signal handler. You must "
5381"also call <methodname>Gio::Application::activate()</methodname> in the "
5382"signal handler, unless you want your application to exit without showing its "
5383"main window. (<classname>Gio::Application</classname> is a base class of "
5384"<classname>Gtk::Application</classname>.)"
2545msgstr ""5385msgstr ""
nn5386"Du måste ställa in den valfria parametern <literal>after = false</literal> i "
5387"anropet till <literal>signal_command_line().connect()</literal>, för din "
5388"signalhanterare måste anropas för standardsignalhanteraren. Du måste också "
5389"anropa <methodname>Gio::Application::activate()</methodname> i "
5390"signalhanteraren om du inte vill att ditt program ska avslutas utan att visa "
5391"sitt huvudfönster. (<classname>Gio::Application</classname> är en basklass "
5392"för <classname>Gtk::Application</classname>.)"
25465393
2547#. (itstool) path: section/para5394#. (itstool) path: section/para
2548#: C/index-in.docbook:21895395#: C/index-in.docbook:2189
n2549msgid "Here is the source code for the example that produced the screenshots abon5396#, fuzzy
>ve. When you run this example, provide a number between 1 and 3 as a command-lin 
>e option, to see different packing options in use." 
5397msgid ""
5398"Here is the source code for the example that produced the screenshots above. "
5399"When you run this example, provide a number between 1 and 3 as a command-"
5400"line option, to see different packing options in use."
2550msgstr ""5401msgstr ""
nn5402"Här är källkoden för exemplet som skapade skärmbilderna ovan. Skicka när du "
5403"kör detta exempel med ett tal mellan 1 och 3 som en kommandoradsflagga för "
5404"att se då olika packningsalternativ används."
25515405
2552#. (itstool) path: section/para5406#. (itstool) path: section/para
2553#: C/index-in.docbook:21925407#: C/index-in.docbook:2192
nn5408msgid ""
2554msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tre5409"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
>e/master/examples/book/box\">Source Code</link>" 
5410"master/examples/book/box\">Source Code</link>"
2555msgstr ""5411msgstr ""
nn5412"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5413"master/examples/book/box\">Källkod</link>"
25565414
2557#. (itstool) path: section/title5415#. (itstool) path: section/title
2558#. (itstool) path: figure/title5416#. (itstool) path: figure/title
n2559#: C/index-in.docbook:2198n5417#: C/index-in.docbook:2198 C/index-in.docbook:2228
2560#: C/index-in.docbook:2228
2561msgid "Grid"5418msgid "Grid"
n2562msgstr ""n5419msgstr "Grid"
25635420
2564#. (itstool) path: section/para5421#. (itstool) path: section/para
2565#: C/index-in.docbook:22005422#: C/index-in.docbook:2200
n2566msgid "A <classname>Grid</classname> dynamically lays out child widgets in rows n5423msgid ""
>and columns. The dimensions of the grid do not need to be specified in the const 
>ructor." 
5424"A <classname>Grid</classname> dynamically lays out child widgets in rows and "
5425"columns. The dimensions of the grid do not need to be specified in the "
5426"constructor."
2567msgstr ""5427msgstr ""
nn5428"Ett <classname>Grid</classname> organiserar dynamiskt underordnade "
5429"komponenter i rader och kolumner. Dimensionerna på rutnätet behöver inte "
5430"anges i konstruktorn."
25685431
2569#. (itstool) path: section/para5432#. (itstool) path: section/para
2570#: C/index-in.docbook:22055433#: C/index-in.docbook:2205
n2571msgid "Child widgets can span multiple rows or columns, using <methodname>attachn5434msgid ""
>()</methodname>, or added next to an existing widget inside the grid with <metho 
>dname>attach_next_to()</methodname>. Individual rows and columns of the grid can 
> be set to have uniform height or width with <methodname>set_row_homogeneous()</ 
>methodname> and <methodname>set_column_homogeneous()</methodname>." 
5435"Child widgets can span multiple rows or columns, using <methodname>attach()</"
5436"methodname>, or added next to an existing widget inside the grid with "
5437"<methodname>attach_next_to()</methodname>. Individual rows and columns of "
5438"the grid can be set to have uniform height or width with "
5439"<methodname>set_row_homogeneous()</methodname> and "
5440"<methodname>set_column_homogeneous()</methodname>."
2572msgstr ""5441msgstr ""
nn5442"Underordnade komponenter kan spänna över flera rader eller kolumner med "
5443"<methodname>attach()</methodname>, eller läggas intill en befintlig "
5444"komponent i rutnätet med <methodname>attach_next_to()</methodname>. "
5445"Individuella rader och kolumner i rutnätet kan ställas in att ha enhetlig "
5446"höjd eller bredd med <methodname>set_row_homogeneous()</methodname> och "
5447"<methodname>set_column_homogeneous()</methodname>."
25735448
2574#. (itstool) path: section/para5449#. (itstool) path: section/para
2575#: C/index-in.docbook:22125450#: C/index-in.docbook:2212
n2576msgid "You can set the <emphasis>margin</emphasis> and <emphasis>expand</emphasin5451#, fuzzy
>s> properties of the child <classname>Widget</classname>s to control their spaci 
>ng and their behavior when the Grid is resized." 
5452msgid ""
5453"You can set the <emphasis>margin</emphasis> and <emphasis>expand</emphasis> "
5454"properties of the child <classname>Widget</classname>s to control their "
5455"spacing and their behavior when the Grid is resized."
2577msgstr ""5456msgstr ""
nn5457"Du kan sätta egenskaperna för <emphasis>marginal</emphasis> och "
5458"<emphasis>expansion</emphasis> för underordnade <classname>Widget</"
5459"classname> för att styra deras utrymme och deras beteende när vår Grid får "
5460"storleken ändrad."
25785461
2579#. (itstool) path: section/para5462#. (itstool) path: section/para
2580#: C/index-in.docbook:22165463#: C/index-in.docbook:2216
n2581msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5464msgid ""
>1Grid.html\">Reference</link>" 
5465"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5466"classGtk_1_1Grid.html\">Reference</link>"
2582msgstr ""5467msgstr ""
nn5468"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5469"classGtk_1_1Grid.html\">Referens</link>"
25835470
2584#. (itstool) path: section/para5471#. (itstool) path: section/para
2585#: C/index-in.docbook:22205472#: C/index-in.docbook:2220
n2586msgid "This example creates a window with three buttons in a grid. The first twon5473msgid ""
> buttons are in the upper row, from left to right. A third button is attached un 
>derneath the first button, in a new lower row, spanning two columns." 
5474"This example creates a window with three buttons in a grid. The first two "
5475"buttons are in the upper row, from left to right. A third button is attached "
5476"underneath the first button, in a new lower row, spanning two columns."
2587msgstr ""5477msgstr ""
nn5478"Detta exempel skapar ett fönster med tre knappar i ett rutnät. De första två "
5479"knapparna är i den övre raden, från vänster till höger. En tredje knapp "
5480"infogas under den första knappen i en ny lägre rad, och spänner över två "
5481"kolumner."
25885482
2589#. (itstool) path: imageobject/imagedata5483#. (itstool) path: imageobject/imagedata
2590#. This is a reference to an external file such as an image or video. When5484#. This is a reference to an external file such as an image or video. When
2591#. the file changes, the md5 hash will change to let you know you need to5485#. the file changes, the md5 hash will change to let you know you need to
2592#. update your localized copy. The msgstr is not used at all. Set it to5486#. update your localized copy. The msgstr is not used at all. Set it to
2593#. whatever you like once you have updated your copy of the file.5487#. whatever you like once you have updated your copy of the file.
2594#: C/index-in.docbook:22305488#: C/index-in.docbook:2230
2595msgctxt "_"5489msgctxt "_"
2596msgid "external ref='figures/grid.png' md5='18031e926d6082207f18de1b08cd85ae'"5490msgid "external ref='figures/grid.png' md5='18031e926d6082207f18de1b08cd85ae'"
n2597msgstr ""n5491msgstr "external ref='figures/grid.png' md5='18031e926d6082207f18de1b08cd85ae'"
25985492
2599#. (itstool) path: section/para5493#. (itstool) path: section/para
2600#: C/index-in.docbook:22345494#: C/index-in.docbook:2234
n2601msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren5495msgid ""
>e/master/examples/book/grid\">Source Code</link>" 
5496"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5497"master/examples/book/grid\">Source Code</link>"
2602msgstr ""5498msgstr ""
nn5499"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5500"master/examples/book/grid\">Källkod</link>"
26035501
2604#. (itstool) path: section/title5502#. (itstool) path: section/title
2605#. (itstool) path: figure/title5503#. (itstool) path: figure/title
n2606#: C/index-in.docbook:2240n5504#: C/index-in.docbook:2240 C/index-in.docbook:2276
2607#: C/index-in.docbook:2276
2608msgid "Notebook"5505msgid "Notebook"
n2609msgstr ""n5506msgstr "Notebook"
26105507
2611#. (itstool) path: section/para5508#. (itstool) path: section/para
2612#: C/index-in.docbook:22425509#: C/index-in.docbook:2242
n2613msgid "A <classname>Notebook</classname> has a set of stacked <literal>pages</lin5510#, fuzzy
>teral>, each of which contains widgets. Labelled <literal>tabs</literal> allow t 
>he user to select the pages. <classname>Notebook</classname>s allow several sets 
> of widgets to be placed in a small space, by only showing one page at a time. F 
>or instance, they are often used in preferences dialogs." 
5511msgid ""
5512"A <classname>Notebook</classname> has a set of stacked <literal>pages</"
5513"literal>, each of which contains widgets. Labelled <literal>tabs</literal> "
5514"allow the user to select the pages. <classname>Notebook</classname>s allow "
5515"several sets of widgets to be placed in a small space, by only showing one "
5516"page at a time. For instance, they are often used in preferences dialogs."
2614msgstr ""5517msgstr ""
nn5518"En <classname>Notebook</classname> har en hög med <literal>sidor</literal>, "
5519"var och en innehållande komponenter. Etiketterade <literal>flikar</literal> "
5520"låter användaren välja sidorna. En <classname>Notebook</classname> möjliggör "
5521"för flera uppsättningar komponenter att placeras i ett litet utrymme genom "
5522"att bara visa en sida åt gången. De används exempelvis ofta i "
5523"inställningsdialoger."
26155524
2616#. (itstool) path: section/para5525#. (itstool) path: section/para
2617#: C/index-in.docbook:22515526#: C/index-in.docbook:2251
n2618msgid "Use the <methodname>append_page()</methodname>, <methodname>prepend_page(n5527#, fuzzy
>)</methodname> and <methodname>insert_page()</methodname> methods to add tabbed  
>pages to the <literal>Notebook</literal>, supplying the child widget and the nam 
>e for the tab." 
5528msgid ""
5529"Use the <methodname>append_page()</methodname>, <methodname>prepend_page()</"
5530"methodname> and <methodname>insert_page()</methodname> methods to add tabbed "
5531"pages to the <literal>Notebook</literal>, supplying the child widget and the "
5532"name for the tab."
2619msgstr ""5533msgstr ""
nn5534"Använd metoderna <methodname>append_page()</methodname>, "
5535"<methodname>prepend_page()</methodname> och <methodname>insert_page()</"
5536"methodname> för att lägga till sidor med flik till vår <literal>Notebook</"
5537"literal>, med den underordnade komponenten och namnet på fliken."
26205538
2621#. (itstool) path: section/para5539#. (itstool) path: section/para
2622#: C/index-in.docbook:22585540#: C/index-in.docbook:2258
n2623msgid "To discover the currently visible page, use the <methodname>get_current_pn5541msgid ""
>age()</methodname> method. This returns the page number, and then calling <metho 
>dname>get_nth_page()</methodname> with that number will give you a pointer to th 
>e actual child widget." 
5542"To discover the currently visible page, use the "
5543"<methodname>get_current_page()</methodname> method. This returns the page "
5544"number, and then calling <methodname>get_nth_page()</methodname> with that "
5545"number will give you a pointer to the actual child widget."
2624msgstr ""5546msgstr ""
nn5547"Använd metoden <methodname>get_current_page()</methodname> för att avgöra "
5548"vilken sida som är synlig för tillfället. Detta returnerar sidnumret, och "
5549"att sedan anropa <methodname>get_nth_page()</methodname> med det numret "
5550"kommer ge dig en pekare till den faktiska underordnade komponenten."
26255551
2626#. (itstool) path: section/para5552#. (itstool) path: section/para
2627#: C/index-in.docbook:22655553#: C/index-in.docbook:2265
n2628msgid "To programmatically change the selected page, use the <methodname>set_curn5554#, fuzzy
>rent_page()</methodname> method." 
5555msgid ""
5556"To programmatically change the selected page, use the "
5557"<methodname>set_current_page()</methodname> method."
2629msgstr ""5558msgstr ""
nn5559"Använd metoden <methodname>set_current_page()</methodname> för att "
5560"programmatiskt ändra den valda sidan."
26305561
2631#. (itstool) path: section/para5562#. (itstool) path: section/para
2632#: C/index-in.docbook:22705563#: C/index-in.docbook:2270
n2633msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5564msgid ""
>1Notebook.html\">Reference</link>" 
5565"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5566"classGtk_1_1Notebook.html\">Reference</link>"
2634msgstr ""5567msgstr ""
nn5568"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5569"classGtk_1_1Notebook.html\">Referens</link>"
26355570
2636#. (itstool) path: imageobject/imagedata5571#. (itstool) path: imageobject/imagedata
2637#. This is a reference to an external file such as an image or video. When5572#. This is a reference to an external file such as an image or video. When
2638#. the file changes, the md5 hash will change to let you know you need to5573#. the file changes, the md5 hash will change to let you know you need to
2639#. update your localized copy. The msgstr is not used at all. Set it to5574#. update your localized copy. The msgstr is not used at all. Set it to
2640#. whatever you like once you have updated your copy of the file.5575#. whatever you like once you have updated your copy of the file.
2641#: C/index-in.docbook:22785576#: C/index-in.docbook:2278
nn5577#, fuzzy
2642msgctxt "_"5578msgctxt "_"
nn5579msgid ""
2643msgid "external ref='figures/notebook.png' md5='b46c25388d4c250b0ab737f71f82d81b5580"external ref='figures/notebook.png' md5='b46c25388d4c250b0ab737f71f82d81b'"
>'" 
2644msgstr ""5581msgstr ""
nn5582"external ref='figures/notebook.png' md5='b46c25388d4c250b0ab737f71f82d81b'"
26455583
2646#. (itstool) path: section/para5584#. (itstool) path: section/para
2647#: C/index-in.docbook:22825585#: C/index-in.docbook:2282
n2648msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren5586msgid ""
>e/master/examples/book/notebook/\">Source Code</link>" 
5587"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5588"master/examples/book/notebook/\">Source Code</link>"
2649msgstr ""5589msgstr ""
nn5590"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5591"master/examples/book/notebook/\">Källkod</link>"
26505592
2651#. (itstool) path: section/title5593#. (itstool) path: section/title
2652#. (itstool) path: figure/title5594#. (itstool) path: figure/title
n2653#: C/index-in.docbook:2289n5595#: C/index-in.docbook:2289 C/index-in.docbook:2323
2654#: C/index-in.docbook:2323
2655msgid "Assistant"5596msgid "Assistant"
n2656msgstr ""n5597msgstr "Assistant"
26575598
2658#. (itstool) path: note/para5599#. (itstool) path: note/para
2659#: C/index-in.docbook:22915600#: C/index-in.docbook:2291
n2660msgid "<classname>Gtk::Assistant</classname> is deprecated since <application>gtn5601msgid ""
>kmm</application> 4.10. There is no replacement in <application>gtkmm</applicati 
>on>. libadwaita (a C library) has replacement parts (like AdwCarousel). In some  
>cases, a <classname>Gtk::Notebook</classname> might be an acceptable replacement 
>." 
5602"<classname>Gtk::Assistant</classname> is deprecated since "
5603"<application>gtkmm</application> 4.10. There is no replacement in "
5604"<application>gtkmm</application>. libadwaita (a C library) has replacement "
5605"parts (like AdwCarousel). In some cases, a <classname>Gtk::Notebook</"
5606"classname> might be an acceptable replacement."
2661msgstr ""5607msgstr ""
nn5608"<classname>Gtk::Assistant</classname> är föråldrad sedan <application>gtkmm</"
5609"application> 4.10. Det finns ingen ersättning i <application>gtkmm</"
5610"application>. libadwaita (ett C-bibliotek) har ersättningsdelar (som "
5611"AdwCarousel). I vissa fall kan en <classname>Gtk::Notebook</classname> vara "
5612"en acceptabel ersättning."
26625613
2663#. (itstool) path: section/para5614#. (itstool) path: section/para
2664#: C/index-in.docbook:22975615#: C/index-in.docbook:2297
n2665msgid "An <classname>Assistant</classname> splits a complex operation into stepsn5616#, fuzzy
>. Each step is a page, containing a header, a child widget and an action area. T 
>he Assistant's action area has navigation buttons which update automatically dep 
>ending on the type of the page, set with <methodname>set_page_type()</methodname 
>>." 
5617msgid ""
5618"An <classname>Assistant</classname> splits a complex operation into steps. "
5619"Each step is a page, containing a header, a child widget and an action area. "
5620"The Assistant's action area has navigation buttons which update "
5621"automatically depending on the type of the page, set with "
5622"<methodname>set_page_type()</methodname>."
2666msgstr ""5623msgstr ""
nn5624"En <classname>Assistant</classname> delar upp en komplex operation i steg. "
5625"Varje steg är en sida som innehåller en rubrik, en underordnad komponent och "
5626"ett åtgärdsområde. Åtgärdsområdet för denna Assistant har navigeringsknappar "
5627"som uppdaterar sig automatiskt beroende på typen av sida, inställd med "
5628"<methodname>set_page_type()</methodname>."
26675629
2668#. (itstool) path: section/para5630#. (itstool) path: section/para
2669#: C/index-in.docbook:23015631#: C/index-in.docbook:2301
n2670msgid "Use the <methodname>append_page()</methodname>, <methodname>prepend_page<n5632#, fuzzy
>/methodname> and <methodname>insert_page()</methodname> methods to add pages to  
>the <classname>Assistant</classname>, supplying the child widget for each page." 
5633msgid ""
5634"Use the <methodname>append_page()</methodname>, <methodname>prepend_page</"
5635"methodname> and <methodname>insert_page()</methodname> methods to add pages "
5636"to the <classname>Assistant</classname>, supplying the child widget for each "
5637"page."
2671msgstr ""5638msgstr ""
nn5639"Använd metoderna <methodname>append_page()</methodname>, "
5640"<methodname>prepend_page</methodname> och <methodname>insert_page()</"
5641"methodname> för att lägga till sidor till vår <classname>Assistant</"
5642"classname>, med den underordnade komponenten för varje sida."
26725643
2673#. (itstool) path: section/para5644#. (itstool) path: section/para
2674#: C/index-in.docbook:23055645#: C/index-in.docbook:2305
n2675msgid "To determine the currently-visible page, use the <methodname>get_current_n5646#, fuzzy
>page()</methodname> method, and pass the result to <methodname>get_nth_page()</m 
>ethodname>, which returns a pointer to the actual widget. To programmatically ch 
>ange the current page, use the <methodname>set_current_page()</methodname> metho 
>d." 
5647msgid ""
5648"To determine the currently-visible page, use the "
5649"<methodname>get_current_page()</methodname> method, and pass the result to "
5650"<methodname>get_nth_page()</methodname>, which returns a pointer to the "
5651"actual widget. To programmatically change the current page, use the "
5652"<methodname>set_current_page()</methodname> method."
2676msgstr ""5653msgstr ""
nn5654"Använd metoden <methodname>get_current_page()</methodname> för att avgöra "
5655"vilken sida som är synlig för tillfället, och skicka resultatet till "
5656"<methodname>get_nth_page()</methodname> som returnerar en pekare till den "
5657"faktiska underordnade komponenten. Använd metoden "
5658"<methodname>set_current_page()</methodname> för att programmatiskt ändra den "
5659"aktuella sidan."
26775660
2678#. (itstool) path: section/para5661#. (itstool) path: section/para
2679#: C/index-in.docbook:23095662#: C/index-in.docbook:2309
nn5663msgid ""
2680msgid "To set the title of a page, use the <methodname>set_page_title()</methodn5664"To set the title of a page, use the <methodname>set_page_title()</"
>ame> method." 
5665"methodname> method."
2681msgstr ""5666msgstr ""
nn5667"Använd metoden <methodname>set_page_title()</methodname> för att ställa in "
5668"titeln för en sida."
26825669
2683#. (itstool) path: section/para5670#. (itstool) path: section/para
2684#: C/index-in.docbook:23135671#: C/index-in.docbook:2313
n2685msgid "To add widgets to the action area, use the <methodname>add_action_widget(n5672#, fuzzy
>)</methodname> method. They will be packed alongside the default buttons. Use th 
>e <methodname>remove_action_widget()</methodname> method to remove widgets." 
5673msgid ""
5674"To add widgets to the action area, use the <methodname>add_action_widget()</"
5675"methodname> method. They will be packed alongside the default buttons. Use "
5676"the <methodname>remove_action_widget()</methodname> method to remove widgets."
2686msgstr ""5677msgstr ""
nn5678"Använd metoden <methodname>add_action_widget()</methodname> för att lägga "
5679"till komponenter till åtgärdsområdet. De kommer packas bredvid "
5680"standardknapparna. Använd metoden <methodname>remove_action_widget()</"
5681"methodname> för att ta bort komponenter."
26875682
2688#. (itstool) path: section/para5683#. (itstool) path: section/para
2689#: C/index-in.docbook:23175684#: C/index-in.docbook:2317
n2690msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5685msgid ""
>1Assistant.html\">Reference</link>" 
5686"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5687"classGtk_1_1Assistant.html\">Reference</link>"
2691msgstr ""5688msgstr ""
nn5689"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5690"classGtk_1_1Assistant.html\">Referens</link>"
26925691
2693#. (itstool) path: imageobject/imagedata5692#. (itstool) path: imageobject/imagedata
2694#. This is a reference to an external file such as an image or video. When5693#. This is a reference to an external file such as an image or video. When
2695#. the file changes, the md5 hash will change to let you know you need to5694#. the file changes, the md5 hash will change to let you know you need to
2696#. update your localized copy. The msgstr is not used at all. Set it to5695#. update your localized copy. The msgstr is not used at all. Set it to
2697#. whatever you like once you have updated your copy of the file.5696#. whatever you like once you have updated your copy of the file.
2698#: C/index-in.docbook:23255697#: C/index-in.docbook:2325
nn5698#, fuzzy
2699msgctxt "_"5699msgctxt "_"
nn5700msgid ""
2700msgid "external ref='figures/assistant.png' md5='14f588bf7a1dde5e329e5478efe3ae35701"external ref='figures/assistant.png' md5='14f588bf7a1dde5e329e5478efe3ae3f'"
>f'" 
2701msgstr ""5702msgstr ""
nn5703"external ref='figures/assistant.png' md5='14f588bf7a1dde5e329e5478efe3ae3f'"
27025704
2703#. (itstool) path: section/para5705#. (itstool) path: section/para
2704#: C/index-in.docbook:23295706#: C/index-in.docbook:2329
n2705msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren5707msgid ""
>e/master/examples/book/assistant/\">Source Code</link>" 
5708"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5709"master/examples/book/assistant/\">Source Code</link>"
2706msgstr ""5710msgstr ""
nn5711"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5712"master/examples/book/assistant/\">Källkod</link>"
27075713
2708#. (itstool) path: section/title5714#. (itstool) path: section/title
2709#: C/index-in.docbook:23365715#: C/index-in.docbook:2336
2710msgid "Other Multi-item Containers"5716msgid "Other Multi-item Containers"
n2711msgstr ""n5717msgstr "Andra flerobjektsbehållare"
27125718
2713#. (itstool) path: section/para5719#. (itstool) path: section/para
2714#: C/index-in.docbook:23385720#: C/index-in.docbook:2338
n2715msgid "There are other multi-item containers. See the reference documentation fon5721msgid ""
>r a complete list. Here are links to some example programs that show containers, 
> which are not mentioned elsewhere in this tutorial." 
5722"There are other multi-item containers. See the reference documentation for a "
5723"complete list. Here are links to some example programs that show containers, "
5724"which are not mentioned elsewhere in this tutorial."
2716msgstr ""5725msgstr ""
nn5726"Det finns andra flerobjektsbehållare. Se referensdokumentationen för en "
5727"fullständig lista. Här är länkar till några exempelprogram som visar "
5728"behållare som inte nämns någon annanstans i denna handledning."
27175729
2718#. (itstool) path: section/para5730#. (itstool) path: section/para
2719#: C/index-in.docbook:23445731#: C/index-in.docbook:2344
n2720msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren5732msgid ""
>e/master/examples/book/actionbar\">Source Code, ActionBar</link>" 
5733"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5734"master/examples/book/actionbar\">Source Code, ActionBar</link>"
2721msgstr ""5735msgstr ""
nn5736"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5737"master/examples/book/actionbar\">Källkod, ActionBar</link>"
27225738
2723#. (itstool) path: section/para5739#. (itstool) path: section/para
2724#: C/index-in.docbook:23455740#: C/index-in.docbook:2345
n2725msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren5741msgid ""
>e/master/examples/book/listbox_flowbox/flowbox\">Source Code, FlowBox</link>" 
5742"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5743"master/examples/book/listbox_flowbox/flowbox\">Source Code, FlowBox</link>"
2726msgstr ""5744msgstr ""
nn5745"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5746"master/examples/book/listbox_flowbox/flowbox\">Källkod, FlowBox</link>"
27275747
2728#. (itstool) path: chapter/title5748#. (itstool) path: chapter/title
2729#: C/index-in.docbook:23525749#: C/index-in.docbook:2352
2730msgid "ListView, GridView, ColumnView"5750msgid "ListView, GridView, ColumnView"
2731msgstr ""5751msgstr ""
27325752
2733#. (itstool) path: chapter/para5753#. (itstool) path: chapter/para
2734#: C/index-in.docbook:23545754#: C/index-in.docbook:2354
n2735msgid "Lists are intended to be used whenever developers want to display many obn5755msgid ""
>jects in roughly the same way. They are perfectly fine to be used for very short 
> lists of only 2 or 3 items, but generally scale fine to thousands of items." 
5756"Lists are intended to be used whenever developers want to display many "
5757"objects in roughly the same way. They are perfectly fine to be used for very "
5758"short lists of only 2 or 3 items, but generally scale fine to thousands of "
5759"items."
2736msgstr ""5760msgstr ""
27375761
2738#. (itstool) path: chapter/para5762#. (itstool) path: chapter/para
2739#: C/index-in.docbook:23605763#: C/index-in.docbook:2360
n2740msgid "Lists are meant to be used with changing data, both with the items themsen5764msgid ""
>lves changing as well as the list adding and removing items. Of course, they wor 
>k just as well with static data." 
5765"Lists are meant to be used with changing data, both with the items "
5766"themselves changing as well as the list adding and removing items. Of "
5767"course, they work just as well with static data."
2741msgstr ""5768msgstr ""
27425769
2743#. (itstool) path: chapter/para5770#. (itstool) path: chapter/para
2744#: C/index-in.docbook:23665771#: C/index-in.docbook:2366
n2745msgid "The <link xlink:href=\"https://docs.gtk.org/gtk4/section-list-widget.htmln5772#, fuzzy
>\">List Widget Overview</link> chapter in the GTK documentation contains more in 
>formation about list widgets." 
5773msgid ""
5774"The <link xlink:href=\"https://docs.gtk.org/gtk4/section-list-widget."
5775"html\">List Widget Overview</link> chapter in the GTK documentation contains "
5776"more information about list widgets."
2746msgstr ""5777msgstr ""
nn5778"Kapitlet <link xlink:href=\"https://docs.gtk.org/gtk4/input-handling."
5779"html\">Input Handling</link> i GTK-dokumentationen beskriver hantering av "
5780"användarinmatning mer detaljerat."
27475781
2748#. (itstool) path: chapter/para5782#. (itstool) path: chapter/para
2749#: C/index-in.docbook:23715783#: C/index-in.docbook:2371
n2750msgid "Some examples are shown in this chapter. There are more examples in the <n5784#, fuzzy
>link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/master 
>/examples/book/listmodelviews/\">listmodelviews directory</link> in <application 
>>gtkmm-documentation</application>'s examples." 
5785#| msgid ""
5786#| "Some <classname>TreeView</classname> examples are shown here. There are "
5787#| "more examples in the <link xlink:href=\"https://gitlab.gnome.org/GNOME/"
5788#| "gtkmm-documentation/tree/master/examples/book/treeview/\">treeview "
5789#| "directory</link> in <application>gtkmm-documentation</application>'s "
5790#| "examples."
5791msgid ""
5792"Some examples are shown in this chapter. There are more examples in the "
5793"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
5794"master/examples/book/listmodelviews/\">listmodelviews directory</link> in "
5795"<application>gtkmm-documentation</application>'s examples."
2751msgstr ""5796msgstr ""
nn5797"Några <classname>TreeView</classname>-exempel visas här. Det finns mer "
5798"exempel i <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-"
5799"documentation/tree/master/examples/book/treeview/\">treeview-katalogen</"
5800"link> i <application>gtkmm-documentation</application>s exempel."
27525801
2753#. (itstool) path: section/title5802#. (itstool) path: section/title
2754#: C/index-in.docbook:23775803#: C/index-in.docbook:2377
nn5804#, fuzzy
5805#| msgid "The Model"
2755msgid "The Data Model"5806msgid "The Data Model"
n2756msgstr ""n5807msgstr "Modellen"
27575808
2758#. (itstool) path: section/para5809#. (itstool) path: section/para
2759#: C/index-in.docbook:23795810#: C/index-in.docbook:2379
n2760msgid "The data model is a class that implements the <classname>Gio::ListModel</n5811msgid ""
>classname> interface. Examples of such classes are <classname>Gio::ListStore</cl 
>assname> (not to be confused with the deprecated <classname>Gtk::ListStore</clas 
>sname>), <classname>Gtk:StringList</classname>, <classname>Gtk:DirectoryList</cl 
>assname> and <classname>Pango::FontMap</classname>." 
5812"The data model is a class that implements the <classname>Gio::ListModel</"
5813"classname> interface. Examples of such classes are <classname>Gio::"
5814"ListStore</classname> (not to be confused with the deprecated "
5815"<classname>Gtk::ListStore</classname>), <classname>Gtk:StringList</"
5816"classname>, <classname>Gtk:DirectoryList</classname> and <classname>Pango::"
5817"FontMap</classname>."
2761msgstr ""5818msgstr ""
27625819
2763#. (itstool) path: section/para5820#. (itstool) path: section/para
2764#: C/index-in.docbook:23875821#: C/index-in.docbook:2387
n2765msgid "The elements in a model are called <emphasis>items</emphasis>. All items n5822#, fuzzy
>are instances of a subclass of <classname>Glib::Object</classname>. For instance 
>, you might have a <classname>ColumnView</classname> with one integer and one te 
>xt column, like so:" 
5823msgid ""
5824"The elements in a model are called <emphasis>items</emphasis>. All items are "
5825"instances of a subclass of <classname>Glib::Object</classname>. For "
5826"instance, you might have a <classname>ColumnView</classname> with one "
5827"integer and one text column, like so:"
2766msgstr ""5828msgstr ""
nn5829"Modellen för en <classname>DropDown</classname> kan definieras och fyllas i "
5830"exakt som för en <classname>ListView</classname> eller en "
5831"<classname>ColumnView</classname>. Den måste vara en underklass till "
5832"<classname>Glib::Object</classname>. Exempelvis kan du ha en "
5833"<classname>DropDown</classname> med ett heltal och en textkolumn, så här:"
27675834
2768#. (itstool) path: section/programlisting5835#. (itstool) path: section/programlisting
n2769#: C/index-in.docbook:2393n5836#: C/index-in.docbook:2393 C/index-in.docbook:3391
2770#: C/index-in.docbook:33915837#, fuzzy, no-wrap
2771#, no-wrap5838#| msgid ""
5839#| "class ModelColumns : public Glib::Object\n"
5840#| "{\n"
5841#| "public:\n"
5842#| "  int m_col_id;\n"
5843#| "  Glib::ustring m_col_name;\n"
5844#| "\n"
5845#| "  static Glib::RefPtr&lt;ModelColumns&gt; create(\n"
5846#| "    int col_id, const Glib::ustring&amp; col_name)\n"
5847#| "  {\n"
5848#| "    return Glib::make_refptr_for_instance&lt;ModelColumns&gt;(\n"
5849#| "      new ModelColumns(col_id, col_name));\n"
5850#| "  }\n"
5851#| "\n"
5852#| "protected:\n"
5853#| "  ModelColumns(int col_id, const Glib::ustring&amp; col_name)\n"
5854#| "  : m_col_id(col_id), m_col_name(col_name)\n"
5855#| "  {}\n"
5856#| "};\n"
5857#| "\n"
5858#| "Glib::RefPtr&lt;Gio::ListStore&lt;ModelColumns&gt;&gt; m_ListStore;\n"
2772msgid ""5859msgid ""
2773"<code>class ModelColumns : public Glib::Object\n"5860"<code>class ModelColumns : public Glib::Object\n"
2774"{\n"5861"{\n"
2775"public:\n"5862"public:\n"
2776"  int m_col_id;\n"5863"  int m_col_id;\n"
2790"};\n"5877"};\n"
2791"\n"5878"\n"
2792"Glib::RefPtr&lt;Gio::ListStore&lt;ModelColumns&gt;&gt; m_ListStore;\n"5879"Glib::RefPtr&lt;Gio::ListStore&lt;ModelColumns&gt;&gt; m_ListStore;\n"
2793"</code>"5880"</code>"
2794msgstr ""5881msgstr ""
nn5882"class ModelColumns : public Glib::Object\n"
5883"{\n"
5884"public:\n"
5885"  int m_col_id;\n"
5886"  Glib::ustring m_col_name;\n"
5887"\n"
5888"  static Glib::RefPtr&lt;ModelColumns&gt; create(\n"
5889"    int col_id, const Glib::ustring&amp; col_name)\n"
5890"  {\n"
5891"    return Glib::make_refptr_for_instance&lt;ModelColumns&gt;(\n"
5892"      new ModelColumns(col_id, col_name));\n"
5893"  }\n"
5894"\n"
5895"protected:\n"
5896"  ModelColumns(int col_id, const Glib::ustring&amp; col_name)\n"
5897"  : m_col_id(col_id), m_col_name(col_name)\n"
5898"  {}\n"
5899"};\n"
5900"\n"
5901"Glib::RefPtr&lt;Gio::ListStore&lt;ModelColumns&gt;&gt; m_ListStore;\n"
27955902
2796#. (itstool) path: section/para5903#. (itstool) path: section/para
2797#: C/index-in.docbook:24155904#: C/index-in.docbook:2415
n2798msgid "Every item in a model has a position which is the unsigned integer that dn5905msgid ""
>escribes where in the model the item is located. The first item in a model is at 
> position 0. The position of an item can of course change as other items are add 
>ed to or removed from the model." 
5906"Every item in a model has a position which is the unsigned integer that "
5907"describes where in the model the item is located. The first item in a model "
5908"is at position 0. The position of an item can of course change as other "
5909"items are added to or removed from the model."
2799msgstr ""5910msgstr ""
28005911
2801#. (itstool) path: section/para5912#. (itstool) path: section/para
2802#: C/index-in.docbook:24215913#: C/index-in.docbook:2421
n2803msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/classGio_1n5914#, fuzzy
>_1ListStore.html\">Gio::ListStore Reference</link>" 
5915#| msgid ""
5916#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
5917#| "classGio_1_1Resource.html\">Gio::Resource Reference</link>"
5918msgid ""
5919"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
5920"classGio_1_1ListStore.html\">Gio::ListStore Reference</link>"
2804msgstr ""5921msgstr ""
nn5922"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
5923"classGio_1_1Resource.html\">Referens för Gio::Resource</link>"
28055924
2806#. (itstool) path: section/para5925#. (itstool) path: section/para
2807#: C/index-in.docbook:24225926#: C/index-in.docbook:2422
n2808msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5927#, fuzzy
>1StringList.html\">StringList Reference</link>" 
5928#| msgid ""
5929#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5930#| "classGtk_1_1Widget.html\">Widget Reference</link>"
5931msgid ""
5932"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5933"classGtk_1_1StringList.html\">StringList Reference</link>"
2809msgstr ""5934msgstr ""
nn5935"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5936"classGtk_1_1Widget.html\">Widget-referens</link>"
28105937
2811#. (itstool) path: section/para5938#. (itstool) path: section/para
2812#: C/index-in.docbook:24235939#: C/index-in.docbook:2423
n2813msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5940#, fuzzy
>1DirectoryList.html\">DirectoryList Reference</link>" 
5941#| msgid ""
5942#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5943#| "classGtk_1_1Widget.html\">Widget Reference</link>"
5944msgid ""
5945"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5946"classGtk_1_1DirectoryList.html\">DirectoryList Reference</link>"
2814msgstr ""5947msgstr ""
nn5948"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5949"classGtk_1_1Widget.html\">Widget-referens</link>"
28155950
2816#. (itstool) path: section/title5951#. (itstool) path: section/title
2817#: C/index-in.docbook:24275952#: C/index-in.docbook:2427
nn5953#, fuzzy
2818msgid "The Selection Model"5954msgid "The Selection Model"
n2819msgstr ""n5955msgstr "Selection"
28205956
2821#. (itstool) path: section/para5957#. (itstool) path: section/para
2822#: C/index-in.docbook:24295958#: C/index-in.docbook:2429
n2823msgid "The selection model is a class that implements the <classname>Gtk::Selectn5959#, fuzzy
>ionModel</classname> interface. You can choose between <classname>NoSelection</c 
>lassname>, <classname>SingleSelection</classname> and <classname>MultiSelection< 
>/classname>." 
5960#| msgid ""
5961#| "If you use an <classname>Gtk::ApplicationWindow</classname>, you don't "
5962#| "have to create your own action group. <classname>Gio::ActionGroup</"
5963#| "classname> and <classname>Gio::ActionMap</classname> are base classes of "
5964#| "<classname>Gtk::ApplicationWindow</classname>."
5965msgid ""
5966"The selection model is a class that implements the <classname>Gtk::"
5967"SelectionModel</classname> interface. You can choose between "
5968"<classname>NoSelection</classname>, <classname>SingleSelection</classname> "
5969"and <classname>MultiSelection</classname>."
2824msgstr ""5970msgstr ""
nn5971"Om du använder ett <classname>Gtk::ApplicationWindow</classname> behöver du "
5972"inte skapa din egen åtgärdsgrupp. <classname>Gio::ActionGroup</classname> "
5973"och <classname>Gio::ActionMap</classname> är basklasser för <classname>Gtk::"
5974"ApplicationWindow</classname>."
28255975
2826#. (itstool) path: section/para5976#. (itstool) path: section/para
2827#: C/index-in.docbook:24345977#: C/index-in.docbook:2434
n2828msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5978#, fuzzy
>1NoSelection.html\">NoSelection Reference</link>" 
5979#| msgid ""
5980#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5981#| "classGtk_1_1Tooltip.html\">Tooltip Reference</link>"
5982msgid ""
5983"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5984"classGtk_1_1NoSelection.html\">NoSelection Reference</link>"
2829msgstr ""5985msgstr ""
nn5986"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5987"classGtk_1_1Tooltip.html\">Tooltip-referens</link>"
28305988
2831#. (itstool) path: section/para5989#. (itstool) path: section/para
2832#: C/index-in.docbook:24355990#: C/index-in.docbook:2435
n2833msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n5991#, fuzzy
>1SingleSelection.html\">SingleSelection Reference</link>" 
5992#| msgid ""
5993#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5994#| "classGtk_1_1Widget.html\">Widget Reference</link>"
5995msgid ""
5996"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
5997"classGtk_1_1SingleSelection.html\">SingleSelection Reference</link>"
2834msgstr ""5998msgstr ""
nn5999"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6000"classGtk_1_1Widget.html\">Widget-referens</link>"
28356001
2836#. (itstool) path: section/para6002#. (itstool) path: section/para
2837#: C/index-in.docbook:24366003#: C/index-in.docbook:2436
n2838msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6004#, fuzzy
>1MultiSelection.html\">MultiSelection Reference</link>" 
6005#| msgid ""
6006#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6007#| "classGtk_1_1Application.html\">Gtk::Application Reference</link>"
6008msgid ""
6009"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6010"classGtk_1_1MultiSelection.html\">MultiSelection Reference</link>"
2839msgstr ""6011msgstr ""
nn6012"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6013"classGtk_1_1Application.html\">Referens för Gtk::Application</link>"
28406014
2841#. (itstool) path: section/title6015#. (itstool) path: section/title
2842#: C/index-in.docbook:24406016#: C/index-in.docbook:2440
nn6017#, fuzzy
2843msgid "The Factory"6018msgid "The Factory"
n2844msgstr ""n6019msgstr "Inmatningen"
28456020
2846#. (itstool) path: section/para6021#. (itstool) path: section/para
2847#: C/index-in.docbook:24426022#: C/index-in.docbook:2442
n2848msgid "Data from the data model is added to the view by a factory, which is a sun6023msgid ""
>bclass of <classname>ListItemFactory</classname>. There is only one such subclas 
>s in <application>gtkmm</application>, <classname>SignalListItemFactory</classna 
>me>. Data from the model is added to the view with signal handlers connected to  
>a <classname>SignalListItemFactory</classname>." 
6024"Data from the data model is added to the view by a factory, which is a "
6025"subclass of <classname>ListItemFactory</classname>. There is only one such "
6026"subclass in <application>gtkmm</application>, "
6027"<classname>SignalListItemFactory</classname>. Data from the model is added "
6028"to the view with signal handlers connected to a "
6029"<classname>SignalListItemFactory</classname>."
2849msgstr ""6030msgstr ""
28506031
2851#. (itstool) path: section/para6032#. (itstool) path: section/para
2852#: C/index-in.docbook:24486033#: C/index-in.docbook:2448
n2853msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6034#, fuzzy
>1SignalListItemFactory.html\">SignalListItemFactory Reference</link>" 
6035#| msgid ""
6036#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6037#| "classGtk_1_1Widget.html\">Widget Reference</link>"
6038msgid ""
6039"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6040"classGtk_1_1SignalListItemFactory.html\">SignalListItemFactory Reference</"
6041"link>"
2854msgstr ""6042msgstr ""
nn6043"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6044"classGtk_1_1Widget.html\">Widget-referens</link>"
28556045
2856#. (itstool) path: section/title6046#. (itstool) path: section/title
n2857#: C/index-in.docbook:2452n6047#: C/index-in.docbook:2452 C/index-in.docbook:2823 C/index-in.docbook:3872
2858#: C/index-in.docbook:28236048#, fuzzy
2859#: C/index-in.docbook:3872
2860msgid "The View"6049msgid "The View"
n2861msgstr ""n6050msgstr "View"
28626051
2863#. (itstool) path: section/para6052#. (itstool) path: section/para
2864#: C/index-in.docbook:24546053#: C/index-in.docbook:2454
n2865msgid "The View is the widget that displays the model data and allows the user tn6054#, fuzzy
>o interact with it. The View can show all of the model's columns, or just some,  
>and it can show them in various ways." 
6055msgid ""
6056"The View is the widget that displays the model data and allows the user to "
6057"interact with it. The View can show all of the model's columns, or just "
6058"some, and it can show them in various ways."
2866msgstr ""6059msgstr ""
nn6060"Vyn är den faktiska komponenten (<classname>Gtk::TreeView</classname>) som "
6061"visar data för modellen (<classname>Gtk::TreeModel</classname>) och låter "
6062"användaren interagera med dem. Vyn kan visa alla modellens kolumner, eller "
6063"bara några, och den kan visa dem på olika sätt."
28676064
2868#. (itstool) path: section/para6065#. (itstool) path: section/para
2869#: C/index-in.docbook:24606066#: C/index-in.docbook:2460
n2870msgid "An important requirement for views (especially views of long lists) is thn6067msgid ""
>at they need to know which items are not visible so they can be recycled. Views  
>achieve that by implementing the <classname>Scrollable</classname> interface and 
> expecting to be placed directly into a <classname>ScrolledWindow</classname>." 
6068"An important requirement for views (especially views of long lists) is that "
6069"they need to know which items are not visible so they can be recycled. Views "
6070"achieve that by implementing the <classname>Scrollable</classname> interface "
6071"and expecting to be placed directly into a <classname>ScrolledWindow</"
6072"classname>."
2871msgstr ""6073msgstr ""
28726074
2873#. (itstool) path: section/para6075#. (itstool) path: section/para
2874#: C/index-in.docbook:24676076#: C/index-in.docbook:2467
2875msgid "There are different view widgets to choose from."6077msgid "There are different view widgets to choose from."
2876msgstr ""6078msgstr ""
28776079
2878#. (itstool) path: section/title6080#. (itstool) path: section/title
2879#. (itstool) path: figure/title6081#. (itstool) path: figure/title
n2880#: C/index-in.docbook:2472n6082#: C/index-in.docbook:2472 C/index-in.docbook:2484
2881#: C/index-in.docbook:24846083#, fuzzy
6084#| msgid "TextView"
2882msgid "ListView"6085msgid "ListView"
n2883msgstr ""n6086msgstr "TextView"
28846087
2885#. (itstool) path: section/para6088#. (itstool) path: section/para
2886#: C/index-in.docbook:24746089#: C/index-in.docbook:2474
nn6090#, fuzzy
6091#| msgid ""
6092#| "The <classname>Gtk::TreeView</classname> widget can contain lists or "
6093#| "trees of data, in columns."
6094msgid ""
2887msgid "The <classname>ListView</classname> shows a 1-dimensional list with one c6095"The <classname>ListView</classname> shows a 1-dimensional list with one "
>olumn." 
6096"column."
2888msgstr ""6097msgstr ""
nn6098"Komponenten <classname>Gtk::TreeView</classname> kan innehålla listor eller "
6099"träd med data i kolumner."
28896100
2890#. (itstool) path: section/para6101#. (itstool) path: section/para
2891#: C/index-in.docbook:24786102#: C/index-in.docbook:2478
n2892msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6103#, fuzzy
>1ListView.html\">Reference</link>" 
6104#| msgid ""
6105#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6106#| "classGtk_1_1TextView.html\">Reference</link>"
6107msgid ""
6108"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6109"classGtk_1_1ListView.html\">Reference</link>"
2893msgstr ""6110msgstr ""
nn6111"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6112"classGtk_1_1TextView.html\">Referens</link>"
28946113
2895#. (itstool) path: imageobject/imagedata6114#. (itstool) path: imageobject/imagedata
2896#. This is a reference to an external file such as an image or video. When6115#. This is a reference to an external file such as an image or video. When
2897#. the file changes, the md5 hash will change to let you know you need to6116#. the file changes, the md5 hash will change to let you know you need to
2898#. update your localized copy. The msgstr is not used at all. Set it to6117#. update your localized copy. The msgstr is not used at all. Set it to
2899#. whatever you like once you have updated your copy of the file.6118#. whatever you like once you have updated your copy of the file.
2900#: C/index-in.docbook:24866119#: C/index-in.docbook:2486
nn6120#, fuzzy
2901msgctxt "_"6121msgctxt "_"
n2902msgid "external ref='figures/listmodel_listview.png' md5='5e49d159f43fdc52429987n6122msgid ""
>13bdedafc8'" 
6123"external ref='figures/listmodel_listview.png' "
6124"md5='5e49d159f43fdc5242998713bdedafc8'"
2903msgstr ""6125msgstr ""
nn6126"external ref='figures/textview.png' md5='451e30f66cc32c4231bb6bc442cf0d2f'"
29046127
2905#. (itstool) path: section/para6128#. (itstool) path: section/para
2906#: C/index-in.docbook:24906129#: C/index-in.docbook:2490
n2907msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren6130#, fuzzy
>e/master/examples/book/listmodelviews/list_listview\">Source Code</link>" 
6131#| msgid ""
6132#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
6133#| "tree/master/examples/book/listmodelviews/gridview\">Source Code, "
6134#| "GridView</link>"
6135msgid ""
6136"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6137"master/examples/book/listmodelviews/list_listview\">Source Code</link>"
2908msgstr ""6138msgstr ""
nn6139"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6140"master/examples/book/listmodelviews/gridview\">Källkod, GridView</link>"
29096141
2910#. (itstool) path: section/title6142#. (itstool) path: section/title
2911#. (itstool) path: figure/title6143#. (itstool) path: figure/title
n2912#: C/index-in.docbook:2496n6144#: C/index-in.docbook:2496 C/index-in.docbook:2508
2913#: C/index-in.docbook:25086145#, fuzzy
6146#| msgid "Grid"
2914msgid "GridView"6147msgid "GridView"
n2915msgstr ""n6148msgstr "Grid"
29166149
2917#. (itstool) path: section/para6150#. (itstool) path: section/para
2918#: C/index-in.docbook:24986151#: C/index-in.docbook:2498
nn6152#, fuzzy
6153#| msgid "The <classname>Tag</classname> class has many other properties."
2919msgid "The <classname>GridView</classname> shows a 2-dimensional grid."6154msgid "The <classname>GridView</classname> shows a 2-dimensional grid."
n2920msgstr ""n6155msgstr "Klassen <classname>Tag</classname> har många andra egenskaper."
29216156
2922#. (itstool) path: section/para6157#. (itstool) path: section/para
2923#: C/index-in.docbook:25026158#: C/index-in.docbook:2502
n2924msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6159#, fuzzy
>1GridView.html\">Reference</link>" 
6160#| msgid ""
6161#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6162#| "classGtk_1_1Grid.html\">Reference</link>"
6163msgid ""
6164"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6165"classGtk_1_1GridView.html\">Reference</link>"
2925msgstr ""6166msgstr ""
nn6167"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6168"classGtk_1_1Grid.html\">Referens</link>"
29266169
2927#. (itstool) path: imageobject/imagedata6170#. (itstool) path: imageobject/imagedata
2928#. This is a reference to an external file such as an image or video. When6171#. This is a reference to an external file such as an image or video. When
2929#. the file changes, the md5 hash will change to let you know you need to6172#. the file changes, the md5 hash will change to let you know you need to
2930#. update your localized copy. The msgstr is not used at all. Set it to6173#. update your localized copy. The msgstr is not used at all. Set it to
2931#. whatever you like once you have updated your copy of the file.6174#. whatever you like once you have updated your copy of the file.
2932#: C/index-in.docbook:25106175#: C/index-in.docbook:2510
nn6176#, fuzzy
2933msgctxt "_"6177msgctxt "_"
n2934msgid "external ref='figures/listmodel_gridview.png' md5='0d87e962deacc452f32513n6178msgid ""
>f0d5e07e04'" 
6179"external ref='figures/listmodel_gridview.png' "
6180"md5='0d87e962deacc452f32513f0d5e07e04'"
2935msgstr ""6181msgstr ""
nn6182"external ref='figures/treeview_list.png' "
6183"md5='60e5e4ecb284d0cdc53373fe0ec858ee'"
29366184
2937#. (itstool) path: section/para6185#. (itstool) path: section/para
2938#: C/index-in.docbook:25146186#: C/index-in.docbook:2514
n2939msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren6187#, fuzzy
>e/master/examples/book/listmodelviews/gridview\">Source Code</link>" 
6188#| msgid ""
6189#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
6190#| "tree/master/examples/book/listmodelviews/gridview\">Source Code, "
6191#| "GridView</link>"
6192msgid ""
6193"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6194"master/examples/book/listmodelviews/gridview\">Source Code</link>"
2940msgstr ""6195msgstr ""
nn6196"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6197"master/examples/book/listmodelviews/gridview\">Källkod, GridView</link>"
29416198
2942#. (itstool) path: section/title6199#. (itstool) path: section/title
2943#. (itstool) path: figure/title6200#. (itstool) path: figure/title
n2944#: C/index-in.docbook:2520n6201#: C/index-in.docbook:2520 C/index-in.docbook:2532
2945#: C/index-in.docbook:2532
2946msgid "ColumnView"6202msgid "ColumnView"
2947msgstr ""6203msgstr ""
29486204
2949#. (itstool) path: section/para6205#. (itstool) path: section/para
2950#: C/index-in.docbook:25226206#: C/index-in.docbook:2522
nn6207#, fuzzy
6208#| msgid ""
6209#| "The <classname>Gtk::TreeView</classname> widget can contain lists or "
6210#| "trees of data, in columns."
6211msgid ""
2951msgid "The <classname>ColumnView</classname> shows a 1-dimensional list with one6212"The <classname>ColumnView</classname> shows a 1-dimensional list with one or "
> or more columns." 
6213"more columns."
2952msgstr ""6214msgstr ""
nn6215"Komponenten <classname>Gtk::TreeView</classname> kan innehålla listor eller "
6216"träd med data i kolumner."
29536217
2954#. (itstool) path: section/para6218#. (itstool) path: section/para
2955#: C/index-in.docbook:25266219#: C/index-in.docbook:2526
n2956msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6220#, fuzzy
>1ColumnView.html\">Reference</link>" 
6221#| msgid ""
6222#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6223#| "classGtk_1_1TreeView.html\">Reference</link>"
6224msgid ""
6225"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6226"classGtk_1_1ColumnView.html\">Reference</link>"
2957msgstr ""6227msgstr ""
nn6228"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6229"classGtk_1_1TreeView.html\">Referens</link>"
29586230
2959#. (itstool) path: imageobject/imagedata6231#. (itstool) path: imageobject/imagedata
2960#. This is a reference to an external file such as an image or video. When6232#. This is a reference to an external file such as an image or video. When
2961#. the file changes, the md5 hash will change to let you know you need to6233#. the file changes, the md5 hash will change to let you know you need to
2962#. update your localized copy. The msgstr is not used at all. Set it to6234#. update your localized copy. The msgstr is not used at all. Set it to
2963#. whatever you like once you have updated your copy of the file.6235#. whatever you like once you have updated your copy of the file.
2964#: C/index-in.docbook:25346236#: C/index-in.docbook:2534
nn6237#, fuzzy
2965msgctxt "_"6238msgctxt "_"
n2966msgid "external ref='figures/listmodel_columnview.png' md5='fd8445f1904773397a72n6239msgid ""
>52bf843e2c38'" 
6240"external ref='figures/listmodel_columnview.png' "
6241"md5='fd8445f1904773397a7252bf843e2c38'"
2967msgstr ""6242msgstr ""
nn6243"external ref='figures/aspectframe.png' md5='9d8aac9521789ed27036a97a22fedece'"
29686244
2969#. (itstool) path: section/para6245#. (itstool) path: section/para
2970#: C/index-in.docbook:25386246#: C/index-in.docbook:2538
n2971msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren6247#, fuzzy
>e/master/examples/book/listmodelviews/list_columnview\">Source Code</link>" 
6248#| msgid ""
6249#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
6250#| "tree/master/examples/book/listmodelviews/gridview\">Source Code, "
6251#| "GridView</link>"
6252msgid ""
6253"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6254"master/examples/book/listmodelviews/list_columnview\">Source Code</link>"
2972msgstr ""6255msgstr ""
nn6256"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6257"master/examples/book/listmodelviews/gridview\">Källkod, GridView</link>"
29736258
2974#. (itstool) path: section/title6259#. (itstool) path: section/title
n2975#: C/index-in.docbook:2545n6260#: C/index-in.docbook:2545 C/index-in.docbook:3139
2976#: C/index-in.docbook:3139
2977msgid "Sorting"6261msgid "Sorting"
n2978msgstr ""n6262msgstr "Sortering"
29796263
2980#. (itstool) path: section/para6264#. (itstool) path: section/para
2981#: C/index-in.docbook:25476265#: C/index-in.docbook:2547
n2982msgid "The list can be sorted by wrapping it in a <classname>SortListModel</clasn6266msgid ""
>sname>. There are two ways to do this." 
6267"The list can be sorted by wrapping it in a <classname>SortListModel</"
6268"classname>. There are two ways to do this."
2983msgstr ""6269msgstr ""
29846270
2985#. (itstool) path: listitem/para6271#. (itstool) path: listitem/para
2986#: C/index-in.docbook:25526272#: C/index-in.docbook:2552
n2987msgid "In a <classname>ColumnView</classname>, get the <classname>ColumnViewSortn6273msgid ""
>er</classname> from the <classname>ColumnView</classname> and set it to the <cla 
>ssname>SortListModel</classname>. Set a <classname>Sorter</classname> to each <c 
>lassname>ColumnViewColumn</classname>. Then the user of your app can sort the it 
>ems by clicking on a column heading." 
6274"In a <classname>ColumnView</classname>, get the <classname>ColumnViewSorter</"
6275"classname> from the <classname>ColumnView</classname> and set it to the "
6276"<classname>SortListModel</classname>. Set a <classname>Sorter</classname> to "
6277"each <classname>ColumnViewColumn</classname>. Then the user of your app can "
6278"sort the items by clicking on a column heading."
2988msgstr ""6279msgstr ""
29896280
2990#. (itstool) path: listitem/para6281#. (itstool) path: listitem/para
2991#: C/index-in.docbook:25576282#: C/index-in.docbook:2557
n2992msgid "In any view, set a <classname>Sorter</classname> such as a <classname>Strn6283#, fuzzy
>ingSorter</classname> or a <classname>NumericSorter</classname> to the <classnam 
>e>SortListModel</classname>." 
6284#| msgid ""
6285#| "As mentioned above, each <classname>TextView</classname> has a "
6286#| "<classname>TextBuffer</classname>, and one or more <classname>TextView</"
6287#| "classname>s can share the same <classname>TextBuffer</classname>."
6288msgid ""
6289"In any view, set a <classname>Sorter</classname> such as a "
6290"<classname>StringSorter</classname> or a <classname>NumericSorter</"
6291"classname> to the <classname>SortListModel</classname>."
2993msgstr ""6292msgstr ""
nn6293"Som nämns ovan har varje <classname>TextView</classname> en "
6294"<classname>TextBuffer</classname>, och en eller flera <classname>TextView</"
6295"classname> kan dela på samma <classname>TextBuffer</classname>."
29946296
2995#. (itstool) path: section/para6297#. (itstool) path: section/para
2996#: C/index-in.docbook:25626298#: C/index-in.docbook:2562
n2997msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6299#, fuzzy
>1SortListModel.html\">SortListModel Reference</link>" 
6300#| msgid ""
6301#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6302#| "classGtk_1_1TreeModel.html\">Reference</link>"
6303msgid ""
6304"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6305"classGtk_1_1SortListModel.html\">SortListModel Reference</link>"
2998msgstr ""6306msgstr ""
nn6307"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6308"classGtk_1_1TreeModel.html\">Referens</link>"
29996309
3000#. (itstool) path: section/para6310#. (itstool) path: section/para
3001#: C/index-in.docbook:25636311#: C/index-in.docbook:2563
n3002msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6312#, fuzzy
>1StringSorter.html\">StringSorter Reference</link>" 
6313#| msgid ""
6314#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6315#| "classGtk_1_1TreeSortable.html\">TreeSortable Reference</link>"
6316msgid ""
6317"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6318"classGtk_1_1StringSorter.html\">StringSorter Reference</link>"
3003msgstr ""6319msgstr ""
nn6320"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6321"classGtk_1_1TreeSortable.html\">Referens för TreeSortable</link>"
30046322
3005#. (itstool) path: section/para6323#. (itstool) path: section/para
3006#: C/index-in.docbook:25646324#: C/index-in.docbook:2564
n3007msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6325#, fuzzy
>1NumericSorter.html\">NumericSorter Reference</link>" 
6326#| msgid ""
6327#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6328#| "classGtk_1_1TreeSortable.html\">TreeSortable Reference</link>"
6329msgid ""
6330"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6331"classGtk_1_1NumericSorter.html\">NumericSorter Reference</link>"
3008msgstr ""6332msgstr ""
nn6333"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6334"classGtk_1_1TreeSortable.html\">Referens för TreeSortable</link>"
30096335
3010#. (itstool) path: figure/title6336#. (itstool) path: figure/title
3011#: C/index-in.docbook:25706337#: C/index-in.docbook:2570
3012msgid "SortListModel"6338msgid "SortListModel"
3013msgstr ""6339msgstr ""
3016#. This is a reference to an external file such as an image or video. When6342#. This is a reference to an external file such as an image or video. When
3017#. the file changes, the md5 hash will change to let you know you need to6343#. the file changes, the md5 hash will change to let you know you need to
3018#. update your localized copy. The msgstr is not used at all. Set it to6344#. update your localized copy. The msgstr is not used at all. Set it to
3019#. whatever you like once you have updated your copy of the file.6345#. whatever you like once you have updated your copy of the file.
3020#: C/index-in.docbook:25726346#: C/index-in.docbook:2572
nn6347#, fuzzy
3021msgctxt "_"6348msgctxt "_"
n3022msgid "external ref='figures/listmodel_sort.png' md5='9f6ee5fc4c2f03172fefc8027dn6349msgid ""
>97063e'" 
6350"external ref='figures/listmodel_sort.png' "
6351"md5='9f6ee5fc4c2f03172fefc8027d97063e'"
3023msgstr ""6352msgstr ""
nn6353"external ref='figures/treeview_list.png' "
6354"md5='60e5e4ecb284d0cdc53373fe0ec858ee'"
30246355
3025#. (itstool) path: section/para6356#. (itstool) path: section/para
3026#: C/index-in.docbook:25766357#: C/index-in.docbook:2576
n3027msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren6358#, fuzzy
>e/master/examples/book/listmodelviews/sort\">Source Code</link>" 
6359#| msgid ""
6360#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
6361#| "tree/master/examples/book/textview/\">Source Code</link>"
6362msgid ""
6363"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6364"master/examples/book/listmodelviews/sort\">Source Code</link>"
3028msgstr ""6365msgstr ""
nn6366"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6367"master/examples/book/textview/\">Källkod</link>"
30296368
3030#. (itstool) path: section/title6369#. (itstool) path: section/title
3031#: C/index-in.docbook:25826370#: C/index-in.docbook:2582
nn6371#, fuzzy
6372#| msgid "Filtering Files"
3032msgid "Filtering"6373msgid "Filtering"
n3033msgstr ""n6374msgstr "Filtrera filer"
30346375
3035#. (itstool) path: section/para6376#. (itstool) path: section/para
3036#: C/index-in.docbook:25846377#: C/index-in.docbook:2584
n3037msgid "The list can be filtered by wrapping it in a <classname>FilterListModel</n6378#, fuzzy
>classname>. Set a <classname>Filter</classname> such as a <classname>StringFilte 
>r</classname> or a <classname>BoolFilter</classname> to the <classname>FilterLis 
>tModel</classname>." 
6379msgid ""
6380"The list can be filtered by wrapping it in a <classname>FilterListModel</"
6381"classname>. Set a <classname>Filter</classname> such as a "
6382"<classname>StringFilter</classname> or a <classname>BoolFilter</classname> "
6383"to the <classname>FilterListModel</classname>."
3038msgstr ""6384msgstr ""
nn6385"<classname>Gtk::Style</classname> och <classname>Gtk::Rc</classname> togs "
6386"bort, ersatta av <classname>Gtk::StyleContext</classname> och olika "
6387"<classname>Gtk::StyleProvider</classname>, som <classname>Gtk::CssProvider</"
6388"classname>."
30396389
3040#. (itstool) path: section/para6390#. (itstool) path: section/para
3041#: C/index-in.docbook:25906391#: C/index-in.docbook:2590
n3042msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6392#, fuzzy
>1FilterListModel.html\">FilterListModel Reference</link>" 
6393#| msgid ""
6394#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6395#| "classGtk_1_1FileDialog.html\">FileDialog Reference</link>"
6396msgid ""
6397"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6398"classGtk_1_1FilterListModel.html\">FilterListModel Reference</link>"
3043msgstr ""6399msgstr ""
nn6400"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6401"classGtk_1_1FileDialog.html\">FileDialog-referens</link>"
30446402
3045#. (itstool) path: section/para6403#. (itstool) path: section/para
3046#: C/index-in.docbook:25916404#: C/index-in.docbook:2591
n3047msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6405#, fuzzy
>1StringFilter.html\">StringFilter Reference</link>" 
6406#| msgid ""
6407#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6408#| "classGtk_1_1Widget.html\">Widget Reference</link>"
6409msgid ""
6410"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6411"classGtk_1_1StringFilter.html\">StringFilter Reference</link>"
3048msgstr ""6412msgstr ""
nn6413"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6414"classGtk_1_1Widget.html\">Widget-referens</link>"
30496415
3050#. (itstool) path: section/para6416#. (itstool) path: section/para
3051#: C/index-in.docbook:25926417#: C/index-in.docbook:2592
n3052msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6418#, fuzzy
>1BoolFilter.html\">BoolFilter Reference</link>" 
6419#| msgid ""
6420#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6421#| "classGtk_1_1Tooltip.html\">Tooltip Reference</link>"
6422msgid ""
6423"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6424"classGtk_1_1BoolFilter.html\">BoolFilter Reference</link>"
3053msgstr ""6425msgstr ""
nn6426"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6427"classGtk_1_1Tooltip.html\">Tooltip-referens</link>"
30546428
3055#. (itstool) path: figure/title6429#. (itstool) path: figure/title
3056#: C/index-in.docbook:25986430#: C/index-in.docbook:2598
3057msgid "FilterListModel"6431msgid "FilterListModel"
3058msgstr ""6432msgstr ""
3061#. This is a reference to an external file such as an image or video. When6435#. This is a reference to an external file such as an image or video. When
3062#. the file changes, the md5 hash will change to let you know you need to6436#. the file changes, the md5 hash will change to let you know you need to
3063#. update your localized copy. The msgstr is not used at all. Set it to6437#. update your localized copy. The msgstr is not used at all. Set it to
3064#. whatever you like once you have updated your copy of the file.6438#. whatever you like once you have updated your copy of the file.
3065#: C/index-in.docbook:26006439#: C/index-in.docbook:2600
nn6440#, fuzzy
3066msgctxt "_"6441msgctxt "_"
n3067msgid "external ref='figures/listmodel_filter.png' md5='b1407e88c99b90c2ad7698cen6442msgid ""
>30a46a1e'" 
6443"external ref='figures/listmodel_filter.png' "
6444"md5='b1407e88c99b90c2ad7698ce30a46a1e'"
3068msgstr ""6445msgstr ""
nn6446"external ref='figures/recentfiles.png' md5='2ca280c98b5c8822ad48ca40f7ce0bb4'"
30696447
3070#. (itstool) path: section/para6448#. (itstool) path: section/para
3071#: C/index-in.docbook:26046449#: C/index-in.docbook:2604
n3072msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren6450#, fuzzy
>e/master/examples/book/listmodelviews/filter\">Source Code</link>" 
6451#| msgid ""
6452#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
6453#| "tree/master/examples/book/textview/\">Source Code</link>"
6454msgid ""
6455"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6456"master/examples/book/listmodelviews/filter\">Source Code</link>"
3073msgstr ""6457msgstr ""
nn6458"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6459"master/examples/book/textview/\">Källkod</link>"
30746460
3075#. (itstool) path: section/title6461#. (itstool) path: section/title
3076#: C/index-in.docbook:26106462#: C/index-in.docbook:2610
nn6463#, fuzzy
6464#| msgid "Applying Tags"
3077msgid "Displaying Trees"6465msgid "Displaying Trees"
n3078msgstr ""n6466msgstr "Tillämpa taggar"
30796467
3080#. (itstool) path: section/para6468#. (itstool) path: section/para
3081#: C/index-in.docbook:26126469#: C/index-in.docbook:2612
n3082msgid "While the deprecated <classname>TreeView</classname> provided built-in sun6470msgid ""
>pport for trees, the list widgets, and in particular <classname>Gio::ListModel</ 
>classname>, do not. However, <application>gtkmm</application> provides functiona 
>lity to make trees look and behave like lists for the people who still want to d 
>isplay lists. This is achieved by using the <classname>TreeListModel</classname> 
> to flatten a tree into a list. The <classname>TreeExpander</classname> widget c 
>an then be used inside a listitem to allow users to expand and collapse rows." 
6471"While the deprecated <classname>TreeView</classname> provided built-in "
6472"support for trees, the list widgets, and in particular <classname>Gio::"
6473"ListModel</classname>, do not. However, <application>gtkmm</application> "
6474"provides functionality to make trees look and behave like lists for the "
6475"people who still want to display lists. This is achieved by using the "
6476"<classname>TreeListModel</classname> to flatten a tree into a list. The "
6477"<classname>TreeExpander</classname> widget can then be used inside a "
6478"listitem to allow users to expand and collapse rows."
3083msgstr ""6479msgstr ""
30846480
3085#. (itstool) path: section/para6481#. (itstool) path: section/para
3086#: C/index-in.docbook:26226482#: C/index-in.docbook:2622
n3087msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6483#, fuzzy
>1TreeListModel.html\">TreeListModel Reference</link>" 
6484#| msgid ""
6485#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6486#| "classGtk_1_1TreeModelSort.html\">TreeModelSort Reference</link>"
6487msgid ""
6488"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6489"classGtk_1_1TreeListModel.html\">TreeListModel Reference</link>"
3088msgstr ""6490msgstr ""
nn6491"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6492"classGtk_1_1TreeModelSort.html\">Referens för TreeModelSort</link>"
30896493
3090#. (itstool) path: section/para6494#. (itstool) path: section/para
3091#: C/index-in.docbook:26236495#: C/index-in.docbook:2623
n3092msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6496#, fuzzy
>1TreeExpander.html\">TreeExpander Reference</link>" 
6497#| msgid ""
6498#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6499#| "classGtk_1_1TreeModelSort.html\">TreeModelSort Reference</link>"
6500msgid ""
6501"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6502"classGtk_1_1TreeExpander.html\">TreeExpander Reference</link>"
3093msgstr ""6503msgstr ""
nn6504"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6505"classGtk_1_1TreeModelSort.html\">Referens för TreeModelSort</link>"
30946506
3095#. (itstool) path: figure/title6507#. (itstool) path: figure/title
3096#: C/index-in.docbook:26296508#: C/index-in.docbook:2629
nn6509#, fuzzy
6510#| msgid "The Model"
3097msgid "TreeListModel"6511msgid "TreeListModel"
n3098msgstr ""n6512msgstr "Modellen"
30996513
3100#. (itstool) path: imageobject/imagedata6514#. (itstool) path: imageobject/imagedata
3101#. This is a reference to an external file such as an image or video. When6515#. This is a reference to an external file such as an image or video. When
3102#. the file changes, the md5 hash will change to let you know you need to6516#. the file changes, the md5 hash will change to let you know you need to
3103#. update your localized copy. The msgstr is not used at all. Set it to6517#. update your localized copy. The msgstr is not used at all. Set it to
3104#. whatever you like once you have updated your copy of the file.6518#. whatever you like once you have updated your copy of the file.
3105#: C/index-in.docbook:26316519#: C/index-in.docbook:2631
nn6520#, fuzzy
3106msgctxt "_"6521msgctxt "_"
n3107msgid "external ref='figures/listmodel_tree.png' md5='656307ee78c8fd9ac379f2a0d0n6522msgid ""
>1b8a81'" 
6523"external ref='figures/listmodel_tree.png' "
6524"md5='656307ee78c8fd9ac379f2a0d01b8a81'"
3108msgstr ""6525msgstr ""
nn6526"external ref='figures/notebook.png' md5='b46c25388d4c250b0ab737f71f82d81b'"
31096527
3110#. (itstool) path: section/para6528#. (itstool) path: section/para
3111#: C/index-in.docbook:26356529#: C/index-in.docbook:2635
n3112msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren6530#, fuzzy
>e/master/examples/book/listmodelviews/tree_columnview\">Source Code</link>" 
6531#| msgid ""
6532#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
6533#| "tree/master/examples/book/listmodelviews/gridview\">Source Code, "
6534#| "GridView</link>"
6535msgid ""
6536"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6537"master/examples/book/listmodelviews/tree_columnview\">Source Code</link>"
3113msgstr ""6538msgstr ""
nn6539"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
6540"master/examples/book/listmodelviews/gridview\">Källkod, GridView</link>"
31146541
3115#. (itstool) path: chapter/title6542#. (itstool) path: chapter/title
3116#: C/index-in.docbook:26436543#: C/index-in.docbook:2643
3117msgid "The TreeView widget"6544msgid "The TreeView widget"
n3118msgstr ""n6545msgstr "TreeView-komponenten"
31196546
3120#. (itstool) path: note/para6547#. (itstool) path: note/para
3121#: C/index-in.docbook:26456548#: C/index-in.docbook:2645
n3122msgid "<classname>Gtk::TreeView</classname> is deprecated since <application>gtkn6549msgid ""
>mm</application> 4.10. In new code, use <classname>Gtk::ListView</classname> for 
> lists and <classname>Gtk::ColumnView</classname> for tabular lists." 
6550"<classname>Gtk::TreeView</classname> is deprecated since <application>gtkmm</"
6551"application> 4.10. In new code, use <classname>Gtk::ListView</classname> for "
6552"lists and <classname>Gtk::ColumnView</classname> for tabular lists."
3123msgstr ""6553msgstr ""
nn6554"<classname>Gtk::TreeView</classname> är föråldrad sedan <application>gtkmm</"
6555"application> 4.10. Använd i ny kod <classname>Gtk::ListView</classname> för "
6556"listor och <classname>Gtk::ColumnView</classname> för tabellistor."
31246557
3125#. (itstool) path: chapter/para6558#. (itstool) path: chapter/para
3126#: C/index-in.docbook:26506559#: C/index-in.docbook:2650
nn6560msgid ""
3127msgid "The <classname>Gtk::TreeView</classname> widget can contain lists or tree6561"The <classname>Gtk::TreeView</classname> widget can contain lists or trees "
>of data, in columns." 
6562"of data, in columns."
3128msgstr ""6563msgstr ""
nn6564"Komponenten <classname>Gtk::TreeView</classname> kan innehålla listor eller "
6565"träd med data i kolumner."
31296566
3130#. (itstool) path: section/title6567#. (itstool) path: section/title
3131#: C/index-in.docbook:26566568#: C/index-in.docbook:2656
3132msgid "The Model"6569msgid "The Model"
n3133msgstr ""n6570msgstr "Modellen"
31346571
3135#. (itstool) path: section/para6572#. (itstool) path: section/para
3136#: C/index-in.docbook:26586573#: C/index-in.docbook:2658
n3137msgid "Each <classname>Gtk::TreeView</classname> has an associated <classname>Gtn6574#, fuzzy
>k::TreeModel</classname>, which contains the data displayed by the <classname>Tr 
>eeView</classname>. Each <classname>Gtk::TreeModel</classname> can be used by mo 
>re than one <classname>Gtk::TreeView</classname>. For instance, this allows the  
>same underlying data to be displayed and edited in 2 different ways at the same  
>time. Or the 2 Views might display different columns from the same Model data, i 
>n the same way that 2 SQL queries (or \"views\") might show different fields fro 
>m the same database table." 
6575msgid ""
6576"Each <classname>Gtk::TreeView</classname> has an associated <classname>Gtk::"
6577"TreeModel</classname>, which contains the data displayed by the "
6578"<classname>TreeView</classname>. Each <classname>Gtk::TreeModel</classname> "
6579"can be used by more than one <classname>Gtk::TreeView</classname>. For "
6580"instance, this allows the same underlying data to be displayed and edited in "
6581"2 different ways at the same time. Or the 2 Views might display different "
6582"columns from the same Model data, in the same way that 2 SQL queries (or "
6583"\"views\") might show different fields from the same database table."
3138msgstr ""6584msgstr ""
nn6585"Varje <classname>Gtk::TreeView</classname> har en associerad <classname>Gtk::"
6586"TreeModel</classname> som innehåller de data som visas av denna "
6587"<classname>Gtk::TreeView</classname>. Varje <classname>Gtk::TreeModel</"
6588"classname> kan användas av mer än en <classname>Gtk::TreeView</classname>. "
6589"Exempelvis tillåter detta samma underliggande data att visas och redigeras "
6590"på två olika sätt samtidigt. Eller så kan de två vyerna visa olika kolumner "
6591"från samma modelldata, på samma sätt som två SQL-frågor (eller ”vyer”) kan "
6592"visa olika fält från samma databastabell."
31396593
3140#. (itstool) path: section/para6594#. (itstool) path: section/para
3141#: C/index-in.docbook:26686595#: C/index-in.docbook:2668
n3142msgid "Although you can theoretically implement your own Model, you will normalln6596#, fuzzy
>y use either the <classname>ListStore</classname> or <classname>TreeStore</class 
>name> model classes." 
6597msgid ""
6598"Although you can theoretically implement your own Model, you will normally "
6599"use either the <classname>ListStore</classname> or <classname>TreeStore</"
6600"classname> model classes."
3143msgstr ""6601msgstr ""
nn6602"Även om du i teorin kan implementera en egen Model, så kommer du vanligen "
6603"använda antingen modellklasserna <classname>ListStore</classname> eller "
6604"<classname>TreeStore</classname>."
31446605
3145#. (itstool) path: section/para6606#. (itstool) path: section/para
3146#: C/index-in.docbook:26746607#: C/index-in.docbook:2674
n3147msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6608msgid ""
>1TreeModel.html\">Reference</link>" 
6609"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6610"classGtk_1_1TreeModel.html\">Reference</link>"
3148msgstr ""6611msgstr ""
nn6612"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6613"classGtk_1_1TreeModel.html\">Referens</link>"
31496614
3150#. (itstool) path: section/title6615#. (itstool) path: section/title
3151#: C/index-in.docbook:26776616#: C/index-in.docbook:2677
3152msgid "ListStore, for rows"6617msgid "ListStore, for rows"
n3153msgstr ""n6618msgstr "ListStore, för rader"
31546619
3155#. (itstool) path: section/para6620#. (itstool) path: section/para
3156#: C/index-in.docbook:26796621#: C/index-in.docbook:2679
nn6622msgid ""
3157msgid "The <classname>ListStore</classname> contains simple rows of data, and ea6623"The <classname>ListStore</classname> contains simple rows of data, and each "
>ch row has no children." 
6624"row has no children."
3158msgstr ""6625msgstr ""
nn6626"<classname>ListStore</classname> innehåller enkla rader med data, och varje "
6627"rad saknar underordnade."
31596628
3160#. (itstool) path: figure/title6629#. (itstool) path: figure/title
n3161#: C/index-in.docbook:2685n6630#: C/index-in.docbook:2685 C/index-in.docbook:3262
3162#: C/index-in.docbook:3262
3163msgid "TreeView - ListStore"6631msgid "TreeView - ListStore"
n3164msgstr ""n6632msgstr "TreeView - ListStore"
31656633
3166#. (itstool) path: imageobject/imagedata6634#. (itstool) path: imageobject/imagedata
3167#. This is a reference to an external file such as an image or video. When6635#. This is a reference to an external file such as an image or video. When
3168#. the file changes, the md5 hash will change to let you know you need to6636#. the file changes, the md5 hash will change to let you know you need to
3169#. update your localized copy. The msgstr is not used at all. Set it to6637#. update your localized copy. The msgstr is not used at all. Set it to
3170#. whatever you like once you have updated your copy of the file.6638#. whatever you like once you have updated your copy of the file.
n3171#: C/index-in.docbook:2687n6639#: C/index-in.docbook:2687 C/index-in.docbook:3264
3172#: C/index-in.docbook:32646640#, fuzzy
3173msgctxt "_"6641msgctxt "_"
n3174msgid "external ref='figures/treeview_list.png' md5='60e5e4ecb284d0cdc53373fe0ecn6642msgid ""
>858ee'" 
6643"external ref='figures/treeview_list.png' "
6644"md5='60e5e4ecb284d0cdc53373fe0ec858ee'"
3175msgstr ""6645msgstr ""
nn6646"external ref='figures/treeview_list.png' "
6647"md5='60e5e4ecb284d0cdc53373fe0ec858ee'"
31766648
3177#. (itstool) path: section/para6649#. (itstool) path: section/para
3178#: C/index-in.docbook:26916650#: C/index-in.docbook:2691
n3179msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6651msgid ""
>1ListStore.html\">Reference</link>" 
6652"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6653"classGtk_1_1ListStore.html\">Reference</link>"
3180msgstr ""6654msgstr ""
nn6655"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6656"classGtk_1_1ListStore.html\">Referens</link>"
31816657
3182#. (itstool) path: section/title6658#. (itstool) path: section/title
3183#: C/index-in.docbook:26966659#: C/index-in.docbook:2696
3184msgid "TreeStore, for a hierarchy"6660msgid "TreeStore, for a hierarchy"
n3185msgstr ""n6661msgstr "TreeStore, för en hierarki"
31866662
3187#. (itstool) path: section/para6663#. (itstool) path: section/para
3188#: C/index-in.docbook:26986664#: C/index-in.docbook:2698
nn6665msgid ""
3189msgid "The <classname>TreeStore</classname> contains rows of data, and each row 6666"The <classname>TreeStore</classname> contains rows of data, and each row may "
>may have child rows." 
6667"have child rows."
3190msgstr ""6668msgstr ""
nn6669"<classname>TreeStore</classname> innehåller rader med data, och varje rad "
6670"kan ha underordnade rader."
31916671
3192#. (itstool) path: figure/title6672#. (itstool) path: figure/title
n3193#: C/index-in.docbook:2704n6673#: C/index-in.docbook:2704 C/index-in.docbook:3282
3194#: C/index-in.docbook:3282
3195msgid "TreeView - TreeStore"6674msgid "TreeView - TreeStore"
n3196msgstr ""n6675msgstr "TreeView - TreeStore"
31976676
3198#. (itstool) path: imageobject/imagedata6677#. (itstool) path: imageobject/imagedata
3199#. This is a reference to an external file such as an image or video. When6678#. This is a reference to an external file such as an image or video. When
3200#. the file changes, the md5 hash will change to let you know you need to6679#. the file changes, the md5 hash will change to let you know you need to
3201#. update your localized copy. The msgstr is not used at all. Set it to6680#. update your localized copy. The msgstr is not used at all. Set it to
3202#. whatever you like once you have updated your copy of the file.6681#. whatever you like once you have updated your copy of the file.
n3203#: C/index-in.docbook:2706n6682#: C/index-in.docbook:2706 C/index-in.docbook:3284
3204#: C/index-in.docbook:32846683#, fuzzy
3205msgctxt "_"6684msgctxt "_"
n3206msgid "external ref='figures/treeview_tree.png' md5='2270025659b23ebfc0e38d8b629n6685msgid ""
>289ef'" 
6686"external ref='figures/treeview_tree.png' "
6687"md5='2270025659b23ebfc0e38d8b629289ef'"
3207msgstr ""6688msgstr ""
nn6689"external ref='figures/treeview_tree.png' "
6690"md5='2270025659b23ebfc0e38d8b629289ef'"
32086691
3209#. (itstool) path: section/para6692#. (itstool) path: section/para
3210#: C/index-in.docbook:27106693#: C/index-in.docbook:2710
n3211msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6694msgid ""
>1TreeStore.html\">Reference</link>" 
6695"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6696"classGtk_1_1TreeStore.html\">Reference</link>"
3212msgstr ""6697msgstr ""
nn6698"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6699"classGtk_1_1TreeStore.html\">Referens</link>"
32136700
3214#. (itstool) path: section/title6701#. (itstool) path: section/title
3215#: C/index-in.docbook:27156702#: C/index-in.docbook:2715
3216msgid "Model Columns"6703msgid "Model Columns"
n3217msgstr ""n6704msgstr "Modellkolumner"
32186705
3219#. (itstool) path: section/para6706#. (itstool) path: section/para
3220#: C/index-in.docbook:27176707#: C/index-in.docbook:2717
n3221msgid "The <classname>TreeModelColumnRecord</classname> class is used to keep trn6708#, fuzzy
>ack of the columns and their data types. You add <classname>TreeModelColumn</cla 
>ssname> instances to the <classname>ColumnRecord</classname> and then use those  
><classname>TreeModelColumn</classname>s when getting and setting the data in mod 
>el rows. You will probably find it convenient to derive a new <classname>TreeMod 
>elColumnRecord</classname> which has your <classname>TreeModelColumn</classname> 
> instances as member data." 
6709msgid ""
6710"The <classname>TreeModelColumnRecord</classname> class is used to keep track "
6711"of the columns and their data types. You add <classname>TreeModelColumn</"
6712"classname> instances to the <classname>ColumnRecord</classname> and then use "
6713"those <classname>TreeModelColumn</classname>s when getting and setting the "
6714"data in model rows. You will probably find it convenient to derive a new "
6715"<classname>TreeModelColumnRecord</classname> which has your "
6716"<classname>TreeModelColumn</classname> instances as member data."
3222msgstr ""6717msgstr ""
nn6718"<classname>TreeModelColumnRecord</classname>-klassen används för att hålla "
6719"koll på kolumnerna och deras datatyper. Du lägger till "
6720"<classname>TreeModelColumn</classname>-instanser till ditt "
6721"<classname>ColumnRecord</classname> och använder sedan dessa "
6722"<classname>TreeModelColumn</classname>-instanser när du hämtar och ställer "
6723"in data i modellrader. Du kommer troligen finna det praktiskt att härleda en "
6724"ny <classname>TreeModelColumnRecord</classname> som har dina "
6725"<classname>TreeModelColumn</classname>-instanser som medlemsdata."
32236726
3224#. (itstool) path: section/programlisting6727#. (itstool) path: section/programlisting
3225#: C/index-in.docbook:27286728#: C/index-in.docbook:2728
n3226#, no-wrapn6729#, fuzzy, no-wrap
6730#| msgid ""
6731#| "class ModelColumns : public Gtk::TreeModelColumnRecord\n"
6732#| "{\n"
6733#| "public:\n"
6734#| "\n"
6735#| "  ModelColumns()\n"
6736#| "    { add(m_col_text); add(m_col_number); }\n"
6737#| "\n"
6738#| "  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_text;\n"
6739#| "  Gtk::TreeModelColumn&lt;int&gt; m_col_number;\n"
6740#| "};\n"
6741#| "\n"
6742#| "ModelColumns m_Columns;"
3227msgid ""6743msgid ""
3228"<code>class ModelColumns : public Gtk::TreeModelColumnRecord\n"6744"<code>class ModelColumns : public Gtk::TreeModelColumnRecord\n"
3229"{\n"6745"{\n"
3230"public:\n"6746"public:\n"
3231"\n"6747"\n"
3236"  Gtk::TreeModelColumn&lt;int&gt; m_col_number;\n"6752"  Gtk::TreeModelColumn&lt;int&gt; m_col_number;\n"
3237"};\n"6753"};\n"
3238"\n"6754"\n"
3239"ModelColumns m_Columns;</code>"6755"ModelColumns m_Columns;</code>"
3240msgstr ""6756msgstr ""
nn6757"class ModelColumns : public Gtk::TreeModelColumnRecord\n"
6758"{\n"
6759"public:\n"
6760"\n"
6761"  ModelColumns()\n"
6762"    { add(m_col_text); add(m_col_number); }\n"
6763"\n"
6764"  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_text;\n"
6765"  Gtk::TreeModelColumn&lt;int&gt; m_col_number;\n"
6766"};\n"
6767"\n"
6768"ModelColumns m_Columns;"
32416769
3242#. (itstool) path: section/para6770#. (itstool) path: section/para
3243#: C/index-in.docbook:27416771#: C/index-in.docbook:2741
nn6772#, fuzzy
6773msgid ""
3244msgid "You specify the <classname>ColumnRecord</classname> when creating the Mod6774"You specify the <classname>ColumnRecord</classname> when creating the Model, "
>el, like so:" 
6775"like so:"
3245msgstr ""6776msgstr ""
nn6777"Du anger <classname>ColumnRecord</classname> när du skapar modellen, så här:"
32466778
3247#. (itstool) path: section/programlisting6779#. (itstool) path: section/programlisting
3248#: C/index-in.docbook:27456780#: C/index-in.docbook:2745
n3249#, no-wrapn6781#, fuzzy, no-wrap
6782#| msgid ""
6783#| "Glib::RefPtr&lt;Gtk::ListStore&gt; refListStore =\n"
6784#| "    Gtk::ListStore::create(m_Columns);"
3250msgid ""6785msgid ""
3251"<code>Glib::RefPtr&lt;Gtk::ListStore&gt; refListStore =\n"6786"<code>Glib::RefPtr&lt;Gtk::ListStore&gt; refListStore =\n"
3252"    Gtk::ListStore::create(m_Columns);</code>"6787"    Gtk::ListStore::create(m_Columns);</code>"
3253msgstr ""6788msgstr ""
nn6789"Glib::RefPtr&lt;Gtk::ListStore&gt; refListStore =\n"
6790"    Gtk::ListStore::create(m_Columns);"
32546791
3255#. (itstool) path: section/para6792#. (itstool) path: section/para
3256#: C/index-in.docbook:27476793#: C/index-in.docbook:2747
n3257msgid "As a <classname>TreeModelColumnRecord</classname> describes structure, non6794#, fuzzy
>t data, it can be shared among multiple models, and this is preferable for effic 
>iency. However, the instance (such as <varname>m_Columns</varname> here) should  
>usually not be static, because it often needs to be instantiated after <applicat 
>ion>glibmm</application> has been initialized. The best solution is to make it a 
> lazily instantiated singleton, so that it will be constructed on-demand, whenev 
>er the first model accesses it." 
6795msgid ""
6796"As a <classname>TreeModelColumnRecord</classname> describes structure, not "
6797"data, it can be shared among multiple models, and this is preferable for "
6798"efficiency. However, the instance (such as <varname>m_Columns</varname> "
6799"here) should usually not be static, because it often needs to be "
6800"instantiated after <application>glibmm</application> has been initialized. "
6801"The best solution is to make it a lazily instantiated singleton, so that it "
6802"will be constructed on-demand, whenever the first model accesses it."
3258msgstr ""6803msgstr ""
nn6804"Då en <classname>TreeModelColumnRecord</classname> beskriver struktur, inte "
6805"data, så kan den delas mellan flera modeller, och detta är önskvärt för "
6806"effektivitet. Instansen (som <varname>m_Columns</varname> här) ska dock "
6807"vanligen inte vara statisk, då den ofta behöver instansieras efter att "
6808"<application>glibmm</application> har initierats. Den bästa lösningen är att "
6809"göra den till en slött instansierad singleton, så att den kommer konstrueras "
6810"när den behövs, närhelst den första modellen kommer åt den."
32596811
3260#. (itstool) path: section/title6812#. (itstool) path: section/title
3261#: C/index-in.docbook:27596813#: C/index-in.docbook:2759
3262msgid "Adding Rows"6814msgid "Adding Rows"
n3263msgstr ""n6815msgstr "Lägga till rader"
32646816
3265#. (itstool) path: section/para6817#. (itstool) path: section/para
3266#: C/index-in.docbook:27616818#: C/index-in.docbook:2761
n3267msgid "Add rows to the model with the <methodname>append()</methodname>, <methodn6819msgid ""
>name>prepend()</methodname>, or <methodname>insert()</methodname> methods." 
6820"Add rows to the model with the <methodname>append()</methodname>, "
6821"<methodname>prepend()</methodname>, or <methodname>insert()</methodname> "
6822"methods."
3268msgstr ""6823msgstr ""
nn6824"Lägg till rader till modellen med metoderna <methodname>append()</"
6825"methodname>, <methodname>prepend()</methodname> eller <methodname>insert()</"
6826"methodname>."
32696827
3270#. (itstool) path: section/programlisting6828#. (itstool) path: section/programlisting
3271#: C/index-in.docbook:27656829#: C/index-in.docbook:2765
n3272#, no-wrapn6830#, fuzzy, no-wrap
3273msgid ""6831#| msgid "auto iter = m_refListStore-&gt;append();"
3274"<code>auto iter = m_refListStore-&gt;append();</code>"6832msgid "<code>auto iter = m_refListStore-&gt;append();</code>"
3275msgstr ""6833msgstr "auto iter = m_refListStore-&gt;append();"
32766834
3277#. (itstool) path: section/para6835#. (itstool) path: section/para
3278#: C/index-in.docbook:27666836#: C/index-in.docbook:2766
nn6837#, fuzzy
3279msgid "You can dereference the iterator to get the Row:"6838msgid "You can dereference the iterator to get the Row:"
n3280msgstr ""n6839msgstr "Du kan dereferera iteratorn för att få raden:"
32816840
3282#. (itstool) path: section/programlisting6841#. (itstool) path: section/programlisting
3283#: C/index-in.docbook:27686842#: C/index-in.docbook:2768
n3284#, no-wrapn6843#, fuzzy, no-wrap
3285msgid ""6844#| msgid "auto row = *iter;"
3286"<code>auto row = *iter;</code>"6845msgid "<code>auto row = *iter;</code>"
3287msgstr ""6846msgstr "auto row = *iter;"
32886847
3289#. (itstool) path: section/title6848#. (itstool) path: section/title
3290#: C/index-in.docbook:27706849#: C/index-in.docbook:2770
3291msgid "Adding child rows"6850msgid "Adding child rows"
n3292msgstr ""n6851msgstr "Lägga till underordnade rader"
32936852
3294#. (itstool) path: section/para6853#. (itstool) path: section/para
3295#: C/index-in.docbook:27716854#: C/index-in.docbook:2771
n3296msgid "<classname>Gtk::TreeStore</classname> models can have child items. Add thn6855msgid ""
>em with the <methodname>append()</methodname>, <methodname>prepend()</methodname 
>>, or <methodname>insert()</methodname> methods, like so:" 
6856"<classname>Gtk::TreeStore</classname> models can have child items. Add them "
6857"with the <methodname>append()</methodname>, <methodname>prepend()</"
6858"methodname>, or <methodname>insert()</methodname> methods, like so:"
3297msgstr ""6859msgstr ""
nn6860"<classname>Gtk::TreeStore</classname>-modeller kan ha underordnade objekt. "
6861"Lägg till dem med metoderna <methodname>append()</methodname>, "
6862"<methodname>prepend()</methodname> eller <methodname>insert()</methodname>, "
6863"så här:"
32986864
3299#. (itstool) path: section/programlisting6865#. (itstool) path: section/programlisting
3300#: C/index-in.docbook:27766866#: C/index-in.docbook:2776
n3301#, no-wrapn6867#, fuzzy, no-wrap
6868#| msgid ""
6869#| "auto iter_child =\n"
6870#| "    m_refTreeStore-&gt;append(row.children());"
3302msgid ""6871msgid ""
3303"<code>auto iter_child =\n"6872"<code>auto iter_child =\n"
3304"    m_refTreeStore-&gt;append(row.children());</code>"6873"    m_refTreeStore-&gt;append(row.children());</code>"
3305msgstr ""6874msgstr ""
nn6875"auto iter_child =\n"
6876"    m_refTreeStore-&gt;append(row.children());"
33066877
3307#. (itstool) path: section/title6878#. (itstool) path: section/title
3308#: C/index-in.docbook:27836879#: C/index-in.docbook:2783
3309msgid "Setting values"6880msgid "Setting values"
n3310msgstr ""n6881msgstr "Ställa in värden"
33116882
3312#. (itstool) path: section/para6883#. (itstool) path: section/para
3313#: C/index-in.docbook:27856884#: C/index-in.docbook:2785
n3314msgid "You can use the <methodname>operator[]</methodname> overload to set the dn6885#, fuzzy
>ata for a particular column in the row, specifying the <classname>TreeModelColum 
>n</classname> used to create the model." 
6886msgid ""
6887"You can use the <methodname>operator[]</methodname> overload to set the data "
6888"for a particular column in the row, specifying the "
6889"<classname>TreeModelColumn</classname> used to create the model."
3315msgstr ""6890msgstr ""
nn6891"Du kan använda överlagringen <methodname>operator[]</methodname> för att "
6892"ställa in data för en specifik kolumn i raden, angivande den "
6893"<classname>TreeModelColumn</classname> som används för att skapa modellen."
33166894
3317#. (itstool) path: section/programlisting6895#. (itstool) path: section/programlisting
3318#: C/index-in.docbook:27906896#: C/index-in.docbook:2790
n3319#, no-wrapn6897#, fuzzy, no-wrap
3320msgid ""6898#| msgid "row[m_Columns.m_col_text] = \"sometext\";"
3321"<code>row[m_Columns.m_col_text] = \"sometext\";</code>"6899msgid "<code>row[m_Columns.m_col_text] = \"sometext\";</code>"
3322msgstr ""6900msgstr "row[m_Columns.m_col_text] = \"litetext\";"
33236901
3324#. (itstool) path: section/title6902#. (itstool) path: section/title
3325#: C/index-in.docbook:27946903#: C/index-in.docbook:2794
3326msgid "Getting values"6904msgid "Getting values"
n3327msgstr ""n6905msgstr "Hämta värden"
33286906
3329#. (itstool) path: section/para6907#. (itstool) path: section/para
3330#: C/index-in.docbook:27966908#: C/index-in.docbook:2796
n3331msgid "You can use the <methodname>operator[]</methodname> overload to get the dn6909#, fuzzy
>ata in a particular column in a row, specifying the <classname>TreeModelColumn</ 
>classname> used to create the model." 
6910msgid ""
6911"You can use the <methodname>operator[]</methodname> overload to get the data "
6912"in a particular column in a row, specifying the <classname>TreeModelColumn</"
6913"classname> used to create the model."
3332msgstr ""6914msgstr ""
nn6915"Du kan använda överlagringen <methodname>operator[]</methodname> för att få "
6916"data för en specifik kolumn i raden, angivande den "
6917"<classname>TreeModelColumn</classname> som används för att skapa modellen."
33336918
3334#. (itstool) path: section/programlisting6919#. (itstool) path: section/programlisting
3335#: C/index-in.docbook:28016920#: C/index-in.docbook:2801
n3336#, no-wrapn6921#, fuzzy, no-wrap
6922#| msgid ""
6923#| "auto strText = row[m_Columns.m_col_text];\n"
6924#| "auto number = row[m_Columns.m_col_number];"
3337msgid ""6925msgid ""
3338"<code>auto strText = row[m_Columns.m_col_text];\n"6926"<code>auto strText = row[m_Columns.m_col_text];\n"
3339"auto number = row[m_Columns.m_col_number];</code>"6927"auto number = row[m_Columns.m_col_number];</code>"
3340msgstr ""6928msgstr ""
nn6929"auto strText = row[m_Columns.m_col_text];\n"
6930"auto number = row[m_Columns.m_col_number];"
33416931
3342#. (itstool) path: section/para6932#. (itstool) path: section/para
3343#: C/index-in.docbook:28036933#: C/index-in.docbook:2803
nn6934msgid ""
3344msgid "The compiler will complain if you use an inappropriate type. For instance6935"The compiler will complain if you use an inappropriate type. For instance, "
>this would generate a compiler error:" 
6936"this would generate a compiler error:"
3345msgstr ""6937msgstr ""
nn6938"Kompilatorn kommer klaga om du använder en olämplig typ. Exempelvis skulle "
6939"detta generera ett kompileringsfel:"
33466940
3347#. (itstool) path: section/programlisting6941#. (itstool) path: section/programlisting
3348#: C/index-in.docbook:28076942#: C/index-in.docbook:2807
n3349#, no-wrapn6943#, fuzzy, no-wrap
6944#| msgid ""
6945#| "//compiler error - no conversion from ustring to int.\n"
6946#| "int number = row[m_Columns.m_col_text];"
3350msgid ""6947msgid ""
3351"<code>//compiler error - no conversion from ustring to int.\n"6948"<code>//compiler error - no conversion from ustring to int.\n"
3352"int number = row[m_Columns.m_col_text];</code>"6949"int number = row[m_Columns.m_col_text];</code>"
3353msgstr ""6950msgstr ""
nn6951"//kompileringsfel - ingen konvertering från ustring till int.\n"
6952"int number = row[m_Columns.m_col_text];"
33546953
3355#. (itstool) path: section/title6954#. (itstool) path: section/title
3356#: C/index-in.docbook:28126955#: C/index-in.docbook:2812
3357msgid "\"Hidden\" Columns"6956msgid "\"Hidden\" Columns"
n3358msgstr ""n6957msgstr "”Dolda” kolumner"
33596958
3360#. (itstool) path: section/para6959#. (itstool) path: section/para
3361#: C/index-in.docbook:28146960#: C/index-in.docbook:2814
nn6961#, fuzzy
6962msgid ""
3362msgid "You might want to associate extra data with each row. If so, just add it 6963"You might want to associate extra data with each row. If so, just add it as "
>as a Model column, but don't add it to the View." 
6964"a Model column, but don't add it to the View."
3363msgstr ""6965msgstr ""
nn6966"Du kan vilja associera extra data med varje rad. Lägg i så fall bara till "
6967"dem som en modellkolumn, men lägg inte till dem till vyn."
33646968
3365#. (itstool) path: section/para6969#. (itstool) path: section/para
3366#: C/index-in.docbook:28256970#: C/index-in.docbook:2825
n3367msgid "The View is the actual widget (<classname>Gtk::TreeView</classname>) thatn6971#, fuzzy
> displays the model (<classname>Gtk::TreeModel</classname>) data and allows the  
>user to interact with it. The View can show all of the model's columns, or just  
>some, and it can show them in various ways." 
6972msgid ""
6973"The View is the actual widget (<classname>Gtk::TreeView</classname>) that "
6974"displays the model (<classname>Gtk::TreeModel</classname>) data and allows "
6975"the user to interact with it. The View can show all of the model's columns, "
6976"or just some, and it can show them in various ways."
3368msgstr ""6977msgstr ""
nn6978"Vyn är den faktiska komponenten (<classname>Gtk::TreeView</classname>) som "
6979"visar data för modellen (<classname>Gtk::TreeModel</classname>) och låter "
6980"användaren interagera med dem. Vyn kan visa alla modellens kolumner, eller "
6981"bara några, och den kan visa dem på olika sätt."
33696982
3370#. (itstool) path: section/para6983#. (itstool) path: section/para
3371#: C/index-in.docbook:28326984#: C/index-in.docbook:2832
n3372msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n6985msgid ""
>1TreeView.html\">Reference</link>" 
6986"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6987"classGtk_1_1TreeView.html\">Reference</link>"
3373msgstr ""6988msgstr ""
nn6989"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
6990"classGtk_1_1TreeView.html\">Referens</link>"
33746991
3375#. (itstool) path: section/title6992#. (itstool) path: section/title
3376#: C/index-in.docbook:28356993#: C/index-in.docbook:2835
nn6994#, fuzzy
3377msgid "Using a Model"6995msgid "Using a Model"
n3378msgstr ""n6996msgstr "Använda en Model"
33796997
3380#. (itstool) path: section/para6998#. (itstool) path: section/para
3381#: C/index-in.docbook:28376999#: C/index-in.docbook:2837
n3382msgid "You can specify a <classname>Gtk::TreeModel</classname> when constructingn7000msgid ""
> the <classname>Gtk::TreeView</classname>, or you can use the <methodname>set_mo 
>del()</methodname> method, like so:" 
7001"You can specify a <classname>Gtk::TreeModel</classname> when constructing "
7002"the <classname>Gtk::TreeView</classname>, or you can use the "
7003"<methodname>set_model()</methodname> method, like so:"
3383msgstr ""7004msgstr ""
nn7005"Du kan ange en <classname>Gtk::TreeModel</classname> när du skapar din "
7006"<classname>Gtk::TreeView</classname>, eller så kan du använda metoden "
7007"<methodname>set_model()</methodname>, så här:"
33847008
3385#. (itstool) path: section/programlisting7009#. (itstool) path: section/programlisting
3386#: C/index-in.docbook:28427010#: C/index-in.docbook:2842
n3387#, no-wrapn7011#, fuzzy, no-wrap
3388msgid ""7012#| msgid "m_TreeView.set_model(m_refListStore);"
3389"<code>m_TreeView.set_model(m_refListStore);</code>"7013msgid "<code>m_TreeView.set_model(m_refListStore);</code>"
3390msgstr ""7014msgstr "m_TreeView.set_model(m_refListStore);"
33917015
3392#. (itstool) path: section/title7016#. (itstool) path: section/title
3393#: C/index-in.docbook:28467017#: C/index-in.docbook:2846
nn7018#, fuzzy
3394msgid "Adding View Columns"7019msgid "Adding View Columns"
n3395msgstr ""n7020msgstr "Lägga till vykolumner"
33967021
3397#. (itstool) path: section/para7022#. (itstool) path: section/para
3398#: C/index-in.docbook:28487023#: C/index-in.docbook:2848
n3399msgid "You can use the <methodname>append_column()</methodname> method to tell tn7024#, fuzzy
>he View that it should display certain Model columns, in a certain order, with a 
> certain column title." 
7025msgid ""
7026"You can use the <methodname>append_column()</methodname> method to tell the "
7027"View that it should display certain Model columns, in a certain order, with "
7028"a certain column title."
3400msgstr ""7029msgstr ""
nn7030"Du kan använda metoden <methodname>append_column()</methodname> för att säga "
7031"till vyn att den ska visa vissa modellkolumner i en viss ordning, med en "
7032"viss kolumntitel."
34017033
3402#. (itstool) path: section/programlisting7034#. (itstool) path: section/programlisting
3403#: C/index-in.docbook:28537035#: C/index-in.docbook:2853
n3404#, no-wrapn7036#, fuzzy, no-wrap
3405msgid ""
3406"<code>m_TreeView.append_column(\"Messages\", m_Columns.m_col_text);</code>"7037msgid "<code>m_TreeView.append_column(\"Messages\", m_Columns.m_col_text);</code
 >>"
3407msgstr ""7038msgstr "m_TreeView.append_column(\"Meddelanden\", m_Columns.m_col_text);"
34087039
3409#. (itstool) path: section/para7040#. (itstool) path: section/para
3410#: C/index-in.docbook:28547041#: C/index-in.docbook:2854
n3411msgid "When using this simple <methodname>append_column()</methodname> overload,n7042#, fuzzy
> the <classname>TreeView</classname> will display the model data with an appropr 
>iate <classname>CellRenderer</classname>. For instance, strings and numbers are  
>shown in a simple <classname>Gtk::Entry</classname> widget, and booleans are sho 
>wn in a <classname>Gtk::CheckButton</classname>. This is usually what you need.  
>For other column types you must either connect a callback that converts your typ 
>e into a string representation, with <methodname>TreeViewColumn::set_cell_data_f 
>unc()</methodname>, or derive a custom <classname>CellRenderer</classname>. Note 
> that (unsigned) short is not supported by default - You could use (unsigned) in 
>t or (unsigned) long as the column type instead." 
7043msgid ""
7044"When using this simple <methodname>append_column()</methodname> overload, "
7045"the <classname>TreeView</classname> will display the model data with an "
7046"appropriate <classname>CellRenderer</classname>. For instance, strings and "
7047"numbers are shown in a simple <classname>Gtk::Entry</classname> widget, and "
7048"booleans are shown in a <classname>Gtk::CheckButton</classname>. This is "
7049"usually what you need. For other column types you must either connect a "
7050"callback that converts your type into a string representation, with "
7051"<methodname>TreeViewColumn::set_cell_data_func()</methodname>, or derive a "
7052"custom <classname>CellRenderer</classname>. Note that (unsigned) short is "
7053"not supported by default - You could use (unsigned) int or (unsigned) long "
7054"as the column type instead."
3412msgstr ""7055msgstr ""
nn7056"När denna enkla <methodname>append_column()</methodname>-överlagring används "
7057"kommer vår <classname>TreeView</classname> modelldata med en lämplig "
7058"<classname>CellRenderer</classname>. Strängar och tal visas exempelvis i en "
7059"enkel <classname>Gtk::Entry</classname>-komponent, och booleaner visas i en "
7060"<classname>Gtk::CheckButton</classname>. Det här är vanligen vad du behöver. "
7061"För andra kolumntyper måste du antingen ansluta ett återanrop som "
7062"konverterar din typ till en strängrepresentation med "
7063"<methodname>TreeViewColumn::set_cell_data_func()</methodname>, eller härleda "
7064"en anpassad <classname>CellRenderer</classname>. Observera att (unsigned) "
7065"short inte stöds som standard - Du skulle kunna använda (unsigned) int eller "
7066"(unsigned) long som kolumntyp i stället."
34137067
3414#. (itstool) path: section/title7068#. (itstool) path: section/title
3415#: C/index-in.docbook:28707069#: C/index-in.docbook:2870
3416msgid "More than one Model Column per View Column"7070msgid "More than one Model Column per View Column"
n3417msgstr ""n7071msgstr "Mer än en modellkolumn per vykolumn"
34187072
3419#. (itstool) path: section/para7073#. (itstool) path: section/para
3420#: C/index-in.docbook:28727074#: C/index-in.docbook:2872
n3421msgid "To render more than one model column in a view column, you need to createn7075#, fuzzy
> the <classname>TreeView::Column</classname> widget manually, and use <methodnam 
>e>pack_start()</methodname> to add the model columns to it." 
7076msgid ""
7077"To render more than one model column in a view column, you need to create "
7078"the <classname>TreeView::Column</classname> widget manually, and use "
7079"<methodname>pack_start()</methodname> to add the model columns to it."
3422msgstr ""7080msgstr ""
nn7081"För att rendera mer än en modellkolumn i en vykolumn behöver du skapa "
7082"<classname>TreeView::Column</classname>-komponenten manuellt, och använda "
7083"<methodname>pack_start()</methodname> för att lägga till modellkolumnerna "
7084"till den."
34237085
3424#. (itstool) path: section/para7086#. (itstool) path: section/para
3425#: C/index-in.docbook:28787087#: C/index-in.docbook:2878
n3426msgid "Then use <methodname>append_column()</methodname> to add the view Column n7088#, fuzzy
>to the View. Notice that <methodname>Gtk::TreeView::append_column()</methodname> 
> is overloaded to accept either a prebuilt <classname>Gtk::TreeView::Column</cla 
>ssname> widget, or just the <classname>TreeModelColumn</classname> from which it 
> generates an appropriate <classname>Gtk::TreeView::Column</classname> widget." 
7089msgid ""
7090"Then use <methodname>append_column()</methodname> to add the view Column to "
7091"the View. Notice that <methodname>Gtk::TreeView::append_column()</"
7092"methodname> is overloaded to accept either a prebuilt <classname>Gtk::"
7093"TreeView::Column</classname> widget, or just the <classname>TreeModelColumn</"
7094"classname> from which it generates an appropriate <classname>Gtk::TreeView::"
7095"Column</classname> widget."
3427msgstr ""7096msgstr ""
nn7097"Använd sedan <methodname>append_column()</methodname> för att lägga till "
7098"vykolumnen till vyn. Observera att <methodname>Gtk::TreeView::"
7099"append_column()</methodname> är överlagrad för att acceptera antingen en "
7100"förbyggd <classname>Gtk::TreeView::Column</classname>-komponent, eller bara "
7101"vår <classname>TreeModelColumn</classname> från vilken den genererar en "
7102"lämplig <classname>Gtk::TreeView::Column</classname>-komponent."
34287103
3429#. (itstool) path: section/para7104#. (itstool) path: section/para
3430#: C/index-in.docbook:28857105#: C/index-in.docbook:2885
nn7106msgid ""
3431msgid "Here is some example code, which has a pixbuf icon and a text name in the7107"Here is some example code, which has a pixbuf icon and a text name in the "
> same column:" 
7108"same column:"
3432msgstr ""7109msgstr ""
nn7110"Här är lite exempelkod som har en pixbuf-ikon och ett textnamn i samma "
7111"kolumn:"
34337112
3434#. (itstool) path: section/programlisting7113#. (itstool) path: section/programlisting
3435#: C/index-in.docbook:28887114#: C/index-in.docbook:2888
n3436#, no-wrapn7115#, fuzzy, no-wrap
3437msgid ""7116msgid ""
3438"<code>auto pColumn = Gtk::make_managed&lt;Gtk::TreeView::Column&gt;(\"Icon Name7117"<code>auto pColumn = Gtk::make_managed&lt;Gtk::TreeView::Column&gt;(\"Icon Name
>\");\n">\");\n"
3439"\n"7118"\n"
3440"// m_columns.icon and m_columns.iconname are columns in the model.\n"7119"// m_columns.icon and m_columns.iconname are columns in the model.\n"
3441"// pColumn is the column in the TreeView:\n"7120"// pColumn is the column in the TreeView:\n"
3442"pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);\n"7121"pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);\n"
3443"pColumn-&gt;pack_start(m_columns.iconname);\n"7122"pColumn-&gt;pack_start(m_columns.iconname);\n"
3444"\n"7123"\n"
3445"m_TreeView.append_column(*pColumn);</code>"7124"m_TreeView.append_column(*pColumn);</code>"
3446msgstr ""7125msgstr ""
nn7126"\n"
7127"auto pColumn = Gtk::make_managed&lt;Gtk::TreeView::Column&gt;(\"Ikonnamn\");\n"
7128"\n"
7129"// m_columns.icon och m_columns.iconname är kolumner i modellen.\n"
7130"// pColumn är kolumnen i vår TreeView:\n"
7131"pColumn-&gt;pack_start(m_columns.icon, /* expand= */ false);\n"
7132"pColumn-&gt;pack_start(m_columns.iconname);\n"
7133"\n"
7134"m_TreeView.append_column(*pColumn);"
34477135
3448#. (itstool) path: section/title7136#. (itstool) path: section/title
3449#: C/index-in.docbook:28997137#: C/index-in.docbook:2899
3450msgid "Specifying CellRenderer details"7138msgid "Specifying CellRenderer details"
n3451msgstr ""n7139msgstr "Ange detaljer för CellRenderer"
34527140
3453#. (itstool) path: section/para7141#. (itstool) path: section/para
3454#: C/index-in.docbook:29017142#: C/index-in.docbook:2901
n3455msgid "The default <classname>CellRenderer</classname>s and their default behavin7143#, fuzzy
>or will normally suffice, but you might occasionally need finer control. For ins 
>tance, this example code from <filename>gtkmm/demos/gtk-demo/example_treeview_tr 
>eestore.cc</filename>, appends a <classname>Gtk::CellRenderer</classname> widget 
> and instructs it to render the data from various model columns through various  
>aspects of its appearance." 
7144msgid ""
7145"The default <classname>CellRenderer</classname>s and their default behavior "
7146"will normally suffice, but you might occasionally need finer control. For "
7147"instance, this example code from <filename>gtkmm/demos/gtk-demo/"
7148"example_treeview_treestore.cc</filename>, appends a <classname>Gtk::"
7149"CellRenderer</classname> widget and instructs it to render the data from "
7150"various model columns through various aspects of its appearance."
3456msgstr ""7151msgstr ""
nn7152"Vanliga <classname>CellRenderer</classname> med sitt standardbeteende räcker "
7153"vanligen, men du kan ibland behöva finare kontroll. Denna exempelkod från "
7154"<filename>gtkmm/demos/gtk-demo/example_treeview_treestore.cc</filename> "
7155"lägger till exempel till en <classname>Gtk::CellRenderer</classname>-"
7156"komponent och instruerar den att rendera data från diverse modellkolumner "
7157"genom olika aspekter av dess utseende."
34577158
3458#. (itstool) path: section/programlisting7159#. (itstool) path: section/programlisting
3459#: C/index-in.docbook:29097160#: C/index-in.docbook:2909
n3460#, no-wrapn7161#, fuzzy, no-wrap
3461msgid ""7162msgid ""
3462"<code>auto cols_count = m_TreeView.append_column_editable(\"Alex\", m_columns.a7163"<code>auto cols_count = m_TreeView.append_column_editable(\"Alex\", m_columns.a
>lex);\n">lex);\n"
3463"auto pColumn = m_TreeView.get_column(cols_count-1);\n"7164"auto pColumn = m_TreeView.get_column(cols_count-1);\n"
3464"if(pColumn)\n"7165"if(pColumn)\n"
3465"{\n"7166"{\n"
3466"  auto pRenderer = static_cast&lt;Gtk::CellRendererToggle*&gt;(pColumn-&gt;get_7167"  auto pRenderer = static_cast&lt;Gtk::CellRendererToggle*&gt;(pColumn-&gt;get_
>first_cell());\n">first_cell());\n"
3467"  pColumn-&gt;add_attribute(pRenderer-&gt;property_visible(), m_columns.visible7168"  pColumn-&gt;add_attribute(pRenderer-&gt;property_visible(), m_columns.visible
>);\n">);\n"
3468"  pColumn-&gt;add_attribute(pRenderer-&gt;property_activatable(), m_columns.wor7169"  pColumn-&gt;add_attribute(pRenderer-&gt;property_activatable(), m_columns.wor
>ld);</code>">ld);</code>"
3469msgstr ""7170msgstr ""
nn7171"auto cols_count = m_TreeView.append_column_editable(\"Alex\", m_columns.alex);\
 >n"
7172"auto pColumn = m_TreeView.get_column(cols_count-1);\n"
7173"if(pColumn)\n"
7174"{\n"
7175"  auto pRenderer = static_cast&lt;Gtk::CellRendererToggle*&gt;(pColumn-&gt;get_
 >first_cell());\n"
7176"  pColumn-&gt;add_attribute(pRenderer-&gt;property_visible(), m_columns.visible
 >);\n"
7177"  pColumn-&gt;add_attribute(pRenderer-&gt;property_activatable(), m_columns.wor
 >ld);"
34707178
3471#. (itstool) path: section/para7179#. (itstool) path: section/para
3472#: C/index-in.docbook:29177180#: C/index-in.docbook:2917
nn7181msgid ""
3473msgid "You can also connect to <classname>CellRenderer</classname> signals to de7182"You can also connect to <classname>CellRenderer</classname> signals to "
>tect user actions. For instance:" 
7183"detect user actions. For instance:"
3474msgstr ""7184msgstr ""
nn7185"Du kan också ansluta till <classname>CellRenderer</classname>-signaler för "
7186"att upptäcka användaråtgärder. Till exempel:"
34757187
3476#. (itstool) path: section/programlisting7188#. (itstool) path: section/programlisting
3477#: C/index-in.docbook:29217189#: C/index-in.docbook:2921
n3478#, no-wrapn7190#, fuzzy, no-wrap
7191#| msgid ""
7192#| "\n"
7193#| "auto pRenderer = Gtk::make_managed&lt;Gtk::CellRendererToggle&gt;();\n"
7194#| "pRenderer-&gt;signal_toggled().connect(\n"
7195#| "    sigc::bind( sigc::mem_fun(*this,\n"
7196#| "        &amp;Example_TreeView_TreeStore::on_cell_toggled), m_columns.dave)\n
 >"
7197#| ");"
3479msgid ""7198msgid ""
3480"<code>auto pRenderer = Gtk::make_managed&lt;Gtk::CellRendererToggle&gt;();\n"7199"<code>auto pRenderer = Gtk::make_managed&lt;Gtk::CellRendererToggle&gt;();\n"
3481"pRenderer-&gt;signal_toggled().connect(\n"7200"pRenderer-&gt;signal_toggled().connect(\n"
3482"    sigc::bind( sigc::mem_fun(*this,\n"7201"    sigc::bind( sigc::mem_fun(*this,\n"
3483"        &amp;Example_TreeView_TreeStore::on_cell_toggled), m_columns.dave)\n"7202"        &amp;Example_TreeView_TreeStore::on_cell_toggled), m_columns.dave)\n"
3484");</code>"7203");</code>"
3485msgstr ""7204msgstr ""
nn7205"\n"
7206"auto pRenderer = Gtk::make_managed&lt;Gtk::CellRendererToggle&gt;();\n"
7207"pRenderer-&gt;signal_toggled().connect(\n"
7208"    sigc::bind( sigc::mem_fun(*this,\n"
7209"        &amp;Example_TreeView_TreeStore::on_cell_toggled), m_columns.dave)\n"
7210");"
34867211
3487#. (itstool) path: section/title7212#. (itstool) path: section/title
n3488#: C/index-in.docbook:2929n7213#: C/index-in.docbook:2929 C/index-in.docbook:3293
3489#: C/index-in.docbook:3293
3490msgid "Editable Cells"7214msgid "Editable Cells"
n3491msgstr ""n7215msgstr "Redigerbara celler"
34927216
3493#. (itstool) path: section/title7217#. (itstool) path: section/title
3494#: C/index-in.docbook:29327218#: C/index-in.docbook:2932
3495msgid "Automatically-stored editable cells."7219msgid "Automatically-stored editable cells."
n3496msgstr ""n7220msgstr "Automatiskt lagrade redigerbara celler."
34977221
3498#. (itstool) path: section/para7222#. (itstool) path: section/para
3499#: C/index-in.docbook:29347223#: C/index-in.docbook:2934
n3500msgid "Cells in a <classname>TreeView</classname> can be edited in-place by the n7224#, fuzzy
>user. To allow this, use the <classname>Gtk::TreeView</classname> <methodname>in 
>sert_column_editable()</methodname> and <methodname>append_column_editable()</me 
>thodname> methods instead of <methodname>insert_column()</methodname> and <metho 
>dname>append_column()</methodname>. When these cells are edited the new values w 
>ill be stored immediately in the Model. Note that these methods are templates wh 
>ich can only be instantiated for simple column types such as <classname>Glib::us 
>tring</classname>, int, and long." 
7225msgid ""
7226"Cells in a <classname>TreeView</classname> can be edited in-place by the "
7227"user. To allow this, use the <classname>Gtk::TreeView</classname> "
7228"<methodname>insert_column_editable()</methodname> and "
7229"<methodname>append_column_editable()</methodname> methods instead of "
7230"<methodname>insert_column()</methodname> and <methodname>append_column()</"
7231"methodname>. When these cells are edited the new values will be stored "
7232"immediately in the Model. Note that these methods are templates which can "
7233"only be instantiated for simple column types such as <classname>Glib::"
7234"ustring</classname>, int, and long."
3501msgstr ""7235msgstr ""
nn7236"Celler i en <classname>TreeView</classname> kan redigeras på plats av "
7237"användaren. För att tillåta detta använder du i <classname>Gtk::TreeView</"
7238"classname> metoderna <methodname>insert_column_editable()</methodname> och "
7239"<methodname>append_column_editable()</methodname> i stället för "
7240"<methodname>insert_column()</methodname> och <methodname>append_column()</"
7241"methodname>. När dessa celler redigeras kommer de nya värdena lagras "
7242"omedelbart i modellen. Observera att dessa metoder är mallar som bara kan "
7243"instansieras för enkla kolumntyper som <classname>Glib::ustring</classname>, "
7244"int, och long."
35027245
3503#. (itstool) path: section/title7246#. (itstool) path: section/title
3504#: C/index-in.docbook:29487247#: C/index-in.docbook:2948
3505msgid "Implementing custom logic for editable cells."7248msgid "Implementing custom logic for editable cells."
n3506msgstr ""n7249msgstr "Implementera anpassad logik för redigerbara celler."
35077250
3508#. (itstool) path: section/para7251#. (itstool) path: section/para
3509#: C/index-in.docbook:29507252#: C/index-in.docbook:2950
n3510msgid "However, you might not want the new values to be stored immediately. For n7253msgid ""
>instance, maybe you want to restrict the input to certain characters or ranges o 
>f values." 
7254"However, you might not want the new values to be stored immediately. For "
7255"instance, maybe you want to restrict the input to certain characters or "
7256"ranges of values."
3511msgstr ""7257msgstr ""
nn7258"Du vill dock kanske inte att de nya värdena ska lagras omedelbart. Du vill "
7259"exempelvis kanske begränsa inmatningen till vissa tecken eller "
7260"teckenintervall."
35127261
3513#. (itstool) path: section/para7262#. (itstool) path: section/para
3514#: C/index-in.docbook:29557263#: C/index-in.docbook:2955
n3515msgid "To achieve this, you should use the normal <classname>Gtk::TreeView</clasn7264#, fuzzy
>sname> <methodname>insert_column()</methodname> and <methodname>append_column()< 
>/methodname> methods, then use <methodname>get_column_cell_renderer()</methodnam 
>e> to get the <classname>Gtk::CellRenderer</classname> used by that column." 
7265msgid ""
7266"To achieve this, you should use the normal <classname>Gtk::TreeView</"
7267"classname> <methodname>insert_column()</methodname> and "
7268"<methodname>append_column()</methodname> methods, then use "
7269"<methodname>get_column_cell_renderer()</methodname> to get the "
7270"<classname>Gtk::CellRenderer</classname> used by that column."
3516msgstr ""7271msgstr ""
nn7272"För att åstadkomma detta bör du i <classname>Gtk::TreeView</classname> "
7273"använda de normala metoderna <methodname>insert_column()</methodname> och "
7274"<methodname>append_column()</methodname>, och sedan använda "
7275"<methodname>get_column_cell_renderer()</methodname> för att får den "
7276"<classname>Gtk::CellRenderer</classname> som används av den kolumnen."
35177277
3518#. (itstool) path: section/para7278#. (itstool) path: section/para
3519#: C/index-in.docbook:29617279#: C/index-in.docbook:2961
n3520msgid "You should then cast that <classname>Gtk::CellRenderer*</classname> to thn7280#, fuzzy
>e specific <classname>CellRenderer</classname> that you expect, so you can use s 
>pecific API." 
7281msgid ""
7282"You should then cast that <classname>Gtk::CellRenderer*</classname> to the "
7283"specific <classname>CellRenderer</classname> that you expect, so you can use "
7284"specific API."
3521msgstr ""7285msgstr ""
nn7286"Du bör sedan typkonvertera den <classname>Gtk::CellRenderer*</classname> "
7287"till den specifika <classname>CellRenderer</classname> som du förväntar dig, "
7288"så du kan använda specifikt API."
35227289
3523#. (itstool) path: section/para7290#. (itstool) path: section/para
3524#: C/index-in.docbook:29657291#: C/index-in.docbook:2965
n3525msgid "For instance, for a CellRendererText, you would set the cell's <emphasis>n7292msgid ""
>editable</emphasis> property to true, like so:" 
7293"For instance, for a CellRendererText, you would set the cell's "
7294"<emphasis>editable</emphasis> property to true, like so:"
3526msgstr ""7295msgstr ""
nn7296"För en CellRendererText skulle du exempelvis ställa in cellens "
7297"<emphasis>editable</emphasis>-egenskap till true, så här:"
35277298
3528#. (itstool) path: section/programlisting7299#. (itstool) path: section/programlisting
3529#: C/index-in.docbook:29687300#: C/index-in.docbook:2968
n3530#, no-wrapn7301#, fuzzy, no-wrap
3531msgid ""7302#| msgid "cell-&gt;property_editable() = true;"
3532"<code>cell-&gt;property_editable() = true;</code>"7303msgid "<code>cell-&gt;property_editable() = true;</code>"
3533msgstr ""7304msgstr "cell-&gt;property_editable() = true;"
35347305
3535#. (itstool) path: section/para7306#. (itstool) path: section/para
3536#: C/index-in.docbook:29697307#: C/index-in.docbook:2969
nn7308msgid ""
3537msgid "For a CellRendererToggle, you would set the <emphasis>activatable</emphas7309"For a CellRendererToggle, you would set the <emphasis>activatable</emphasis> "
>is> property instead." 
7310"property instead."
3538msgstr ""7311msgstr ""
nn7312"För en CellRendererToggle skulle du i stället ställa in egenskapen "
7313"<emphasis>activatable</emphasis>."
35397314
3540#. (itstool) path: section/para7315#. (itstool) path: section/para
3541#: C/index-in.docbook:29737316#: C/index-in.docbook:2973
n3542msgid "You can then connect to the appropriate \"edited\" signal. For instance, n7317#, fuzzy
>connect to <methodname>Gtk::CellRendererText::signal_edited()</methodname>, or < 
>methodname>Gtk::CellRendererToggle::signal_toggled()</methodname>. If the column 
> contains more than one <classname>CellRenderer</classname> then you will need t 
>o use <methodname>Gtk::TreeView::get_column()</methodname> and then call <method 
>name>get_cells()</methodname> on that view Column." 
7318msgid ""
7319"You can then connect to the appropriate \"edited\" signal. For instance, "
7320"connect to <methodname>Gtk::CellRendererText::signal_edited()</methodname>, "
7321"or <methodname>Gtk::CellRendererToggle::signal_toggled()</methodname>. If "
7322"the column contains more than one <classname>CellRenderer</classname> then "
7323"you will need to use <methodname>Gtk::TreeView::get_column()</methodname> "
7324"and then call <methodname>get_cells()</methodname> on that view Column."
3543msgstr ""7325msgstr ""
nn7326"Du kan sedan ansluta till den lämpliga ”edited”-signalen. Anslut exempelvis "
7327"till <methodname>Gtk::CellRendererText::signal_edited()</methodname> eller "
7328"<methodname>Gtk::CellRendererToggle::signal_toggled()</methodname>. Om "
7329"kolumnen innehåller mer än en <classname>CellRenderer</classname> så kommer "
7330"du behöva använda <methodname>Gtk::TreeView::get_column()</methodname> och "
7331"sedan anropa <methodname>get_cells()</methodname> på den vykolumnen."
35447332
3545#. (itstool) path: section/para7333#. (itstool) path: section/para
3546#: C/index-in.docbook:29817334#: C/index-in.docbook:2981
n3547msgid "In your signal handler, you should examine the new value and then store in7335#, fuzzy
>t in the Model if that is appropriate for your application." 
7336msgid ""
7337"In your signal handler, you should examine the new value and then store it "
7338"in the Model if that is appropriate for your application."
3548msgstr ""7339msgstr ""
nn7340"I din signalhanterare bör du undersöka det nya värdet och sedan lagra det i "
7341"modellen om det är lämpligt för ditt program."
35497342
3550#. (itstool) path: section/title7343#. (itstool) path: section/title
3551#: C/index-in.docbook:29907344#: C/index-in.docbook:2990
nn7345#, fuzzy
3552msgid "Iterating over Model Rows"7346msgid "Iterating over Model Rows"
n3553msgstr ""n7347msgstr "Iterera över modellrader"
35547348
3555#. (itstool) path: section/para7349#. (itstool) path: section/para
3556#: C/index-in.docbook:29927350#: C/index-in.docbook:2992
n3557msgid "<classname>Gtk::TreeModel</classname> provides a <phrase role=\"nowrap\">n7351#, fuzzy
>C++</phrase> Standard Library-style container of its children, via the <methodna 
>me>children()</methodname> method. You can use the familiar <methodname>begin()< 
>/methodname> and <methodname>end()</methodname> methods iterator incrementing, l 
>ike so:" 
7352msgid ""
7353"<classname>Gtk::TreeModel</classname> provides a <phrase role=\"nowrap\">C+"
7354"+</phrase> Standard Library-style container of its children, via the "
7355"<methodname>children()</methodname> method. You can use the familiar "
7356"<methodname>begin()</methodname> and <methodname>end()</methodname> methods "
7357"iterator incrementing, like so:"
3558msgstr ""7358msgstr ""
nn7359"<classname>Gtk::TreeModel</classname> tillhandahåller en behållare av sina "
7360"underordnade enligt stilen hos C++-standardbiblioteket, via metoden "
7361"<methodname>children()</methodname>. Du kan använda iteratorökning med de "
7362"bekanta metoderna <methodname>begin()</methodname> och <methodname>end()</"
7363"methodname>, så här:"
35597364
3560#. (itstool) path: section/programlisting7365#. (itstool) path: section/programlisting
3561#: C/index-in.docbook:29987366#: C/index-in.docbook:2998
n3562#, no-wrapn7367#, fuzzy, no-wrap
3563msgid ""7368msgid ""
3564"<code>auto children = refModel-&gt;children();\n"7369"<code>auto children = refModel-&gt;children();\n"
3565"for (auto iter = children.begin(), end = children.end(); iter != end; ++iter)\n7370"for (auto iter = children.begin(), end = children.end(); iter != end; ++iter)\n
>">"
3566"{\n"7371"{\n"
3567"  auto row = *iter;\n"7372"  auto row = *iter;\n"
3568"  //Do something with the row - see above for set/get.\n"7373"  //Do something with the row - see above for set/get.\n"
3569"}</code>"7374"}</code>"
3570msgstr ""7375msgstr ""
nn7376"\n"
7377"auto children = refModel-&gt;children();\n"
7378"for (auto iter = children.begin(), end = children.end(); iter != end; ++iter)\n
 >"
7379"{\n"
7380"  auto row = *iter;\n"
7381"  //Gör något med raden - se ovan för set/get.\n"
7382"}"
35717383
3572#. (itstool) path: section/para7384#. (itstool) path: section/para
3573#: C/index-in.docbook:30047385#: C/index-in.docbook:3004
n3574msgid "If you always want to iterate across the entire range, much more succinctn7386#, fuzzy
> syntax is possible using <phrase role=\"nowrap\">C++</phrase>'s range-based <li 
>teral>for</literal> loop:" 
7387msgid ""
7388"If you always want to iterate across the entire range, much more succinct "
7389"syntax is possible using <phrase role=\"nowrap\">C++</phrase>'s range-based "
7390"<literal>for</literal> loop:"
3575msgstr ""7391msgstr ""
nn7392"Om du alltid vill iterera längs hela intervallet är mycket mer kortfattad "
7393"syntax möjlig med C++:s intervallbaserade <literal>for</literal>-loop:"
35767394
3577#. (itstool) path: section/programlisting7395#. (itstool) path: section/programlisting
3578#: C/index-in.docbook:30087396#: C/index-in.docbook:3008
n3579#, no-wrapn7397#, fuzzy, no-wrap
3580msgid ""7398msgid ""
3581"<code>for (auto row: refModel-&gt;children())\n"7399"<code>for (auto row: refModel-&gt;children())\n"
3582"{\n"7400"{\n"
3583"  //Do something with the row - see above for set/get.\n"7401"  //Do something with the row - see above for set/get.\n"
3584"}</code>"7402"}</code>"
3585msgstr ""7403msgstr ""
nn7404"\n"
7405"for (auto row: refModel-&gt;children())\n"
7406"{\n"
7407"  //Gör något med raden - se ovan för set/get.\n"
7408"}"
35867409
3587#. (itstool) path: section/title7410#. (itstool) path: section/title
3588#: C/index-in.docbook:30147411#: C/index-in.docbook:3014
nn7412#, fuzzy
3589msgid "Row children"7413msgid "Row children"
n3590msgstr ""n7414msgstr "Underordnade rader"
35917415
3592#. (itstool) path: section/para7416#. (itstool) path: section/para
3593#: C/index-in.docbook:30167417#: C/index-in.docbook:3016
n3594msgid "When using a <classname>Gtk::TreeStore</classname>, the rows can have chin7418#, fuzzy
>ld rows, which can have their own children in turn. Use <methodname>Gtk::TreeMod 
>el::Row::children()</methodname> to get the container of child <classname>Row</c 
>lassname>s:" 
7419msgid ""
7420"When using a <classname>Gtk::TreeStore</classname>, the rows can have child "
7421"rows, which can have their own children in turn. Use <methodname>Gtk::"
7422"TreeModel::Row::children()</methodname> to get the container of child "
7423"<classname>Row</classname>s:"
3595msgstr ""7424msgstr ""
nn7425"Vid användning av <classname>Gtk::TreeStore</classname> kan raderna ha "
7426"underordnade rader, vilka i sin tur kan ha egna underordnade. Använd "
7427"<methodname>Gtk::TreeModel::Row::children()</methodname> för att få "
7428"behållaren för underordnade <classname>Row</classname>-rader:"
35967429
3597#. (itstool) path: section/programlisting7430#. (itstool) path: section/programlisting
3598#: C/index-in.docbook:30217431#: C/index-in.docbook:3021
n3599#, no-wrapn7432#, fuzzy, no-wrap
3600msgid ""7433#| msgid "Gtk::TreeModel::Children children = row.children();"
3601"<code>Gtk::TreeModel::Children children = row.children();</code>"7434msgid "<code>Gtk::TreeModel::Children children = row.children();</code>"
3602msgstr ""7435msgstr "Gtk::TreeModel::Children children = row.children();"
36037436
3604#. (itstool) path: section/title7437#. (itstool) path: section/title
3605#: C/index-in.docbook:30277438#: C/index-in.docbook:3027
nn7439#, fuzzy
3606msgid "The Selection"7440msgid "The Selection"
n3607msgstr ""n7441msgstr "Selection"
36087442
3609#. (itstool) path: section/para7443#. (itstool) path: section/para
3610#: C/index-in.docbook:30297444#: C/index-in.docbook:3029
n3611msgid "To find out what rows the user has selected, get the <classname>Gtk::Treen7445#, fuzzy
>View::Selection</classname> object from the <classname>TreeView</classname>, lik 
>e so:" 
7446msgid ""
7447"To find out what rows the user has selected, get the <classname>Gtk::"
7448"TreeView::Selection</classname> object from the <classname>TreeView</"
7449"classname>, like so:"
3612msgstr ""7450msgstr ""
nn7451"För att få reda på vilka rader användaren har markerat tar du objektet "
7452"<classname>Gtk::TreeView::Selection</classname> från vår "
7453"<classname>TreeView</classname>, så här:"
36137454
3614#. (itstool) path: section/programlisting7455#. (itstool) path: section/programlisting
3615#: C/index-in.docbook:30347456#: C/index-in.docbook:3034
n3616#, no-wrapn7457#, fuzzy, no-wrap
3617msgid ""7458#| msgid "auto refTreeSelection = m_TreeView.get_selection();"
3618"<code>auto refTreeSelection = m_TreeView.get_selection();</code>"7459msgid "<code>auto refTreeSelection = m_TreeView.get_selection();</code>"
3619msgstr ""7460msgstr "auto refTreeSelection = m_TreeView.get_selection();"
36207461
3621#. (itstool) path: section/title7462#. (itstool) path: section/title
3622#: C/index-in.docbook:30377463#: C/index-in.docbook:3037
nn7464#, fuzzy
3623msgid "Single or multiple selection"7465msgid "Single or multiple selection"
n3624msgstr ""n7466msgstr "Enkel- eller flermarkering"
36257467
3626#. (itstool) path: section/para7468#. (itstool) path: section/para
3627#: C/index-in.docbook:30397469#: C/index-in.docbook:3039
nn7470#, fuzzy
7471msgid ""
3628msgid "By default, only single rows can be selected, but you can allow multiple 7472"By default, only single rows can be selected, but you can allow multiple "
>selection by setting the mode, like so:" 
7473"selection by setting the mode, like so:"
3629msgstr ""7474msgstr ""
nn7475"Som standard kan endast enskilda rader markeras, men du kan tillåta "
7476"markering av flera genom att ställa in det läget så här:"
36307477
3631#. (itstool) path: section/programlisting7478#. (itstool) path: section/programlisting
3632#: C/index-in.docbook:30437479#: C/index-in.docbook:3043
n3633#, no-wrapn7480#, fuzzy, no-wrap
3634msgid ""7481#| msgid "refTreeSelection-&gt;set_mode(Gtk::SelectionMode::MULTIPLE);"
3635"<code>refTreeSelection-&gt;set_mode(Gtk::SelectionMode::MULTIPLE);</code>"7482msgid "<code>refTreeSelection-&gt;set_mode(Gtk::SelectionMode::MULTIPLE);</code>
 >"
3636msgstr ""7483msgstr "refTreeSelection-&gt;set_mode(Gtk::SelectionMode::MULTIPLE);"
36377484
3638#. (itstool) path: section/title7485#. (itstool) path: section/title
3639#: C/index-in.docbook:30477486#: C/index-in.docbook:3047
nn7487#, fuzzy
3640msgid "The selected rows"7488msgid "The selected rows"
n3641msgstr ""n7489msgstr "De markerade raderna"
36427490
3643#. (itstool) path: section/para7491#. (itstool) path: section/para
3644#: C/index-in.docbook:30497492#: C/index-in.docbook:3049
nn7493#, fuzzy
7494msgid ""
3645msgid "For single-selection, you can just call <methodname>get_selected()</metho7495"For single-selection, you can just call <methodname>get_selected()</"
>dname>, like so:" 
7496"methodname>, like so:"
3646msgstr ""7497msgstr ""
nn7498"För enkelmarkering kan du helt enkelt anropa <methodname>get_selected()</"
7499"methodname>, så här:"
36477500
3648#. (itstool) path: section/programlisting7501#. (itstool) path: section/programlisting
3649#: C/index-in.docbook:30537502#: C/index-in.docbook:3053
n3650#, no-wrapn7503#, fuzzy, no-wrap
3651msgid ""7504msgid ""
3652"<code>auto iter = refTreeSelection-&gt;get_selected();\n"7505"<code>auto iter = refTreeSelection-&gt;get_selected();\n"
3653"if(iter) //If anything is selected\n"7506"if(iter) //If anything is selected\n"
3654"{\n"7507"{\n"
3655"  auto row = *iter;\n"7508"  auto row = *iter;\n"
3656"  //Do something with the row.\n"7509"  //Do something with the row.\n"
3657"}</code>"7510"}</code>"
3658msgstr ""7511msgstr ""
nn7512"auto iter = refTreeSelection-&gt;get_selected();\n"
7513"if(iter) //Om något är markerat\n"
7514"{\n"
7515"  auto row = *iter;\n"
7516"  //Gör något med raden.\n"
7517"}"
36597518
3660#. (itstool) path: section/para7519#. (itstool) path: section/para
3661#: C/index-in.docbook:30607520#: C/index-in.docbook:3060
n3662msgid "For multiple-selection, you need to call <methodname>get_selected_rows()<n7521#, fuzzy
>/methodname> or define a callback, and give it to <methodname>selected_foreach() 
></methodname>, <methodname>selected_foreach_path()</methodname>, or <methodname> 
>selected_foreach_iter()</methodname>, like so:" 
7522msgid ""
7523"For multiple-selection, you need to call <methodname>get_selected_rows()</"
7524"methodname> or define a callback, and give it to "
7525"<methodname>selected_foreach()</methodname>, "
7526"<methodname>selected_foreach_path()</methodname>, or "
7527"<methodname>selected_foreach_iter()</methodname>, like so:"
3663msgstr ""7528msgstr ""
nn7529"För flermarkering behöver du anropa <methodname>get_selected_rows()</"
7530"methodname> eller definiera ett återanrop och ge det till "
7531"<methodname>selected_foreach()</methodname>, "
7532"<methodname>selected_foreach_path()</methodname> eller "
7533"<methodname>selected_foreach_iter()</methodname>, så här:"
36647534
3665#. (itstool) path: section/programlisting7535#. (itstool) path: section/programlisting
3666#: C/index-in.docbook:30677536#: C/index-in.docbook:3067
n3667#, no-wrapn7537#, fuzzy, no-wrap
7538#| msgid ""
7539#| "refTreeSelection-&gt;selected_foreach_iter(\n"
7540#| "    sigc::mem_fun(*this, &amp;TheClass::selected_row_callback) );\n"
7541#| "\n"
7542#| "void TheClass::selected_row_callback(\n"
7543#| "    const Gtk::TreeModel::const_iterator&amp; iter)\n"
7544#| "{\n"
7545#| "  auto row = *iter;\n"
7546#| "  //Do something with the row.\n"
7547#| "}"
3668msgid ""7548msgid ""
3669"<code>refTreeSelection-&gt;selected_foreach_iter(\n"7549"<code>refTreeSelection-&gt;selected_foreach_iter(\n"
3670"    sigc::mem_fun(*this, &amp;TheClass::selected_row_callback) );\n"7550"    sigc::mem_fun(*this, &amp;TheClass::selected_row_callback) );\n"
3671"\n"7551"\n"
3672"void TheClass::selected_row_callback(\n"7552"void TheClass::selected_row_callback(\n"
3674"{\n"7554"{\n"
3675"  auto row = *iter;\n"7555"  auto row = *iter;\n"
3676"  //Do something with the row.\n"7556"  //Do something with the row.\n"
3677"}</code>"7557"}</code>"
3678msgstr ""7558msgstr ""
nn7559"refTreeSelection-&gt;selected_foreach_iter(\n"
7560"    sigc::mem_fun(*this, &amp;TheClass::selected_row_callback) );\n"
7561"\n"
7562"void TheClass::selected_row_callback(\n"
7563"    const Gtk::TreeModel::const_iterator&amp; iter)\n"
7564"{\n"
7565"  auto row = *iter;\n"
7566"  //Gör något med raden.\n"
7567"}"
36797568
3680#. (itstool) path: section/title7569#. (itstool) path: section/title
3681#: C/index-in.docbook:30807570#: C/index-in.docbook:3080
3682msgid "The \"changed\" signal"7571msgid "The \"changed\" signal"
n3683msgstr ""n7572msgstr "Signalen ”changed”"
36847573
3685#. (itstool) path: section/para7574#. (itstool) path: section/para
3686#: C/index-in.docbook:30827575#: C/index-in.docbook:3082
nn7576msgid ""
3687msgid "To respond to the user clicking on a row or range of rows, connect to the7577"To respond to the user clicking on a row or range of rows, connect to the "
> signal like so:" 
7578"signal like so:"
3688msgstr ""7579msgstr ""
nn7580"För att svara på att användaren klickar på en rad eller ett radintervall "
7581"ansluter du till signalen så här:"
36897582
3690#. (itstool) path: section/programlisting7583#. (itstool) path: section/programlisting
3691#: C/index-in.docbook:30867584#: C/index-in.docbook:3086
n3692#, no-wrapn7585#, fuzzy, no-wrap
7586#| msgid ""
7587#| "refTreeSelection-&gt;signal_changed().connect(\n"
7588#| "    sigc::mem_fun(*this, &amp;Example_IconTheme::on_selection_changed)\n"
7589#| ");"
3693msgid ""7590msgid ""
3694"<code>refTreeSelection-&gt;signal_changed().connect(\n"7591"<code>refTreeSelection-&gt;signal_changed().connect(\n"
3695"    sigc::mem_fun(*this, &amp;Example_IconTheme::on_selection_changed)\n"7592"    sigc::mem_fun(*this, &amp;Example_IconTheme::on_selection_changed)\n"
3696");</code>"7593");</code>"
3697msgstr ""7594msgstr ""
nn7595"refTreeSelection-&gt;signal_changed().connect(\n"
7596"    sigc::mem_fun(*this, &amp;Example_IconTheme::on_selection_changed)\n"
7597");"
36987598
3699#. (itstool) path: section/title7599#. (itstool) path: section/title
3700#: C/index-in.docbook:30927600#: C/index-in.docbook:3092
nn7601#, fuzzy
3701msgid "Preventing row selection"7602msgid "Preventing row selection"
n3702msgstr ""n7603msgstr "Förhindra radmarkering"
37037604
3704#. (itstool) path: section/para7605#. (itstool) path: section/para
3705#: C/index-in.docbook:30947606#: C/index-in.docbook:3094
n3706msgid "Maybe the user should not be able to select every item in your list or trn7607#, fuzzy
>ee. For instance, in the gtk-demo, you can select a demo to see the source code, 
> but it doesn't make any sense to select a demo category." 
7608msgid ""
7609"Maybe the user should not be able to select every item in your list or tree. "
7610"For instance, in the gtk-demo, you can select a demo to see the source code, "
7611"but it doesn't make any sense to select a demo category."
3707msgstr ""7612msgstr ""
nn7613"Kanske användaren inte ska kunna markera alla objekt i din lista eller ditt "
7614"träd. Exempelvis kan du i gtk-demo välja en demonstration för att se "
7615"källkoden, men det är nonsens att markera en demonstrationskategori."
37087616
3709#. (itstool) path: section/para7617#. (itstool) path: section/para
3710#: C/index-in.docbook:30997618#: C/index-in.docbook:3099
n3711msgid "To control which rows can be selected, use the <methodname>set_select_funn7619#, fuzzy
>ction()</methodname> method, providing a <classname>sigc::slot</classname> callb 
>ack. For instance:" 
7620msgid ""
7621"To control which rows can be selected, use the "
7622"<methodname>set_select_function()</methodname> method, providing a "
7623"<classname>sigc::slot</classname> callback. For instance:"
3712msgstr ""7624msgstr ""
nn7625"För att styra vilka rader som kan markeras använder du metoden "
7626"<methodname>set_select_function()</methodname>, som tillhandahåller ett "
7627"<classname>sigc::slot</classname>-återanrop. Till exempel:"
37137628
3714#. (itstool) path: section/programlisting7629#. (itstool) path: section/programlisting
3715#: C/index-in.docbook:31047630#: C/index-in.docbook:3104
n3716#, no-wrapn7631#, fuzzy, no-wrap
7632#| msgid ""
7633#| "m_refTreeSelection-&gt;set_select_function( sigc::mem_fun(*this,\n"
7634#| "    &amp;DemoWindow::select_function) );"
3717msgid ""7635msgid ""
3718"<code>m_refTreeSelection-&gt;set_select_function( sigc::mem_fun(*this,\n"7636"<code>m_refTreeSelection-&gt;set_select_function( sigc::mem_fun(*this,\n"
3719"    &amp;DemoWindow::select_function) );</code>"7637"    &amp;DemoWindow::select_function) );</code>"
3720msgstr ""7638msgstr ""
nn7639"m_refTreeSelection-&gt;set_select_function( sigc::mem_fun(*this,\n"
7640"    &amp;DemoWindow::select_function) );"
37217641
3722#. (itstool) path: section/para7642#. (itstool) path: section/para
3723#: C/index-in.docbook:31067643#: C/index-in.docbook:3106
3724msgid "and then"7644msgid "and then"
n3725msgstr ""n7645msgstr "och sedan"
37267646
3727#. (itstool) path: section/programlisting7647#. (itstool) path: section/programlisting
3728#: C/index-in.docbook:31097648#: C/index-in.docbook:3109
n3729#, no-wrapn7649#, fuzzy, no-wrap
3730msgid ""7650msgid ""
3731"<code>bool DemoWindow::select_function(\n"7651"<code>bool DemoWindow::select_function(\n"
3732"    const Glib::RefPtr&lt;Gtk::TreeModel&gt;&amp; model,\n"7652"    const Glib::RefPtr&lt;Gtk::TreeModel&gt;&amp; model,\n"
3733"    const Gtk::TreeModel::Path&amp; path, bool)\n"7653"    const Gtk::TreeModel::Path&amp; path, bool)\n"
3734"{\n"7654"{\n"
3735"  const auto iter = model-&gt;get_iter(path);\n"7655"  const auto iter = model-&gt;get_iter(path);\n"
3736"  return iter-&gt;children().empty(); // only allow leaf nodes to be selected\n7656"  return iter-&gt;children().empty(); // only allow leaf nodes to be selected\n
>">"
3737"}</code>"7657"}</code>"
3738msgstr ""7658msgstr ""
nn7659"bool DemoWindow::select_function(\n"
7660"    const Glib::RefPtr&lt;Gtk::TreeModel&gt;&amp; model,\n"
7661"    const Gtk::TreeModel::Path&amp; path, bool)\n"
7662"{\n"
7663"  const auto iter = model-&gt;get_iter(path);\n"
7664"  return iter-&gt;children().empty(); // tillåt endast lövnoder att markeras\n"
7665"}"
37397666
3740#. (itstool) path: section/title7667#. (itstool) path: section/title
3741#: C/index-in.docbook:31197668#: C/index-in.docbook:3119
nn7669#, fuzzy
3742msgid "Changing the selection"7670msgid "Changing the selection"
n3743msgstr ""n7671msgstr "Ändra markeringen"
37447672
3745#. (itstool) path: section/para7673#. (itstool) path: section/para
3746#: C/index-in.docbook:31217674#: C/index-in.docbook:3121
n3747msgid "To change the selection, specify a <classname>Gtk::TreeModel::iterator</cn7675#, fuzzy
>lassname> or <classname>Gtk::TreeModel::Row</classname>, like so:" 
7676msgid ""
7677"To change the selection, specify a <classname>Gtk::TreeModel::iterator</"
7678"classname> or <classname>Gtk::TreeModel::Row</classname>, like so:"
3748msgstr ""7679msgstr ""
nn7680"För att ändra markeringen, ange en <classname>Gtk::TreeModel::iterator</"
7681"classname> eller <classname>Gtk::TreeModel::Row</classname>, så här:"
37497682
3750#. (itstool) path: section/programlisting7683#. (itstool) path: section/programlisting
3751#: C/index-in.docbook:31267684#: C/index-in.docbook:3126
n3752#, no-wrapn7685#, fuzzy, no-wrap
7686#| msgid ""
7687#| "auto row = m_refModel-&gt;children()[5]; //The sixth row.\n"
7688#| "if(row)\n"
7689#| "  refTreeSelection-&gt;select(row.get_iter());"
3753msgid ""7690msgid ""
3754"<code>auto row = m_refModel-&gt;children()[5]; //The sixth row.\n"7691"<code>auto row = m_refModel-&gt;children()[5]; //The sixth row.\n"
3755"if(row)\n"7692"if(row)\n"
3756"  refTreeSelection-&gt;select(row.get_iter());</code>"7693"  refTreeSelection-&gt;select(row.get_iter());</code>"
3757msgstr ""7694msgstr ""
nn7695"auto row = m_refModel-&gt;children()[5]; //Den sjätte raden.\n"
7696"if(row)\n"
7697"  refTreeSelection-&gt;select(row.get_iter());"
37587698
3759#. (itstool) path: section/para7699#. (itstool) path: section/para
3760#: C/index-in.docbook:31297700#: C/index-in.docbook:3129
3761msgid "or"7701msgid "or"
n3762msgstr ""n7702msgstr "eller"
37637703
3764#. (itstool) path: section/programlisting7704#. (itstool) path: section/programlisting
3765#: C/index-in.docbook:31327705#: C/index-in.docbook:3132
n3766#, no-wrapn7706#, fuzzy, no-wrap
7707#| msgid ""
7708#| "auto iter = m_refModel-&gt;children().begin()\n"
7709#| "if(iter)\n"
7710#| "  refTreeSelection-&gt;select(iter);"
3767msgid ""7711msgid ""
3768"<code>auto iter = m_refModel-&gt;children().begin()\n"7712"<code>auto iter = m_refModel-&gt;children().begin()\n"
3769"if(iter)\n"7713"if(iter)\n"
3770"  refTreeSelection-&gt;select(iter);</code>"7714"  refTreeSelection-&gt;select(iter);</code>"
3771msgstr ""7715msgstr ""
nn7716"auto iter = m_refModel-&gt;children().begin()\n"
7717"if(iter)\n"
7718"  refTreeSelection-&gt;select(iter);"
37727719
3773#. (itstool) path: section/para7720#. (itstool) path: section/para
3774#: C/index-in.docbook:31417721#: C/index-in.docbook:3141
n3775msgid "The standard tree models (<classname>TreeStore</classname> and <classnamen7722msgid ""
>>ListStore</classname>) derive from <classname>TreeSortable</classname>, so they 
> offer sorting functionality. For instance, call <methodname>set_sort_column()</ 
>methodname>, to sort the model by the specified column. Or supply a callback fun 
>ction to <methodname>set_sort_func()</methodname> to implement a more complicate 
>d sorting algorithm." 
7723"The standard tree models (<classname>TreeStore</classname> and "
7724"<classname>ListStore</classname>) derive from <classname>TreeSortable</"
7725"classname>, so they offer sorting functionality. For instance, call "
7726"<methodname>set_sort_column()</methodname>, to sort the model by the "
7727"specified column. Or supply a callback function to "
7728"<methodname>set_sort_func()</methodname> to implement a more complicated "
7729"sorting algorithm."
3776msgstr ""7730msgstr ""
nn7731"Standardträdmodellerna (<classname>TreeStore</classname> och "
7732"<classname>ListStore</classname>) härleds från <classname>TreeSortable</"
7733"classname>, så de erbjuder funktionalitet för sortering. Anropa exempelvis "
7734"<methodname>set_sort_column()</methodname> för att sortera modellen efter "
7735"angiven kolumn. Eller tillhandahåll en återanropsfunktion till "
7736"<methodname>set_sort_func()</methodname> för att implementera en mer "
7737"komplicerad sorteringsalgoritm."
37777738
3778#. (itstool) path: section/para7739#. (itstool) path: section/para
3779#: C/index-in.docbook:31457740#: C/index-in.docbook:3145
n3780msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n7741msgid ""
>1TreeSortable.html\">TreeSortable Reference</link>" 
7742"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
7743"classGtk_1_1TreeSortable.html\">TreeSortable Reference</link>"
3781msgstr ""7744msgstr ""
nn7745"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
7746"classGtk_1_1TreeSortable.html\">Referens för TreeSortable</link>"
37827747
3783#. (itstool) path: section/title7748#. (itstool) path: section/title
3784#: C/index-in.docbook:31487749#: C/index-in.docbook:3148
3785msgid "Sorting by clicking on columns"7750msgid "Sorting by clicking on columns"
n3786msgstr ""n7751msgstr "Sortering genom att klicka på kolumner"
37877752
3788#. (itstool) path: section/para7753#. (itstool) path: section/para
3789#: C/index-in.docbook:31507754#: C/index-in.docbook:3150
n3790msgid "So that a user can click on a <classname>TreeView</classname>'s column hen7755#, fuzzy
>ader to sort the <classname>TreeView</classname>'s contents, call <methodname>Gt 
>k::TreeView::Column::set_sort_column()</methodname>, supplying the model column  
>on which model should be sorted when the header is clicked. For instance:" 
7756msgid ""
7757"So that a user can click on a <classname>TreeView</classname>'s column "
7758"header to sort the <classname>TreeView</classname>'s contents, call "
7759"<methodname>Gtk::TreeView::Column::set_sort_column()</methodname>, supplying "
7760"the model column on which model should be sorted when the header is clicked. "
7761"For instance:"
3791msgstr ""7762msgstr ""
nn7763"För att en användare ska kunna klicka på kolumnrubriken för en "
7764"<classname>TreeView</classname> för att sortera innehållet i denna "
7765"<classname>TreeView</classname> så anropar du <methodname>Gtk::TreeView::"
7766"Column::set_sort_column()</methodname>, och tillhandahåller modellkolumnen "
7767"för vilken modell som ska sorteras när rubriken klickas på. Till exempel:"
37927768
3793#. (itstool) path: section/programlisting7769#. (itstool) path: section/programlisting
3794#: C/index-in.docbook:31537770#: C/index-in.docbook:3153
n3795#, no-wrapn7771#, fuzzy, no-wrap
7772#| msgid ""
7773#| "auto pColumn = treeview.get_column(0);\n"
7774#| "if(pColumn)\n"
7775#| "  pColumn-&gt;set_sort_column(m_columns.m_col_id);"
3796msgid ""7776msgid ""
3797"<code>auto pColumn = treeview.get_column(0);\n"7777"<code>auto pColumn = treeview.get_column(0);\n"
3798"if(pColumn)\n"7778"if(pColumn)\n"
3799"  pColumn-&gt;set_sort_column(m_columns.m_col_id);</code>"7779"  pColumn-&gt;set_sort_column(m_columns.m_col_id);</code>"
3800msgstr ""7780msgstr ""
nn7781"auto pColumn = treeview.get_column(0);\n"
7782"if(pColumn)\n"
7783"  pColumn-&gt;set_sort_column(m_columns.m_col_id);"
38017784
3802#. (itstool) path: section/title7785#. (itstool) path: section/title
3803#: C/index-in.docbook:31597786#: C/index-in.docbook:3159
nn7787#, fuzzy
3804msgid "Independently sorted views of the same model"7788msgid "Independently sorted views of the same model"
n3805msgstr ""n7789msgstr "Oberoende sorterade vyer av samma modell"
38067790
3807#. (itstool) path: section/para7791#. (itstool) path: section/para
3808#: C/index-in.docbook:31617792#: C/index-in.docbook:3161
n3809msgid "The <classname>TreeView</classname> already allows you to show the same <n7793#, fuzzy
>classname>TreeModel</classname> in two <classname>TreeView</classname> widgets.  
>If you need one of these TreeViews to sort the model differently than the other  
>then you should use a <classname>TreeModelSort</classname> instead of just, for  
>instance, <methodname>Gtk::TreeViewColumn::set_sort_column()</methodname>. <clas 
>sname>TreeModelSort</classname> is a model that contains another model, presenti 
>ng a sorted version of that model. For instance, you might add a sorted version  
>of a model to a <classname>TreeView</classname> like so:" 
7794msgid ""
7795"The <classname>TreeView</classname> already allows you to show the same "
7796"<classname>TreeModel</classname> in two <classname>TreeView</classname> "
7797"widgets. If you need one of these TreeViews to sort the model differently "
7798"than the other then you should use a <classname>TreeModelSort</classname> "
7799"instead of just, for instance, <methodname>Gtk::TreeViewColumn::"
7800"set_sort_column()</methodname>. <classname>TreeModelSort</classname> is a "
7801"model that contains another model, presenting a sorted version of that "
7802"model. For instance, you might add a sorted version of a model to a "
7803"<classname>TreeView</classname> like so:"
3810msgstr ""7804msgstr ""
nn7805"<classname>TreeView</classname> låter dig redan visa samma "
7806"<classname>TreeModel</classname> i två <classname>TreeView</classname>-"
7807"komponenter. Om du behöver att en av dessa TreeView ska sortera modellen på "
7808"ett annat sätt än den andra så bör du använda en <classname>TreeModelSort</"
7809"classname> i stället för att exempelvis bara använda, <methodname>Gtk::"
7810"TreeViewColumn::set_sort_column()</methodname>. <classname>TreeModelSort</"
7811"classname> är en modell som innehåller en annan modell, och presenterar en "
7812"sorterad version av den modellen. Du lägger exempelvis kanske till en "
7813"sorterad version av en modell till en <classname>TreeView</classname> så här:"
38117814
3812#. (itstool) path: section/programlisting7815#. (itstool) path: section/programlisting
3813#: C/index-in.docbook:31697816#: C/index-in.docbook:3169
n3814#, no-wrapn7817#, fuzzy, no-wrap
3815msgid ""7818msgid ""
3816"<code>auto sorted_model = Gtk::TreeModelSort::create(model);\n"7819"<code>auto sorted_model = Gtk::TreeModelSort::create(model);\n"
3817"sorted_model-&gt;set_sort_column(columns.m_col_name, Gtk::SortType::ASCENDING);7820"sorted_model-&gt;set_sort_column(columns.m_col_name, Gtk::SortType::ASCENDING);
>\n">\n"
3818"treeview.set_model(sorted_model);</code>"7821"treeview.set_model(sorted_model);</code>"
3819msgstr ""7822msgstr ""
nn7823"auto sorted_model = Gtk::TreeModelSort::create(model);\n"
7824"sorted_model-&gt;set_sort_column(columns.m_col_name, Gtk::SortType::ASCENDING);
 >\n"
7825"treeview.set_model(sorted_model);"
38207826
3821#. (itstool) path: section/para7827#. (itstool) path: section/para
3822#: C/index-in.docbook:31737828#: C/index-in.docbook:3173
n3823msgid "Note, however, that the TreeView will provide iterators to the sorted modn7829#, fuzzy
>el. You must convert them to iterators to the underlying child model in order to 
> perform actions on that model. For instance:" 
7830msgid ""
7831"Note, however, that the TreeView will provide iterators to the sorted model. "
7832"You must convert them to iterators to the underlying child model in order to "
7833"perform actions on that model. For instance:"
3824msgstr ""7834msgstr ""
nn7835"Observera docka att vår TreeView kommer tillhandahålla iteratorer till den "
7836"sorterade modellen. Du måste konvertera dem till iteratorer till den "
7837"underliggande underordnade modellen för att utföra åtgärder på den modellen. "
7838"Till exempel:"
38257839
3826#. (itstool) path: section/programlisting7840#. (itstool) path: section/programlisting
3827#: C/index-in.docbook:31757841#: C/index-in.docbook:3175
n3828#, no-wrapn7842#, fuzzy, no-wrap
7843#| msgid ""
7844#| "void ExampleWindow::on_button_delete()\n"
7845#| "{\n"
7846#| "  auto refTreeSelection = m_treeview.get_selection();\n"
7847#| "  if(refTreeSelection)\n"
7848#| "  {\n"
7849#| "    auto sorted_iter = m_refTreeSelection-&gt;get_selected();\n"
7850#| "    if(sorted_iter)\n"
7851#| "    {\n"
7852#| "      auto iter = m_refModelSort-&gt;convert_iter_to_child_iter(sorted_iter)
 >;\n"
7853#| "      m_refModel-&gt;erase(iter);\n"
7854#| "    }\n"
7855#| "  }\n"
7856#| "}"
3829msgid ""7857msgid ""
3830"<code>void ExampleWindow::on_button_delete()\n"7858"<code>void ExampleWindow::on_button_delete()\n"
3831"{\n"7859"{\n"
3832"  auto refTreeSelection = m_treeview.get_selection();\n"7860"  auto refTreeSelection = m_treeview.get_selection();\n"
3833"  if(refTreeSelection)\n"7861"  if(refTreeSelection)\n"
3839"      m_refModel-&gt;erase(iter);\n"7867"      m_refModel-&gt;erase(iter);\n"
3840"    }\n"7868"    }\n"
3841"  }\n"7869"  }\n"
3842"}</code>"7870"}</code>"
3843msgstr ""7871msgstr ""
nn7872"void ExampleWindow::on_button_delete()\n"
7873"{\n"
7874"  auto refTreeSelection = m_treeview.get_selection();\n"
7875"  if(refTreeSelection)\n"
7876"  {\n"
7877"    auto sorted_iter = m_refTreeSelection-&gt;get_selected();\n"
7878"    if(sorted_iter)\n"
7879"    {\n"
7880"      auto iter = m_refModelSort-&gt;convert_iter_to_child_iter(sorted_iter);\n
 >"
7881"      m_refModel-&gt;erase(iter);\n"
7882"    }\n"
7883"  }\n"
7884"}"
38447885
3845#. (itstool) path: section/para7886#. (itstool) path: section/para
3846#: C/index-in.docbook:31897887#: C/index-in.docbook:3189
n3847msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n7888msgid ""
>1TreeModelSort.html\">TreeModelSort Reference</link>" 
7889"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
7890"classGtk_1_1TreeModelSort.html\">TreeModelSort Reference</link>"
3848msgstr ""7891msgstr ""
nn7892"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
7893"classGtk_1_1TreeModelSort.html\">Referens för TreeModelSort</link>"
38497894
3850#. (itstool) path: section/title7895#. (itstool) path: section/title
3851#. (itstool) path: chapter/title7896#. (itstool) path: chapter/title
3852#. (itstool) path: figure/title7897#. (itstool) path: figure/title
n3853#: C/index-in.docbook:3195n7898#: C/index-in.docbook:3195 C/index-in.docbook:3313 C/index-in.docbook:5299
3854#: C/index-in.docbook:3313
3855#: C/index-in.docbook:5299
3856#: C/index-in.docbook:54577899#: C/index-in.docbook:5457
3857msgid "Drag and Drop"7900msgid "Drag and Drop"
n3858msgstr ""n7901msgstr "Dra och släpp"
38597902
3860#. (itstool) path: section/para7903#. (itstool) path: section/para
3861#: C/index-in.docbook:31977904#: C/index-in.docbook:3197
n3862msgid "<classname>Gtk::TreeView</classname> already implements simple drag-and-dn7905#, fuzzy
>rop when used with the <classname>Gtk::ListStore</classname> or <classname>Gtk:: 
>TreeStore</classname> models (since gtk 4.8). If necessary, it also allows you t 
>o implement more complex behavior when items are dragged and dropped, using the  
>normal <link linkend=\"chapter-draganddrop\">Drag and Drop</link> API." 
7906msgid ""
7907"<classname>Gtk::TreeView</classname> already implements simple drag-and-drop "
7908"when used with the <classname>Gtk::ListStore</classname> or <classname>Gtk::"
7909"TreeStore</classname> models (since gtk 4.8). If necessary, it also allows "
7910"you to implement more complex behavior when items are dragged and dropped, "
7911"using the normal <link linkend=\"chapter-draganddrop\">Drag and Drop</link> "
7912"API."
3863msgstr ""7913msgstr ""
nn7914"<classname>Gtk::TreeView</classname> implementerar redan enkelt dra-och-"
7915"släpp när den används med <classname>Gtk::ListStore</classname>- eller "
7916"<classname>Gtk::TreeStore</classname>-modellerna. Om nödvändigt låter den "
7917"dig också implementera mer komplext beteende när objekt dras och släpps, med "
7918"det vanliga <link linkend=\"chapter-draganddrop\">Dra och släpp</link>-API:t."
38647919
3865#. (itstool) path: section/title7920#. (itstool) path: section/title
3866#: C/index-in.docbook:32067921#: C/index-in.docbook:3206
nn7922#, fuzzy
3867msgid "Reorderable rows"7923msgid "Reorderable rows"
n3868msgstr ""n7924msgstr "Rader vars ordning går ändra"
38697925
3870#. (itstool) path: section/para7926#. (itstool) path: section/para
3871#: C/index-in.docbook:32087927#: C/index-in.docbook:3208
n3872msgid "If you call <methodname>Gtk::TreeView::set_reorderable()</methodname> then7928#, fuzzy
>n your TreeView's items can be moved within the treeview itself. This is demonst 
>rated in the <classname>TreeStore</classname> example." 
7929msgid ""
7930"If you call <methodname>Gtk::TreeView::set_reorderable()</methodname> then "
7931"your TreeView's items can be moved within the treeview itself. This is "
7932"demonstrated in the <classname>TreeStore</classname> example."
3873msgstr ""7933msgstr ""
nn7934"Om du anropar <methodname>Gtk::TreeView::set_reorderable()</methodname> så "
7935"kan objekten i din TreeView flyttas i själva trädvyn. Detta demonstreras i "
7936"<classname>TreeStore</classname>-exemplet."
38747937
3875#. (itstool) path: section/para7938#. (itstool) path: section/para
3876#: C/index-in.docbook:32137939#: C/index-in.docbook:3213
n3877msgid "However, this does not allow you any control of which items can be draggen7940#, fuzzy
>d, and where they can be dropped. If you need that extra control then you might  
>create a derived <literal>Gtk::TreeModel</literal> from <literal>Gtk::TreeStore< 
>/literal> or <literal>Gtk::ListStore</literal> and override the <literal>Gtk::Tr 
>eeDragSource::row_draggable_vfunc()</literal> and <literal>Gtk::TreeDragDest::ro 
>w_drop_possible_vfunc()</literal> virtual methods. You can examine the <literal> 
>Gtk::TreeModel::Path</literal>s provided and allow or disallow dragging or dropp 
>ing by returning <literal>true</literal> or <literal>false</literal>." 
7941msgid ""
7942"However, this does not allow you any control of which items can be dragged, "
7943"and where they can be dropped. If you need that extra control then you might "
7944"create a derived <literal>Gtk::TreeModel</literal> from <literal>Gtk::"
7945"TreeStore</literal> or <literal>Gtk::ListStore</literal> and override the "
7946"<literal>Gtk::TreeDragSource::row_draggable_vfunc()</literal> and "
7947"<literal>Gtk::TreeDragDest::row_drop_possible_vfunc()</literal> virtual "
7948"methods. You can examine the <literal>Gtk::TreeModel::Path</literal>s "
7949"provided and allow or disallow dragging or dropping by returning "
7950"<literal>true</literal> or <literal>false</literal>."
3878msgstr ""7951msgstr ""
nn7952"Detta låter dig dock inte styra vilka objekt som kan dras, och var de kan "
7953"släppas. Om du behöver den extra kontrollen så kan du skapa en härledd "
7954"<literal>Gtk::TreeModel</literal> från <literal>Gtk::TreeStore</literal> "
7955"eller <literal>Gtk::ListStore</literal> åsidosätta de virtuella metoderna "
7956"<literal>Gtk::TreeDragSource::row_draggable_vfunc()</literal> och "
7957"<literal>Gtk::TreeDragDest::row_drop_possible_vfunc()</literal>. Du kan "
7958"undersöka de <literal>Gtk::TreeModel::Path</literal> som tillhandahålls och "
7959"tillåta eller förbjuda dragning eller släppning genom att returnera "
7960"<literal>true</literal> eller <literal>false</literal>."
38797961
3880#. (itstool) path: section/para7962#. (itstool) path: section/para
3881#: C/index-in.docbook:32207963#: C/index-in.docbook:3220
3882msgid "This is demonstrated in the drag_and_drop example."7964msgid "This is demonstrated in the drag_and_drop example."
n3883msgstr ""n7965msgstr "Detta demonstreras i dra-och-släpp-exemplet."
38847966
3885#. (itstool) path: section/title7967#. (itstool) path: section/title
n3886#: C/index-in.docbook:3226n7968#: C/index-in.docbook:3226 C/index-in.docbook:3336
3887#: C/index-in.docbook:3336
3888msgid "Popup Context Menu"7969msgid "Popup Context Menu"
n3889msgstr ""n7970msgstr "Poppuppsnabbvalsmeny"
38907971
3891#. (itstool) path: section/para7972#. (itstool) path: section/para
3892#: C/index-in.docbook:32287973#: C/index-in.docbook:3228
n3893msgid "Lots of people need to implement right-click context menus for <classnamen7974#, fuzzy
>>TreeView</classname>s so we will explain how to do that here to save you some t 
>ime. It's much the same as a normal context menu, as described in the <link link 
>end=\"sec-menus-popup\">menus chapter</link>. You use a <classname>Gtk::GestureC 
>lick</classname> to detect the mouse click." 
7975msgid ""
7976"Lots of people need to implement right-click context menus for "
7977"<classname>TreeView</classname>s so we will explain how to do that here to "
7978"save you some time. It's much the same as a normal context menu, as "
7979"described in the <link linkend=\"sec-menus-popup\">menus chapter</link>. You "
7980"use a <classname>Gtk::GestureClick</classname> to detect the mouse click."
3894msgstr ""7981msgstr ""
nn7982"Det finns många som behöver implementera snabbvalsmenyer åtkomliga med "
7983"högerklick för <classname>TreeView</classname>-vyer, så vi kommer förklara "
7984"hur det görs för att spara tid åt dig. Det är i stort sett samma som en "
7985"vanlig snabbvalsmeny, som beskrivet i <link linkend=\"sec-menus-"
7986"popup\">kapitlet menyer</link>. Du använder ett <classname>Gtk::"
7987"GestureClick</classname> för att upptäcka musklicket."
38957988
3896#. (itstool) path: section/para7989#. (itstool) path: section/para
3897#: C/index-in.docbook:32357990#: C/index-in.docbook:3235
n3898msgid "This is demonstrated in the Popup Context Menu example. In that example an7991#, fuzzy
> derived <classname>TreeView</classname> is used, but that's not necessary." 
7992msgid ""
7993"This is demonstrated in the Popup Context Menu example. In that example a "
7994"derived <classname>TreeView</classname> is used, but that's not necessary."
3899msgstr ""7995msgstr ""
nn7996"Detta demonstreras i exemplet poppuppsnabbvalsmeny. I det exemplet används "
7997"en härledd <classname>TreeView</classname>, men det är inte nödvändigt."
39007998
3901#. (itstool) path: section/title7999#. (itstool) path: section/title
n3902#: C/index-in.docbook:3242n8000#: C/index-in.docbook:3242 C/index-in.docbook:3943 C/index-in.docbook:4245
3903#: C/index-in.docbook:39438001#: C/index-in.docbook:5573 C/index-in.docbook:5965
3904#: C/index-in.docbook:4245
3905#: C/index-in.docbook:5573
3906#: C/index-in.docbook:5965
3907msgid "Examples"8002msgid "Examples"
n3908msgstr ""n8003msgstr "Exempel"
39098004
3910#. (itstool) path: section/para8005#. (itstool) path: section/para
3911#: C/index-in.docbook:32448006#: C/index-in.docbook:3244
n3912msgid "Some <classname>TreeView</classname> examples are shown here. There are mn8007msgid ""
>ore examples in the <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-docu 
>mentation/tree/master/examples/book/treeview/\">treeview directory</link> in <ap 
>plication>gtkmm-documentation</application>'s examples." 
8008"Some <classname>TreeView</classname> examples are shown here. There are more "
8009"examples in the <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-"
8010"documentation/tree/master/examples/book/treeview/\">treeview directory</"
8011"link> in <application>gtkmm-documentation</application>'s examples."
3913msgstr ""8012msgstr ""
nn8013"Några <classname>TreeView</classname>-exempel visas här. Det finns mer "
8014"exempel i <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-"
8015"documentation/tree/master/examples/book/treeview/\">treeview-katalogen</"
8016"link> i <application>gtkmm-documentation</application>s exempel."
39148017
3915#. (itstool) path: section/para8018#. (itstool) path: section/para
3916#: C/index-in.docbook:32488019#: C/index-in.docbook:3248
n3917msgid "If neither <classname>ListStore</classname> nor <classname>TreeStore</clan8020msgid ""
>ssname> is suitable for your application, look at the <link xlink:href=\"https:/ 
>/gitlab.gnome.org/GNOME/gtkmm-documentation/tree/master/examples/book/treeview/c 
>ustom_treemodel\">custom TreeModel</link> example. It shows how you can make you 
>r own implementation of the <classname>TreeModel</classname> interface." 
8021"If neither <classname>ListStore</classname> nor <classname>TreeStore</"
8022"classname> is suitable for your application, look at the <link xlink:"
8023"href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/master/"
8024"examples/book/treeview/custom_treemodel\">custom TreeModel</link> example. "
8025"It shows how you can make your own implementation of the "
8026"<classname>TreeModel</classname> interface."
3918msgstr ""8027msgstr ""
nn8028"Om varken <classname>ListStore</classname> eller <classname>TreeStore</"
8029"classname> är lämplig för ditt program kan du titta på exemplet <link xlink:"
8030"href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/master/"
8031"examples/book/treeview/custom_treemodel\">anpassad TreeModel</link>. Det "
8032"visar dig hur du kan göra din egen implementation av <classname>TreeModel</"
8033"classname>-gränssnittet."
39198034
3920#. (itstool) path: section/title8035#. (itstool) path: section/title
3921#: C/index-in.docbook:32558036#: C/index-in.docbook:3255
3922msgid "ListStore"8037msgid "ListStore"
n3923msgstr ""n8038msgstr "ListStore"
39248039
3925#. (itstool) path: section/para8040#. (itstool) path: section/para
3926#: C/index-in.docbook:32568041#: C/index-in.docbook:3256
n3927msgid "This example has a <classname>Gtk::TreeView</classname> widget, with a <cn8042msgid ""
>lassname>Gtk::ListStore</classname> model." 
8043"This example has a <classname>Gtk::TreeView</classname> widget, with a "
8044"<classname>Gtk::ListStore</classname> model."
3928msgstr ""8045msgstr ""
nn8046"Detta exempel har en <classname>Gtk::TreeView</classname>-komponent med en "
8047"<classname>Gtk::ListStore</classname>-modell."
39298048
3930#. (itstool) path: section/para8049#. (itstool) path: section/para
3931#: C/index-in.docbook:32688050#: C/index-in.docbook:3268
n3932msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8051msgid ""
>e/master/examples/book/treeview/list/\">Source Code</link>" 
8052"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8053"master/examples/book/treeview/list/\">Source Code</link>"
3933msgstr ""8054msgstr ""
nn8055"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8056"master/examples/book/treeview/list/\">Källkod</link>"
39348057
3935#. (itstool) path: section/title8058#. (itstool) path: section/title
3936#: C/index-in.docbook:32738059#: C/index-in.docbook:3273
3937msgid "TreeStore"8060msgid "TreeStore"
n3938msgstr ""n8061msgstr "TreeStore"
39398062
3940#. (itstool) path: section/para8063#. (itstool) path: section/para
3941#: C/index-in.docbook:32758064#: C/index-in.docbook:3275
n3942msgid "This example is very similar to the <classname>ListStore</classname> examn8065msgid ""
>ple, but uses a <classname>Gtk::TreeStore</classname> model instead, and adds ch 
>ildren to the rows." 
8066"This example is very similar to the <classname>ListStore</classname> "
8067"example, but uses a <classname>Gtk::TreeStore</classname> model instead, and "
8068"adds children to the rows."
3943msgstr ""8069msgstr ""
nn8070"Detta exempel är väldigt likt <classname>ListStore</classname>-exemplet, men "
8071"använder en <classname>Gtk::TreeStore</classname>-modell i stället, och "
8072"lägger till underordnade till raderna."
39448073
3945#. (itstool) path: section/para8074#. (itstool) path: section/para
3946#: C/index-in.docbook:32888075#: C/index-in.docbook:3288
n3947msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8076msgid ""
>e/master/examples/book/treeview/tree/\">Source Code</link>" 
8077"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8078"master/examples/book/treeview/tree/\">Source Code</link>"
3948msgstr ""8079msgstr ""
nn8080"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8081"master/examples/book/treeview/tree/\">Källkod</link>"
39498082
3950#. (itstool) path: section/para8083#. (itstool) path: section/para
3951#: C/index-in.docbook:32958084#: C/index-in.docbook:3295
n3952msgid "This example is identical to the <classname>ListStore</classname> examplen8085msgid ""
>, but it uses <methodname>TreeView::append_column_editable()</methodname> instea 
>d of <methodname>TreeView::append_column()</methodname>." 
8086"This example is identical to the <classname>ListStore</classname> example, "
8087"but it uses <methodname>TreeView::append_column_editable()</methodname> "
8088"instead of <methodname>TreeView::append_column()</methodname>."
3953msgstr ""8089msgstr ""
nn8090"Detta exempel är identiskt med <classname>ListStore</classname>-exemplet, "
8091"men använder <methodname>TreeView::append_column_editable()</methodname> i "
8092"stället för <methodname>TreeView::append_column()</methodname>."
39548093
3955#. (itstool) path: figure/title8094#. (itstool) path: figure/title
3956#: C/index-in.docbook:33028095#: C/index-in.docbook:3302
3957msgid "TreeView - Editable Cells"8096msgid "TreeView - Editable Cells"
n3958msgstr ""n8097msgstr "TreeView - Redigerbara celler"
39598098
3960#. (itstool) path: imageobject/imagedata8099#. (itstool) path: imageobject/imagedata
3961#. This is a reference to an external file such as an image or video. When8100#. This is a reference to an external file such as an image or video. When
3962#. the file changes, the md5 hash will change to let you know you need to8101#. the file changes, the md5 hash will change to let you know you need to
3963#. update your localized copy. The msgstr is not used at all. Set it to8102#. update your localized copy. The msgstr is not used at all. Set it to
3964#. whatever you like once you have updated your copy of the file.8103#. whatever you like once you have updated your copy of the file.
3965#: C/index-in.docbook:33048104#: C/index-in.docbook:3304
nn8105#, fuzzy
3966msgctxt "_"8106msgctxt "_"
n3967msgid "external ref='figures/treeview_editablecells.png' md5='b4c81c776d192afdc3n8107msgid ""
>685fd4a8ef178c'" 
8108"external ref='figures/treeview_editablecells.png' "
8109"md5='b4c81c776d192afdc3685fd4a8ef178c'"
3968msgstr ""8110msgstr ""
nn8111"external ref='figures/treeview_editablecells.png' "
8112"md5='b4c81c776d192afdc3685fd4a8ef178c'"
39698113
3970#. (itstool) path: section/para8114#. (itstool) path: section/para
3971#: C/index-in.docbook:33088115#: C/index-in.docbook:3308
n3972msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8116msgid ""
>e/master/examples/book/treeview/editable_cells/\">Source Code</link>" 
8117"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8118"master/examples/book/treeview/editable_cells/\">Source Code</link>"
3973msgstr ""8119msgstr ""
nn8120"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8121"master/examples/book/treeview/editable_cells/\">Källkod</link>"
39748122
3975#. (itstool) path: section/para8123#. (itstool) path: section/para
3976#: C/index-in.docbook:33158124#: C/index-in.docbook:3315
n3977msgid "This example is much like the <classname>TreeStore</classname> example, bn8125#, fuzzy
>ut has 2 extra columns to indicate whether the row can be dragged, and whether i 
>t can receive drag-and-dropped rows. It uses a derived <classname>Gtk::TreeStore 
></classname> which overrides the virtual functions as described in the <link lin 
>kend=\"sec-treeview-draganddrop\">TreeView Drag and Drop</link> section." 
8126msgid ""
8127"This example is much like the <classname>TreeStore</classname> example, but "
8128"has 2 extra columns to indicate whether the row can be dragged, and whether "
8129"it can receive drag-and-dropped rows. It uses a derived <classname>Gtk::"
8130"TreeStore</classname> which overrides the virtual functions as described in "
8131"the <link linkend=\"sec-treeview-draganddrop\">TreeView Drag and Drop</link> "
8132"section."
3978msgstr ""8133msgstr ""
nn8134"Detta exempel liknar mycket <classname>TreeStore</classname>-exemplet, men "
8135"har två extra kolumner som indikerar huruvida raden kan dras, och huruvida "
8136"den kan ta emot dra-och-släppta rader. Det använder en härledd "
8137"<classname>Gtk::TreeStore</classname> som åsidosätter de virtuella "
8138"funktionerna som beskrivet i avsnittet <link linkend=\"sec-treeview-"
8139"draganddrop\">TreeView - Dra och släpp</link>."
39798140
3980#. (itstool) path: figure/title8141#. (itstool) path: figure/title
3981#: C/index-in.docbook:33258142#: C/index-in.docbook:3325
3982msgid "TreeView - Drag And Drop"8143msgid "TreeView - Drag And Drop"
n3983msgstr ""n8144msgstr "TreeView - Dra och släpp"
39848145
3985#. (itstool) path: imageobject/imagedata8146#. (itstool) path: imageobject/imagedata
3986#. This is a reference to an external file such as an image or video. When8147#. This is a reference to an external file such as an image or video. When
3987#. the file changes, the md5 hash will change to let you know you need to8148#. the file changes, the md5 hash will change to let you know you need to
3988#. update your localized copy. The msgstr is not used at all. Set it to8149#. update your localized copy. The msgstr is not used at all. Set it to
3989#. whatever you like once you have updated your copy of the file.8150#. whatever you like once you have updated your copy of the file.
3990#: C/index-in.docbook:33278151#: C/index-in.docbook:3327
nn8152#, fuzzy
3991msgctxt "_"8153msgctxt "_"
n3992msgid "external ref='figures/treeview_draganddrop.png' md5='fb5de06eb865e9bd312fn8154msgid ""
>0b020e8f631d'" 
8155"external ref='figures/treeview_draganddrop.png' "
8156"md5='fb5de06eb865e9bd312f0b020e8f631d'"
3993msgstr ""8157msgstr ""
nn8158"external ref='figures/treeview_draganddrop.png' "
8159"md5='fb5de06eb865e9bd312f0b020e8f631d'"
39948160
3995#. (itstool) path: section/para8161#. (itstool) path: section/para
3996#: C/index-in.docbook:33318162#: C/index-in.docbook:3331
n3997msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8163msgid ""
>e/master/examples/book/treeview/drag_and_drop/\">Source Code</link>" 
8164"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8165"master/examples/book/treeview/drag_and_drop/\">Source Code</link>"
3998msgstr ""8166msgstr ""
nn8167"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8168"master/examples/book/treeview/drag_and_drop/\">Källkod</link>"
39998169
4000#. (itstool) path: section/para8170#. (itstool) path: section/para
4001#: C/index-in.docbook:33388171#: C/index-in.docbook:3338
n4002msgid "This example is much like the <classname>ListStore</classname> example, bn8172#, fuzzy
>ut derives a custom <classname>TreeView</classname> to encapsulate the tree mode 
>l code and popup menu code in our derived class. See the <link linkend=\"sec-tre 
>eview-contextmenu\">TreeView Popup Context Menu</link> section." 
8173msgid ""
8174"This example is much like the <classname>ListStore</classname> example, but "
8175"derives a custom <classname>TreeView</classname> to encapsulate the tree "
8176"model code and popup menu code in our derived class. See the <link "
8177"linkend=\"sec-treeview-contextmenu\">TreeView Popup Context Menu</link> "
8178"section."
4003msgstr ""8179msgstr ""
nn8180"Detta exempel liknar mycket <classname>ListStore</classname>-exemplet, men "
8181"härleder en anpassad <classname>TreeView</classname> för att kapsla in "
8182"trädmodellskoden och poppuppmenykoden i vår härledda klass. Se avsnittet "
8183"<link linkend=\"sec-treeview-contextmenu\">TreeView - Poppuppsnabbvalsmeny</"
8184"link>."
40048185
4005#. (itstool) path: figure/title8186#. (itstool) path: figure/title
4006#: C/index-in.docbook:33468187#: C/index-in.docbook:3346
4007msgid "TreeView - Popup Context Menu"8188msgid "TreeView - Popup Context Menu"
n4008msgstr ""n8189msgstr "TreeView - Poppuppsnabbvalsmeny"
40098190
4010#. (itstool) path: imageobject/imagedata8191#. (itstool) path: imageobject/imagedata
4011#. This is a reference to an external file such as an image or video. When8192#. This is a reference to an external file such as an image or video. When
4012#. the file changes, the md5 hash will change to let you know you need to8193#. the file changes, the md5 hash will change to let you know you need to
4013#. update your localized copy. The msgstr is not used at all. Set it to8194#. update your localized copy. The msgstr is not used at all. Set it to
4014#. whatever you like once you have updated your copy of the file.8195#. whatever you like once you have updated your copy of the file.
4015#: C/index-in.docbook:33488196#: C/index-in.docbook:3348
nn8197#, fuzzy
4016msgctxt "_"8198msgctxt "_"
n4017msgid "external ref='figures/treeview_popup.png' md5='29c7b04f9f865c6ae8214cbb17n8199msgid ""
>24b05f'" 
8200"external ref='figures/treeview_popup.png' "
8201"md5='29c7b04f9f865c6ae8214cbb1724b05f'"
4018msgstr ""8202msgstr ""
nn8203"external ref='figures/treeview_popup.png' "
8204"md5='29c7b04f9f865c6ae8214cbb1724b05f'"
40198205
4020#. (itstool) path: section/para8206#. (itstool) path: section/para
4021#: C/index-in.docbook:33528207#: C/index-in.docbook:3352
n4022msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8208msgid ""
>e/master/examples/book/treeview/popup/\">Source Code</link>" 
8209"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8210"master/examples/book/treeview/popup/\">Source Code</link>"
4023msgstr ""8211msgstr ""
nn8212"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8213"master/examples/book/treeview/popup/\">Källkod</link>"
40248214
4025#. (itstool) path: chapter/title8215#. (itstool) path: chapter/title
4026#: C/index-in.docbook:33598216#: C/index-in.docbook:3359
4027msgid "The DropDown Widget"8217msgid "The DropDown Widget"
n4028msgstr ""n8218msgstr "DropDown-komponenten"
40298219
4030#. (itstool) path: chapter/para8220#. (itstool) path: chapter/para
4031#: C/index-in.docbook:33618221#: C/index-in.docbook:3361
n4032msgid "The <classname>DropDown</classname> widget is an alternative to the depren8222msgid ""
>cated <classname>ComboBox</classname>. It uses list models instead of tree model 
>s, and the content is displayed using widgets instead of cell renderers." 
8223"The <classname>DropDown</classname> widget is an alternative to the "
8224"deprecated <classname>ComboBox</classname>. It uses list models instead of "
8225"tree models, and the content is displayed using widgets instead of cell "
8226"renderers."
4033msgstr ""8227msgstr ""
nn8228"Komponenten <classname>DropDown</classname> är ett alternativ till den "
8229"föråldrade <classname>ComboBox</classname>. Den använder listmodeller i "
8230"stället för trädmodeller, och innehållet visas med komponenter i stället för "
8231"cellrenderare."
40348232
4035#. (itstool) path: chapter/para8233#. (itstool) path: chapter/para
4036#: C/index-in.docbook:33668234#: C/index-in.docbook:3366
n4037msgid "The <classname>DropDown</classname> widget offers a list of choices in a n8235#, fuzzy
>dropdown menu. If appropriate, it can show extra information about each item, su 
>ch as text, a picture, or a check button. The <classname>DropDown</classname> wi 
>dget can optionally have an <classname>Entry</classname> in the dropdown menu, a 
>llowing the user to search in a long list." 
8236#| msgid ""
8237#| "The <classname>ComboBox</classname> widget offers a list (or tree) of "
8238#| "choices in a dropdown menu. If appropriate, it can show extra information "
8239#| "about each item, such as text, a picture, a check button, or a progress "
8240#| "bar. The <classname>ComboBox</classname> widget usually restricts the "
8241#| "user to the available choices, but it can optionally have an "
8242#| "<classname>Entry</classname>, allowing the user to enter arbitrary text "
8243#| "if none of the available choices are suitable."
8244msgid ""
8245"The <classname>DropDown</classname> widget offers a list of choices in a "
8246"dropdown menu. If appropriate, it can show extra information about each "
8247"item, such as text, a picture, or a check button. The <classname>DropDown</"
8248"classname> widget can optionally have an <classname>Entry</classname> in the "
8249"dropdown menu, allowing the user to search in a long list."
4038msgstr ""8250msgstr ""
nn8251"<classname>ComboBox</classname>-komponenten erbjuder en lista (eller ett "
8252"träd) av val i en rullgardinsmeny. Om lämpligt kan den visa extra "
8253"information om varje objekt, som text, en bild, en kryssruta eller en "
8254"förloppsindikator. <classname>ComboBox</classname>-komponenten begränsar "
8255"vanligen användaren till de tillgängliga valen, men den kan valfritt ha ett "
8256"<classname>Entry</classname>, som låter användaren mata in godtycklig text "
8257"om inget av de tillgängliga valen passar."
40398258
4040#. (itstool) path: chapter/para8259#. (itstool) path: chapter/para
4041#: C/index-in.docbook:33738260#: C/index-in.docbook:3373
n4042msgid "The list is provided via a <classname>Gio::ListModel</classname>, and datn8261#, fuzzy
>a from this model is added to the <classname>DropDown</classname>'s view with si 
>gnal handlers connected to a <classname>SignalListItemFactory</classname>. This  
>provides flexibility, but the <classname>StringList</classname> class provides a 
> simpler text-based specialization in case that flexibility is not required." 
8262msgid ""
8263"The list is provided via a <classname>Gio::ListModel</classname>, and data "
8264"from this model is added to the <classname>DropDown</classname>'s view with "
8265"signal handlers connected to a <classname>SignalListItemFactory</classname>. "
8266"This provides flexibility, but the <classname>StringList</classname> class "
8267"provides a simpler text-based specialization in case that flexibility is not "
8268"required."
4043msgstr ""8269msgstr ""
nn8270"Listan tillhandahålls via en <classname>Gio::ListModel</classname>, och data "
8271"från denna modell läggs till vyn för <classname>DropDown</classname>-"
8272"komponenten med signalhanterare anslutna till en "
8273"<classname>SignalListItemFactory</classname>. Detta tillhandahåller "
8274"flexibilitet, men <classname>StringList</classname>-klassen tillhandahåller "
8275"en enklare textbaserad specialisering om den flexibiliteten inte behövs."
40448276
4045#. (itstool) path: chapter/para8277#. (itstool) path: chapter/para
4046#: C/index-in.docbook:33808278#: C/index-in.docbook:3380
n4047msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n8279msgid ""
>1DropDown.html\">Reference</link>" 
8280"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
8281"classGtk_1_1DropDown.html\">Reference</link>"
4048msgstr ""8282msgstr ""
nn8283"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
8284"classGtk_1_1DropDown.html\">Referens</link>"
40498285
4050#. (itstool) path: section/title8286#. (itstool) path: section/title
n4051#: C/index-in.docbook:3383n8287#: C/index-in.docbook:3383 C/index-in.docbook:3558
4052#: C/index-in.docbook:3558
4053msgid "The model"8288msgid "The model"
n4054msgstr ""n8289msgstr "Modellen"
40558290
4056#. (itstool) path: section/para8291#. (itstool) path: section/para
4057#: C/index-in.docbook:33858292#: C/index-in.docbook:3385
n4058msgid "The model for a <classname>DropDown</classname> can be defined and filledn8293#, fuzzy
> exactly as for a <classname>ListView</classname> or a <classname>ColumnView</cl 
>assname>. It must be a subclass of <classname>Glib::Object</classname>. For inst 
>ance, you might have a <classname>DropDown</classname> with one integer and one  
>text column, like so:" 
8294msgid ""
8295"The model for a <classname>DropDown</classname> can be defined and filled "
8296"exactly as for a <classname>ListView</classname> or a <classname>ColumnView</"
8297"classname>. It must be a subclass of <classname>Glib::Object</classname>. "
8298"For instance, you might have a <classname>DropDown</classname> with one "
8299"integer and one text column, like so:"
4059msgstr ""8300msgstr ""
nn8301"Modellen för en <classname>DropDown</classname> kan definieras och fyllas i "
8302"exakt som för en <classname>ListView</classname> eller en "
8303"<classname>ColumnView</classname>. Den måste vara en underklass till "
8304"<classname>Glib::Object</classname>. Exempelvis kan du ha en "
8305"<classname>DropDown</classname> med ett heltal och en textkolumn, så här:"
40608306
4061#. (itstool) path: section/para8307#. (itstool) path: section/para
4062#: C/index-in.docbook:34138308#: C/index-in.docbook:3413
n4063msgid "After appending rows to this model, you should provide the model to the <n8309#, fuzzy
>classname>DropDown</classname> with the <methodname>set_model()</methodname> met 
>hod. Unless you use the <classname>StringList</classname> model, you also need t 
>o set a <classname>ListItemFactory</classname> with <methodname>set_factory()</m 
>ethodname>. If you want the items in the dropdown menu to look different from th 
>e item in the <classname>DropDown</classname> widget, you also need to set a sep 
>arate <classname>ListItemFactory</classname> with <methodname>set_list_factory() 
></methodname>." 
8310msgid ""
8311"After appending rows to this model, you should provide the model to the "
8312"<classname>DropDown</classname> with the <methodname>set_model()</"
8313"methodname> method. Unless you use the <classname>StringList</classname> "
8314"model, you also need to set a <classname>ListItemFactory</classname> with "
8315"<methodname>set_factory()</methodname>. If you want the items in the "
8316"dropdown menu to look different from the item in the <classname>DropDown</"
8317"classname> widget, you also need to set a separate "
8318"<classname>ListItemFactory</classname> with <methodname>set_list_factory()</"
8319"methodname>."
4064msgstr ""8320msgstr ""
nn8321"Efter att ha lagt till rader till denna modell bör du tillhandahålla "
8322"modellen till vår <classname>DropDown</classname> med metoden "
8323"<methodname>set_model()</methodname>. Om du inte använder modellen "
8324"<classname>StringList</classname> så kommer du också behöva ställa in en "
8325"<classname>ListItemFactory</classname> med <methodname>set_factory()</"
8326"methodname>. Om du vill att objekten i rullgardinsmenyn ska se annorlunda "
8327"från objektet i <classname>DropDown</classname>-komponenten så behöver du "
8328"också ställa in en separat <classname>ListItemFactory</classname> med "
8329"<methodname>set_list_factory()</methodname>."
40658330
4066#. (itstool) path: section/title8331#. (itstool) path: section/title
4067#: C/index-in.docbook:34248332#: C/index-in.docbook:3424
4068msgid "The selected item"8333msgid "The selected item"
n4069msgstr ""n8334msgstr "Det valda objektet"
40708335
4071#. (itstool) path: section/para8336#. (itstool) path: section/para
4072#: C/index-in.docbook:34268337#: C/index-in.docbook:3426
n4073msgid "To discover what item, if any, the user has selected from the <classname>n8338#, fuzzy
>DropDown</classname>, call <methodname>DropDown::get_selected()</methodname>. Th 
>is returns an <type>unsigned int</type> that you can use to get the selected dat 
>a from the model. For instance, you might read an integer ID value from the mode 
>l, even though you have chosen only to show the human-readable description in th 
>e <classname>DropDown</classname>. For instance:" 
8339msgid ""
8340"To discover what item, if any, the user has selected from the "
8341"<classname>DropDown</classname>, call <methodname>DropDown::get_selected()</"
8342"methodname>. This returns an <type>unsigned int</type> that you can use to "
8343"get the selected data from the model. For instance, you might read an "
8344"integer ID value from the model, even though you have chosen only to show "
8345"the human-readable description in the <classname>DropDown</classname>. For "
8346"instance:"
4074msgstr ""8347msgstr ""
nn8348"För att upptäcka vilket objekt, om något, som användaren har valt från vår "
8349"<classname>DropDown</classname>, anropa <methodname>DropDown::"
8350"get_selected()</methodname>. Detta returnerar en <type>unsigned int</type> "
8351"som du kan använda för att få valda data från modellen. Exempelvis kanske du "
8352"läser ett heltals-ID-värde från modellen, även om du valt att bara visa den "
8353"mänskligt läsbara beskrivningen i vår <classname>DropDown</classname>. Till "
8354"exempel:"
40758355
4076#. (itstool) path: section/programlisting8356#. (itstool) path: section/programlisting
4077#: C/index-in.docbook:34338357#: C/index-in.docbook:3433
n4078#, no-wrapn8358#, fuzzy, no-wrap
4079msgid ""8359msgid ""
4080"<code>unsigned int sel = m_DropDown.get_selected();\n"8360"<code>unsigned int sel = m_DropDown.get_selected();\n"
4081"if (sel != GTK_INVALID_LIST_POSITION)\n"8361"if (sel != GTK_INVALID_LIST_POSITION)\n"
4082"{\n"8362"{\n"
4083"  // Get the data for the selected row, using our knowledge of the list model:\8363"  // Get the data for the selected row, using our knowledge of the list model:\
>n">n"
4086"}\n"8366"}\n"
4087"else\n"8367"else\n"
4088"  set_nothing_chosen(); // Your own function.\n"8368"  set_nothing_chosen(); // Your own function.\n"
4089"</code>"8369"</code>"
4090msgstr ""8370msgstr ""
nn8371"unsigned int sel = m_DropDown.get_selected();\n"
8372"if (sel != GTK_INVALID_LIST_POSITION)\n"
8373"{\n"
8374"  // Få data för markerad rad, med vår kunskap om listmodellen:\n"
8375"  auto id = m_ListStore-&gt;get_item(sel).m_col_id;\n"
8376"  set_some_id_chosen(id); // Din egen funktion.\n"
8377"}\n"
8378"else\n"
8379"  set_nothing_chosen(); // Din egen funktion.\n"
40918380
4092#. (itstool) path: section/title8381#. (itstool) path: section/title
n4093#: C/index-in.docbook:3446n8382#: C/index-in.docbook:3446 C/index-in.docbook:3597 C/index-in.docbook:3658
4094#: C/index-in.docbook:3597
4095#: C/index-in.docbook:3658
4096msgid "Responding to changes"8383msgid "Responding to changes"
n4097msgstr ""n8384msgstr "Svara på ändringar"
40988385
4099#. (itstool) path: section/para8386#. (itstool) path: section/para
4100#: C/index-in.docbook:34488387#: C/index-in.docbook:3448
n4101msgid "You might need to react to every change of selection in the <classname>Drn8388#, fuzzy
>opDown</classname>, for instance to update other widgets. To do so, you should c 
>onnect to <methodname>property_selected().signal_changed()</methodname>. For ins 
>tance:" 
8389msgid ""
8390"You might need to react to every change of selection in the "
8391"<classname>DropDown</classname>, for instance to update other widgets. To do "
8392"so, you should connect to <methodname>property_selected().signal_changed()</"
8393"methodname>. For instance:"
4102msgstr ""8394msgstr ""
nn8395"Du kan behöva reagera på varje ändring av val i vår <classname>DropDown</"
8396"classname>, till exempel för att uppdatera andra komponenter. För att göra "
8397"så bör du ansluta till <methodname>property_selected().signal_changed()</"
8398"methodname>. Till exempel:"
41038399
4104#. (itstool) path: section/programlisting8400#. (itstool) path: section/programlisting
4105#: C/index-in.docbook:34528401#: C/index-in.docbook:3452
n4106#, no-wrapn8402#, fuzzy, no-wrap
8403#| msgid ""
8404#| "m_DropDown.property_selected().signal_changed().connect(\n"
8405#| "  sigc::mem_fun(*this, &amp;ExampleWindow::on_dropdown_changed));\n"
4107msgid ""8406msgid ""
4108"<code>m_DropDown.property_selected().signal_changed().connect(\n"8407"<code>m_DropDown.property_selected().signal_changed().connect(\n"
4109"  sigc::mem_fun(*this, &amp;ExampleWindow::on_dropdown_changed));\n"8408"  sigc::mem_fun(*this, &amp;ExampleWindow::on_dropdown_changed));\n"
4110"</code>"8409"</code>"
4111msgstr ""8410msgstr ""
nn8411"m_DropDown.property_selected().signal_changed().connect(\n"
8412"  sigc::mem_fun(*this, &amp;ExampleWindow::on_dropdown_changed));\n"
41128413
4113#. (itstool) path: section/title8414#. (itstool) path: section/title
4114#: C/index-in.docbook:34588415#: C/index-in.docbook:3458
4115msgid "Simple String Example"8416msgid "Simple String Example"
n4116msgstr ""n8417msgstr "Enkelt strängexempel"
41178418
4118#. (itstool) path: figure/title8419#. (itstool) path: figure/title
4119#: C/index-in.docbook:34618420#: C/index-in.docbook:3461
4120msgid "Simple DropDown"8421msgid "Simple DropDown"
n4121msgstr ""n8422msgstr "Enkel DropDown"
41228423
4123#. (itstool) path: imageobject/imagedata8424#. (itstool) path: imageobject/imagedata
4124#. This is a reference to an external file such as an image or video. When8425#. This is a reference to an external file such as an image or video. When
4125#. the file changes, the md5 hash will change to let you know you need to8426#. the file changes, the md5 hash will change to let you know you need to
4126#. update your localized copy. The msgstr is not used at all. Set it to8427#. update your localized copy. The msgstr is not used at all. Set it to
4127#. whatever you like once you have updated your copy of the file.8428#. whatever you like once you have updated your copy of the file.
4128#: C/index-in.docbook:34638429#: C/index-in.docbook:3463
nn8430#, fuzzy
4129msgctxt "_"8431msgctxt "_"
n4130msgid "external ref='figures/dropdown_string.png' md5='b1689605c645e1ada3040f6dfn8432msgid ""
>3335c56'" 
8433"external ref='figures/dropdown_string.png' "
8434"md5='b1689605c645e1ada3040f6df3335c56'"
4131msgstr ""8435msgstr ""
nn8436"external ref='figures/dropdown_string.png' "
8437"md5='b1689605c645e1ada3040f6df3335c56'"
41328438
4133#. (itstool) path: section/para8439#. (itstool) path: section/para
4134#: C/index-in.docbook:34678440#: C/index-in.docbook:3467
n4135msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8441msgid ""
>e/master/examples/book/dropdown/string\">Source Code</link>" 
8442"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8443"master/examples/book/dropdown/string\">Source Code</link>"
4136msgstr ""8444msgstr ""
nn8445"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8446"master/examples/book/dropdown/string\">Källkod</link>"
41378447
4138#. (itstool) path: section/title8448#. (itstool) path: section/title
4139#: C/index-in.docbook:34718449#: C/index-in.docbook:3471
4140msgid "Examples with a Search Entry"8450msgid "Examples with a Search Entry"
n4141msgstr ""n8451msgstr "Exempel med ett sökfält"
41428452
4143#. (itstool) path: section/para8453#. (itstool) path: section/para
4144#: C/index-in.docbook:34738454#: C/index-in.docbook:3473
n4145msgid "The dropdown menu may contain an <classname>Entry</classname> that allowsn8455msgid ""
> to search for items in the list. Call <methodname>set_enable_search()</methodna 
>me> and <methodname>set_expression()</methodname>. For instance:" 
8456"The dropdown menu may contain an <classname>Entry</classname> that allows to "
8457"search for items in the list. Call <methodname>set_enable_search()</"
8458"methodname> and <methodname>set_expression()</methodname>. For instance:"
4146msgstr ""8459msgstr ""
nn8460"Rullgardinsmeny kan innehålla ett <classname>Entry</classname> som tillåter "
8461"sökning efter objekt i listan. Anropa <methodname>set_enable_search()</"
8462"methodname> och <methodname>set_expression()</methodname>. Till exempel:"
41478463
4148#. (itstool) path: section/programlisting8464#. (itstool) path: section/programlisting
4149#: C/index-in.docbook:34778465#: C/index-in.docbook:3477
n4150#, no-wrapn8466#, fuzzy, no-wrap
8467#| msgid ""
8468#| "m_DropDown.set_enable_search(true);\n"
8469#| "auto expression = Gtk::ClosureExpression&lt;Glib::ustring&gt;::create(\n"
8470#| "  sigc::mem_fun(*this, &amp;ExampleWindow::get_col_name));\n"
8471#| "m_DropDown.set_expression(expression);\n"
8472#| "\n"
8473#| "//-------\n"
8474#| "Glib::ustring ExampleWindow::get_col_name(const Glib::RefPtr&lt;Glib::Object
 >Base&gt;&amp; item)\n"
8475#| "{\n"
8476#| "  const auto col = std::dynamic_pointer_cast&lt;ModelColumns&gt;(item);\n"
8477#| "  return col ? col-&gt;m_col_name : \"\";\n"
8478#| "}\n"
4151msgid ""8479msgid ""
4152"<code>m_DropDown.set_enable_search(true);\n"8480"<code>m_DropDown.set_enable_search(true);\n"
4153"auto expression = Gtk::ClosureExpression&lt;Glib::ustring&gt;::create(\n"8481"auto expression = Gtk::ClosureExpression&lt;Glib::ustring&gt;::create(\n"
4154"  sigc::mem_fun(*this, &amp;ExampleWindow::get_col_name));\n"8482"  sigc::mem_fun(*this, &amp;ExampleWindow::get_col_name));\n"
4155"m_DropDown.set_expression(expression);\n"8483"m_DropDown.set_expression(expression);\n"
4160"  const auto col = std::dynamic_pointer_cast&lt;ModelColumns&gt;(item);\n"8488"  const auto col = std::dynamic_pointer_cast&lt;ModelColumns&gt;(item);\n"
4161"  return col ? col-&gt;m_col_name : \"\";\n"8489"  return col ? col-&gt;m_col_name : \"\";\n"
4162"}\n"8490"}\n"
4163"</code>"8491"</code>"
4164msgstr ""8492msgstr ""
nn8493"m_DropDown.set_enable_search(true);\n"
8494"auto expression = Gtk::ClosureExpression&lt;Glib::ustring&gt;::create(\n"
8495"  sigc::mem_fun(*this, &amp;ExampleWindow::get_col_name));\n"
8496"m_DropDown.set_expression(expression);\n"
8497"\n"
8498"//-------\n"
8499"Glib::ustring ExampleWindow::get_col_name(const Glib::RefPtr&lt;Glib::ObjectBas
 >e&gt;&amp; item)\n"
8500"{\n"
8501"  const auto col = std::dynamic_pointer_cast&lt;ModelColumns&gt;(item);\n"
8502"  return col ? col-&gt;m_col_name : \"\";\n"
8503"}\n"
41658504
4166#. (itstool) path: section/title8505#. (itstool) path: section/title
4167#: C/index-in.docbook:34918506#: C/index-in.docbook:3491
4168msgid "String Example"8507msgid "String Example"
n4169msgstr ""n8508msgstr "Strängexempel"
41708509
4171#. (itstool) path: figure/title8510#. (itstool) path: figure/title
4172#: C/index-in.docbook:34948511#: C/index-in.docbook:3494
4173msgid "Search String"8512msgid "Search String"
n4174msgstr ""n8513msgstr "Sök sträng"
41758514
4176#. (itstool) path: imageobject/imagedata8515#. (itstool) path: imageobject/imagedata
4177#. This is a reference to an external file such as an image or video. When8516#. This is a reference to an external file such as an image or video. When
4178#. the file changes, the md5 hash will change to let you know you need to8517#. the file changes, the md5 hash will change to let you know you need to
4179#. update your localized copy. The msgstr is not used at all. Set it to8518#. update your localized copy. The msgstr is not used at all. Set it to
4180#. whatever you like once you have updated your copy of the file.8519#. whatever you like once you have updated your copy of the file.
4181#: C/index-in.docbook:34968520#: C/index-in.docbook:3496
nn8521#, fuzzy
8522#| msgctxt "_"
8523#| msgid ""
8524#| "external ref='figures/drawingarea_arcs.png' "
8525#| "md5='d94b40e33b9fab7ea9e2c870b97fcf0c'"
4182msgctxt "_"8526msgctxt "_"
n4183msgid "external ref='figures/dropdown_search_string.png' md5='e130e644e7cfb13a5bn8527msgid ""
>90ab1372b17503'" 
8528"external ref='figures/dropdown_search_string.png' "
8529"md5='e130e644e7cfb13a5b90ab1372b17503'"
4184msgstr ""8530msgstr ""
nn8531"external ref='figures/dropdown_search_string.png' "
8532"md5='e130e644e7cfb13a5b90ab1372b17503'"
41858533
4186#. (itstool) path: section/para8534#. (itstool) path: section/para
4187#: C/index-in.docbook:35008535#: C/index-in.docbook:3500
n4188msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8536msgid ""
>e/master/examples/book/dropdown/search_string\">Source Code</link>" 
8537"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8538"master/examples/book/dropdown/search_string\">Source Code</link>"
4189msgstr ""8539msgstr ""
nn8540"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8541"master/examples/book/dropdown/search_string\">Källkod</link>"
41908542
4191#. (itstool) path: section/title8543#. (itstool) path: section/title
4192#: C/index-in.docbook:35048544#: C/index-in.docbook:3504
4193msgid "Font Example"8545msgid "Font Example"
n4194msgstr ""n8546msgstr "Typsnittsexempel"
41958547
4196#. (itstool) path: section/para8548#. (itstool) path: section/para
4197#: C/index-in.docbook:35068549#: C/index-in.docbook:3506
n4198msgid "This example uses a <classname>Pango::FontMap</classname> as its model. Tn8550msgid ""
>his is possible because <classname>Pango::FontMap</classname> implements the <cl 
>assname>Gio::ListModel</classname> interface. Of course you can use a <classname 
>>FontDialogButton</classname> instead." 
8551"This example uses a <classname>Pango::FontMap</classname> as its model. This "
8552"is possible because <classname>Pango::FontMap</classname> implements the "
8553"<classname>Gio::ListModel</classname> interface. Of course you can use a "
8554"<classname>FontDialogButton</classname> instead."
4199msgstr ""8555msgstr ""
nn8556"Detta exempel använder en <classname>Pango::FontMap</classname> som sin "
8557"modell. Detta är möjligt för att <classname>Pango::FontMap</classname> "
8558"implementerar <classname>Gio::ListModel</classname>-gränssnittet. Du kan "
8559"förstås använda en <classname>FontDialogButton</classname> i stället."
42008560
4201#. (itstool) path: figure/title8561#. (itstool) path: figure/title
n4202#: C/index-in.docbook:3513n8562#: C/index-in.docbook:3513 C/index-in.docbook:3532
4203#: C/index-in.docbook:3532
4204msgid "Search Font"8563msgid "Search Font"
n4205msgstr ""n8564msgstr "Sök typsnitt"
42068565
4207#. (itstool) path: imageobject/imagedata8566#. (itstool) path: imageobject/imagedata
4208#. This is a reference to an external file such as an image or video. When8567#. This is a reference to an external file such as an image or video. When
4209#. the file changes, the md5 hash will change to let you know you need to8568#. the file changes, the md5 hash will change to let you know you need to
4210#. update your localized copy. The msgstr is not used at all. Set it to8569#. update your localized copy. The msgstr is not used at all. Set it to
4211#. whatever you like once you have updated your copy of the file.8570#. whatever you like once you have updated your copy of the file.
4212#: C/index-in.docbook:35158571#: C/index-in.docbook:3515
nn8572#, fuzzy
4213msgctxt "_"8573msgctxt "_"
n4214msgid "external ref='figures/dropdown_search_font.png' md5='1733e29c88c19dc6c4cbn8574msgid ""
>d1114446ac18'" 
8575"external ref='figures/dropdown_search_font.png' "
8576"md5='1733e29c88c19dc6c4cbd1114446ac18'"
4215msgstr ""8577msgstr ""
nn8578"external ref='figures/dropdown_search_font.png' "
8579"md5='1733e29c88c19dc6c4cbd1114446ac18'"
42168580
4217#. (itstool) path: section/para8581#. (itstool) path: section/para
4218#: C/index-in.docbook:35198582#: C/index-in.docbook:3519
n4219msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8583msgid ""
>e/master/examples/book/dropdown/search_font\">Source Code</link>" 
8584"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8585"master/examples/book/dropdown/search_font\">Source Code</link>"
4220msgstr ""8586msgstr ""
nn8587"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8588"master/examples/book/dropdown/search_font\">Källkod</link>"
42218589
4222#. (itstool) path: section/title8590#. (itstool) path: section/title
4223#: C/index-in.docbook:35248591#: C/index-in.docbook:3524
4224msgid "Complex Example"8592msgid "Complex Example"
n4225msgstr ""n8593msgstr "Komplext exempel"
42268594
4227#. (itstool) path: section/para8595#. (itstool) path: section/para
4228#: C/index-in.docbook:35268596#: C/index-in.docbook:3526
n4229msgid "This is a more complex example with two <classname>SignalListItemFactory<n8597msgid ""
>/classname> objects and their signal handlers. This example would be simpler wit 
>hout the checkmark in the dropdown menu." 
8598"This is a more complex example with two <classname>SignalListItemFactory</"
8599"classname> objects and their signal handlers. This example would be simpler "
8600"without the checkmark in the dropdown menu."
4230msgstr ""8601msgstr ""
nn8602"Detta är ett mer komplext exempel med två <classname>SignalListItemFactory</"
8603"classname>-objekt och deras signalhanterare. Detta exempel skulle vara "
8604"enklare utan bocken i rullgardinsmenyn."
42318605
4232#. (itstool) path: imageobject/imagedata8606#. (itstool) path: imageobject/imagedata
4233#. This is a reference to an external file such as an image or video. When8607#. This is a reference to an external file such as an image or video. When
4234#. the file changes, the md5 hash will change to let you know you need to8608#. the file changes, the md5 hash will change to let you know you need to
4235#. update your localized copy. The msgstr is not used at all. Set it to8609#. update your localized copy. The msgstr is not used at all. Set it to
4236#. whatever you like once you have updated your copy of the file.8610#. whatever you like once you have updated your copy of the file.
4237#: C/index-in.docbook:35348611#: C/index-in.docbook:3534
nn8612#, fuzzy
4238msgctxt "_"8613msgctxt "_"
n4239msgid "external ref='figures/dropdown_complex.png' md5='2167fb44e42653aa7fd85560n8614msgid ""
>4c4c1e65'" 
8615"external ref='figures/dropdown_complex.png' "
8616"md5='2167fb44e42653aa7fd855604c4c1e65'"
4240msgstr ""8617msgstr ""
nn8618"external ref='figures/dropdown_complex.png' "
8619"md5='2167fb44e42653aa7fd855604c4c1e65'"
42418620
4242#. (itstool) path: section/para8621#. (itstool) path: section/para
4243#: C/index-in.docbook:35388622#: C/index-in.docbook:3538
n4244msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8623msgid ""
>e/master/examples/book/dropdown/complex\">Source Code</link>" 
8624"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8625"master/examples/book/dropdown/complex\">Source Code</link>"
4245msgstr ""8626msgstr ""
nn8627"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8628"master/examples/book/dropdown/complex\">Källkod</link>"
42468629
4247#. (itstool) path: chapter/title8630#. (itstool) path: chapter/title
4248#: C/index-in.docbook:35438631#: C/index-in.docbook:3543
4249msgid "Combo Boxes"8632msgid "Combo Boxes"
n4250msgstr ""n8633msgstr "Kombinationsrutor"
42518634
4252#. (itstool) path: note/para8635#. (itstool) path: note/para
4253#: C/index-in.docbook:35458636#: C/index-in.docbook:3545
n4254msgid "<classname>Gtk::ComboBox</classname> and <classname>Gtk::ComboBoxText</cln8637msgid ""
>assname> are deprecated since <application>gtkmm</application> 4.10. Use <classn 
>ame>Gtk::DropDown</classname> in new code." 
8638"<classname>Gtk::ComboBox</classname> and <classname>Gtk::ComboBoxText</"
8639"classname> are deprecated since <application>gtkmm</application> 4.10. Use "
8640"<classname>Gtk::DropDown</classname> in new code."
4255msgstr ""8641msgstr ""
nn8642"<classname>Gtk::ComboBox</classname> och <classname>Gtk::ComboBoxText</"
8643"classname> är föråldrade sedan <application>gtkmm</application> 4.10. Använd "
8644"<classname>Gtk::DropDown</classname> i ny kod."
42568645
4257#. (itstool) path: chapter/para8646#. (itstool) path: chapter/para
4258#: C/index-in.docbook:35498647#: C/index-in.docbook:3549
n4259msgid "The <classname>ComboBox</classname> widget offers a list (or tree) of chon8648msgid ""
>ices in a dropdown menu. If appropriate, it can show extra information about eac 
>h item, such as text, a picture, a check button, or a progress bar. The <classna 
>me>ComboBox</classname> widget usually restricts the user to the available choic 
>es, but it can optionally have an <classname>Entry</classname>, allowing the use 
>r to enter arbitrary text if none of the available choices are suitable." 
8649"The <classname>ComboBox</classname> widget offers a list (or tree) of "
8650"choices in a dropdown menu. If appropriate, it can show extra information "
8651"about each item, such as text, a picture, a check button, or a progress bar. "
8652"The <classname>ComboBox</classname> widget usually restricts the user to the "
8653"available choices, but it can optionally have an <classname>Entry</"
8654"classname>, allowing the user to enter arbitrary text if none of the "
8655"available choices are suitable."
4260msgstr ""8656msgstr ""
nn8657"<classname>ComboBox</classname>-komponenten erbjuder en lista (eller ett "
8658"träd) av val i en rullgardinsmeny. Om lämpligt kan den visa extra "
8659"information om varje objekt, som text, en bild, en kryssruta eller en "
8660"förloppsindikator. <classname>ComboBox</classname>-komponenten begränsar "
8661"vanligen användaren till de tillgängliga valen, men den kan valfritt ha ett "
8662"<classname>Entry</classname>, som låter användaren mata in godtycklig text "
8663"om inget av de tillgängliga valen passar."
42618664
4262#. (itstool) path: chapter/para8665#. (itstool) path: chapter/para
4263#: C/index-in.docbook:35528666#: C/index-in.docbook:3552
n4264msgid "The list is provided via a <classname>TreeModel</classname>, and columns n8667#, fuzzy
>from this model are added to the ComboBox's view with the <methodname>ComboBox:: 
>pack_start()</methodname> method. This provides flexibility and compile-time typ 
>e-safety, but the <classname>ComboBoxText</classname> class provides a simpler t 
>ext-based specialization in case that flexibility is not required." 
8668msgid ""
8669"The list is provided via a <classname>TreeModel</classname>, and columns "
8670"from this model are added to the ComboBox's view with the "
8671"<methodname>ComboBox::pack_start()</methodname> method. This provides "
8672"flexibility and compile-time type-safety, but the <classname>ComboBoxText</"
8673"classname> class provides a simpler text-based specialization in case that "
8674"flexibility is not required."
4265msgstr ""8675msgstr ""
nn8676"Listan tillhandahålls via en <classname>TreeModel</classname>, och kolumner "
8677"från denna modell läggs till vyn för ComboBox-komponenten med metoden "
8678"<methodname>ComboBox::pack_start()</methodname>. Detta tillhandahåller "
8679"flexibilitet och typsäkerhet under kompilering, men <classname>ComboBoxText</"
8680"classname>-klassen tillhandahåller en enklare textbaserad specialisering om "
8681"den flexibiliteten inte behövs."
42668682
4267#. (itstool) path: chapter/para8683#. (itstool) path: chapter/para
4268#: C/index-in.docbook:35558684#: C/index-in.docbook:3555
n4269msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n8685msgid ""
>1ComboBox.html\">Reference</link>" 
8686"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
8687"classGtk_1_1ComboBox.html\">Reference</link>"
4270msgstr ""8688msgstr ""
nn8689"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
8690"classGtk_1_1ComboBox.html\">Referens</link>"
42718691
4272#. (itstool) path: section/para8692#. (itstool) path: section/para
4273#: C/index-in.docbook:35608693#: C/index-in.docbook:3560
n4274msgid "The model for a ComboBox can be defined and filled exactly as for a <clasn8694msgid ""
>sname>TreeView</classname>. For instance, you might derive a ComboBox class with 
> one integer and one text column, like so:" 
8695"The model for a ComboBox can be defined and filled exactly as for a "
8696"<classname>TreeView</classname>. For instance, you might derive a ComboBox "
8697"class with one integer and one text column, like so:"
4275msgstr ""8698msgstr ""
nn8699"Modellen för en ComboBox kan definieras och fyllas i exakt som för en "
8700"<classname>TreeView</classname>. Exempelvis kan du härleda en ComboBox med "
8701"ett heltal och en textkolumn, så här:"
42768702
4277#. (itstool) path: section/programlisting8703#. (itstool) path: section/programlisting
4278#: C/index-in.docbook:35628704#: C/index-in.docbook:3562
n4279#, no-wrapn8705#, fuzzy, no-wrap
4280msgid ""8706msgid ""
4281"<code>class ModelColumns : public Gtk::TreeModel::ColumnRecord\n"8707"<code>class ModelColumns : public Gtk::TreeModel::ColumnRecord\n"
4282"{\n"8708"{\n"
4283"public:\n"8709"public:\n"
4284"  ModelColumns()\n"8710"  ModelColumns()\n"
4288"  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_name;\n"8714"  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_name;\n"
4289"};\n"8715"};\n"
4290"\n"8716"\n"
4291"ModelColumns m_columns;</code>"8717"ModelColumns m_columns;</code>"
4292msgstr ""8718msgstr ""
nn8719"class ModelColumns : public Gtk::TreeModel::ColumnRecord\n"
8720"{\n"
8721"public:\n"
8722"  ModelColumns()\n"
8723"  { add(m_col_id); add(m_col_name); }\n"
8724"\n"
8725"  Gtk::TreeModelColumn&lt;int&gt; m_col_id;\n"
8726"  Gtk::TreeModelColumn&lt;Glib::ustring&gt; m_col_name;\n"
8727"};\n"
8728"\n"
8729"ModelColumns m_columns;"
42938730
4294#. (itstool) path: section/para8731#. (itstool) path: section/para
4295#: C/index-in.docbook:35748732#: C/index-in.docbook:3574
n4296msgid "After appending rows to this model, you should provide the model to the <n8733#, fuzzy
>classname>ComboBox</classname> with the <methodname>set_model()</methodname> met 
>hod. Then use the <methodname>pack_start()</methodname> or <methodname>pack_end( 
>)</methodname> methods to specify what columns will be displayed in the ComboBox 
>. As with the TreeView you may either use the default cell renderer by passing t 
>he <classname>TreeModelColumn</classname> to the pack methods, or you may instan 
>tiate a specific <classname>CellRenderer</classname> and specify a particular ma 
>pping with either <methodname>add_attribute()</methodname> or <methodname>set_ce 
>ll_data_func()</methodname>. Note that these methods are in the <classname>CellL 
>ayout</classname> base class." 
8734msgid ""
8735"After appending rows to this model, you should provide the model to the "
8736"<classname>ComboBox</classname> with the <methodname>set_model()</"
8737"methodname> method. Then use the <methodname>pack_start()</methodname> or "
8738"<methodname>pack_end()</methodname> methods to specify what columns will be "
8739"displayed in the ComboBox. As with the TreeView you may either use the "
8740"default cell renderer by passing the <classname>TreeModelColumn</classname> "
8741"to the pack methods, or you may instantiate a specific "
8742"<classname>CellRenderer</classname> and specify a particular mapping with "
8743"either <methodname>add_attribute()</methodname> or "
8744"<methodname>set_cell_data_func()</methodname>. Note that these methods are "
8745"in the <classname>CellLayout</classname> base class."
4297msgstr ""8746msgstr ""
nn8747"Efter att ha lagt till rader till denna modell bör du tillhandahålla "
8748"modellen till <classname>ComboBox</classname>en med metoden "
8749"<methodname>set_model()</methodname>. Använd sedan metoderna "
8750"<methodname>pack_start()</methodname> eller <methodname>pack_end()</"
8751"methodname> för att ange vilka kolumner som kommer visas i vår ComboBox. Som "
8752"med TreeView kan du antingen använda standardcellrenderare genom att skicka "
8753"<classname>TreeModelColumn</classname> till packmetoderna, eller så kan du "
8754"instansiera en specifik <classname>CellRenderer</classname> och ange en viss "
8755"mappning med antingen <methodname>add_attribute()</methodname> eller "
8756"<methodname>set_cell_data_func()</methodname>. Observera att dessa metoder "
8757"finns i basklassen <classname>CellLayout</classname>."
42988758
4299#. (itstool) path: section/title8759#. (itstool) path: section/title
4300#: C/index-in.docbook:35788760#: C/index-in.docbook:3578
4301msgid "The chosen item"8761msgid "The chosen item"
n4302msgstr ""n8762msgstr "Det valda objektet"
43038763
4304#. (itstool) path: section/para8764#. (itstool) path: section/para
4305#: C/index-in.docbook:35808765#: C/index-in.docbook:3580
n4306msgid "To discover what item, if any, the user has chosen from the ComboBox, caln8766#, fuzzy
>l <methodname>ComboBox::get_active()</methodname>. This returns a <classname>Tre 
>eModel::iterator</classname> that you can dereference to a <classname>Row</class 
>name> in order to read the values in your columns. For instance, you might read  
>an integer ID value from the model, even though you have chosen only to show the 
> human-readable description in the ComboBox. For instance:" 
8767msgid ""
8768"To discover what item, if any, the user has chosen from the ComboBox, call "
8769"<methodname>ComboBox::get_active()</methodname>. This returns a "
8770"<classname>TreeModel::iterator</classname> that you can dereference to a "
8771"<classname>Row</classname> in order to read the values in your columns. For "
8772"instance, you might read an integer ID value from the model, even though you "
8773"have chosen only to show the human-readable description in the ComboBox. For "
8774"instance:"
4307msgstr ""8775msgstr ""
nn8776"För att upptäcka vilket objekt, om något, som användaren har valt från en "
8777"ComboBox, anropa <methodname>ComboBox::get_active()</methodname>. "
8778"Detta<classname>TreeModel::iterator</classname> returnerar en som du kan "
8779"dereferera till en <classname>Row</classname> för att läsa värdena i dina "
8780"kolumner. Exempelvis kanske du läser ett heltals-ID-värde från modellen, "
8781"även om du valt att bara visa den mänskligt läsbara beskrivningen i vår "
8782"ComboBox. Till exempel:"
43088783
4309#. (itstool) path: section/programlisting8784#. (itstool) path: section/programlisting
4310#: C/index-in.docbook:35828785#: C/index-in.docbook:3582
n4311#, no-wrapn8786#, fuzzy, no-wrap
4312msgid ""8787msgid ""
4313"<code>Gtk::TreeModel::iterator iter = m_Combo.get_active();\n"8788"<code>Gtk::TreeModel::iterator iter = m_Combo.get_active();\n"
4314"if(iter)\n"8789"if(iter)\n"
4315"{\n"8790"{\n"
4316"  auto row = *iter;\n"8791"  auto row = *iter;\n"
4321"  set_something_id_chosen(id); //Your own function.\n"8796"  set_something_id_chosen(id); //Your own function.\n"
4322"}\n"8797"}\n"
4323"else\n"8798"else\n"
4324"  set_nothing_chosen(); //Your own function.</code>"8799"  set_nothing_chosen(); //Your own function.</code>"
4325msgstr ""8800msgstr ""
nn8801"Gtk::TreeModel::iterator iter = m_Combo.get_active();\n"
8802"if(iter)\n"
8803"{\n"
8804"  auto row = *iter;\n"
8805"\n"
8806"  //Få data för markerad rad, med vår kunskap\n"
8807"  //om trädmodellen:\n"
8808"  auto id = row[m_Columns.m_col_id];\n"
8809"  set_something_id_chosen(id); //Din egen funktion.\n"
8810"}\n"
8811"else\n"
8812"  set_nothing_chosen(); //Din egen funktion."
43268813
4327#. (itstool) path: section/para8814#. (itstool) path: section/para
4328#: C/index-in.docbook:35998815#: C/index-in.docbook:3599
n4329msgid "You might need to react to every change of selection in the ComboBox, forn8816#, fuzzy
> instance to update other widgets. To do so, you should handle the <literal>chan 
>ged</literal> signal. For instance:" 
8817msgid ""
8818"You might need to react to every change of selection in the ComboBox, for "
8819"instance to update other widgets. To do so, you should handle the "
8820"<literal>changed</literal> signal. For instance:"
4330msgstr ""8821msgstr ""
nn8822"Du behöver reagera på varje ändring av val i vår ComboBox, till exempel för "
8823"att uppdatera andra komponenter. För att göra så bör du hantera signalen "
8824"<literal>changed</literal>. Till exempel:"
43318825
4332#. (itstool) path: section/programlisting8826#. (itstool) path: section/programlisting
4333#: C/index-in.docbook:36028827#: C/index-in.docbook:3602
n4334#, no-wrapn8828#, fuzzy, no-wrap
8829#| msgid ""
8830#| "m_combo.signal_changed().connect( sigc::mem_fun(*this,\n"
8831#| "      &amp;ExampleWindow::on_combo_changed) );"
4335msgid ""8832msgid ""
4336"<code>m_combo.signal_changed().connect( sigc::mem_fun(*this,\n"8833"<code>m_combo.signal_changed().connect( sigc::mem_fun(*this,\n"
4337"      &amp;ExampleWindow::on_combo_changed) );</code>"8834"      &amp;ExampleWindow::on_combo_changed) );</code>"
4338msgstr ""8835msgstr ""
nn8836"m_combo.signal_changed().connect( sigc::mem_fun(*this,\n"
8837"      &amp;ExampleWindow::on_combo_changed) );"
43398838
4340#. (itstool) path: section/title8839#. (itstool) path: section/title
n4341#: C/index-in.docbook:3607n8840#: C/index-in.docbook:3607 C/index-in.docbook:3693
4342#: C/index-in.docbook:3693
4343msgid "Full Example"8841msgid "Full Example"
n4344msgstr ""n8842msgstr "Fullständigt exempel"
43458843
4346#. (itstool) path: figure/title8844#. (itstool) path: figure/title
4347#: C/index-in.docbook:36108845#: C/index-in.docbook:3610
4348msgid "ComboBox"8846msgid "ComboBox"
n4349msgstr ""n8847msgstr "ComboBox"
43508848
4351#. (itstool) path: imageobject/imagedata8849#. (itstool) path: imageobject/imagedata
4352#. This is a reference to an external file such as an image or video. When8850#. This is a reference to an external file such as an image or video. When
4353#. the file changes, the md5 hash will change to let you know you need to8851#. the file changes, the md5 hash will change to let you know you need to
4354#. update your localized copy. The msgstr is not used at all. Set it to8852#. update your localized copy. The msgstr is not used at all. Set it to
4355#. whatever you like once you have updated your copy of the file.8853#. whatever you like once you have updated your copy of the file.
4356#: C/index-in.docbook:36128854#: C/index-in.docbook:3612
nn8855#, fuzzy
4357msgctxt "_"8856msgctxt "_"
n4358msgid "external ref='figures/combobox_complex.png' md5='ec96e29fe85caef072868284n8857msgid ""
>443e413e'" 
8858"external ref='figures/combobox_complex.png' "
8859"md5='ec96e29fe85caef072868284443e413e'"
4359msgstr ""8860msgstr ""
nn8861"external ref='figures/combobox_complex.png' "
8862"md5='ec96e29fe85caef072868284443e413e'"
43608863
4361#. (itstool) path: section/para8864#. (itstool) path: section/para
4362#: C/index-in.docbook:36168865#: C/index-in.docbook:3616
n4363msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8866msgid ""
>e/master/examples/book/combobox/complex\">Source Code</link>" 
8867"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8868"master/examples/book/combobox/complex\">Source Code</link>"
4364msgstr ""8869msgstr ""
nn8870"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8871"master/examples/book/combobox/complex\">Källkod</link>"
43658872
4366#. (itstool) path: section/title8873#. (itstool) path: section/title
n4367#: C/index-in.docbook:3621n8874#: C/index-in.docbook:3621 C/index-in.docbook:3707
4368#: C/index-in.docbook:3707
4369msgid "Simple Text Example"8875msgid "Simple Text Example"
n4370msgstr ""n8876msgstr "Enkelt textexempel"
43718877
4372#. (itstool) path: figure/title8878#. (itstool) path: figure/title
4373#: C/index-in.docbook:36248879#: C/index-in.docbook:3624
4374msgid "ComboBoxText"8880msgid "ComboBoxText"
n4375msgstr ""n8881msgstr "ComboBoxText"
43768882
4377#. (itstool) path: imageobject/imagedata8883#. (itstool) path: imageobject/imagedata
4378#. This is a reference to an external file such as an image or video. When8884#. This is a reference to an external file such as an image or video. When
4379#. the file changes, the md5 hash will change to let you know you need to8885#. the file changes, the md5 hash will change to let you know you need to
4380#. update your localized copy. The msgstr is not used at all. Set it to8886#. update your localized copy. The msgstr is not used at all. Set it to
4381#. whatever you like once you have updated your copy of the file.8887#. whatever you like once you have updated your copy of the file.
4382#: C/index-in.docbook:36268888#: C/index-in.docbook:3626
nn8889#, fuzzy
4383msgctxt "_"8890msgctxt "_"
n4384msgid "external ref='figures/combobox_text.png' md5='f8278861eaa5cdc1d165b577fc4n8891msgid ""
>1ccf4'" 
8892"external ref='figures/combobox_text.png' "
8893"md5='f8278861eaa5cdc1d165b577fc41ccf4'"
4385msgstr ""8894msgstr ""
nn8895"external ref='figures/combobox_text.png' "
8896"md5='f8278861eaa5cdc1d165b577fc41ccf4'"
43868897
4387#. (itstool) path: section/para8898#. (itstool) path: section/para
4388#: C/index-in.docbook:36308899#: C/index-in.docbook:3630
n4389msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren8900msgid ""
>e/master/examples/book/combobox/text\">Source Code</link>" 
8901"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8902"master/examples/book/combobox/text\">Source Code</link>"
4390msgstr ""8903msgstr ""
nn8904"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
8905"master/examples/book/combobox/text\">Källkod</link>"
43918906
4392#. (itstool) path: section/title8907#. (itstool) path: section/title
4393#: C/index-in.docbook:36358908#: C/index-in.docbook:3635
4394msgid "ComboBox with an Entry"8909msgid "ComboBox with an Entry"
n4395msgstr ""n8910msgstr "ComboBox med ett Entry"
43968911
4397#. (itstool) path: section/para8912#. (itstool) path: section/para
4398#: C/index-in.docbook:36378913#: C/index-in.docbook:3637
n4399msgid "A <classname>ComboBox</classname> may contain an <classname>Entry</classnn8914msgid ""
>ame> widget for entering of arbitrary text, by specifying <literal>true</literal 
>> for the constructor's <literal>has_entry</literal> parameter." 
8915"A <classname>ComboBox</classname> may contain an <classname>Entry</"
8916"classname> widget for entering of arbitrary text, by specifying "
8917"<literal>true</literal> for the constructor's <literal>has_entry</literal> "
8918"parameter."
4400msgstr ""8919msgstr ""
nn8920"En <classname>ComboBox</classname> kan innehålla en <classname>Entry</"
8921"classname>-komponent för inmatning av godtycklig text genom att ange "
8922"<literal>true</literal> för konstruktorns <literal>has_entry</literal>-"
8923"parameter."
44018924
4402#. (itstool) path: section/title8925#. (itstool) path: section/title
4403#: C/index-in.docbook:36408926#: C/index-in.docbook:3640
4404msgid "The text column"8927msgid "The text column"
n4405msgstr ""n8928msgstr "Textkolumnen"
44068929
4407#. (itstool) path: section/para8930#. (itstool) path: section/para
4408#: C/index-in.docbook:36428931#: C/index-in.docbook:3642
n4409msgid "So that the <classname>Entry</classname> can interact with the drop-down n8932#, fuzzy
>list of choices, you must specify which of your model columns is the text column 
>, with <methodname>set_entry_text_column()</methodname>. For instance:" 
8933msgid ""
8934"So that the <classname>Entry</classname> can interact with the drop-down "
8935"list of choices, you must specify which of your model columns is the text "
8936"column, with <methodname>set_entry_text_column()</methodname>. For instance:"
4410msgstr ""8937msgstr ""
nn8938"För att <classname>Entry</classname>t ska kunna interagera med "
8939"rullgardinslistan med val, måste du ange vilken av dina modellkolumner som "
8940"är textkolumnen med <methodname>set_entry_text_column()</methodname>. Till "
8941"exempel:"
44118942
4412#. (itstool) path: section/programlisting8943#. (itstool) path: section/programlisting
4413#: C/index-in.docbook:36448944#: C/index-in.docbook:3644
n4414#, no-wrapn8945#, fuzzy, no-wrap
4415msgid ""
4416"<code>m_combo.set_entry_text_column(m_columns.m_col_name);</code>"8946msgid "<code>m_combo.set_entry_text_column(m_columns.m_col_name);</code>"
4417msgstr ""8947msgstr "m_combo.set_entry_text_column(m_columns.m_col_name);"
44188948
4419#. (itstool) path: section/para8949#. (itstool) path: section/para
4420#: C/index-in.docbook:36458950#: C/index-in.docbook:3645
n4421msgid "When you select a choice from the drop-down menu, the value from this coln8951#, fuzzy
>umn will be placed in the <classname>Entry</classname>." 
8952msgid ""
8953"When you select a choice from the drop-down menu, the value from this column "
8954"will be placed in the <classname>Entry</classname>."
4422msgstr ""8955msgstr ""
nn8956"När du väljer ett val från rullgardinsmenyn kommer värdet från denna kolumn "
8957"placeras i <classname>Entry</classname>t."
44238958
4424#. (itstool) path: section/title8959#. (itstool) path: section/title
4425#: C/index-in.docbook:36518960#: C/index-in.docbook:3651
nn8961#, fuzzy
4426msgid "The entry"8962msgid "The entry"
n4427msgstr ""n8963msgstr "Inmatningen"
44288964
4429#. (itstool) path: section/para8965#. (itstool) path: section/para
4430#: C/index-in.docbook:36538966#: C/index-in.docbook:3653
n4431msgid "Because the user may enter arbitrary text, an active model row isn't enoun8967msgid ""
>gh to tell us what text the user has entered. Therefore, you should retrieve the 
> <classname>Entry</classname> widget with the <methodname>ComboBox::get_entry()< 
>/methodname> method and call <methodname>get_text()</methodname> on that." 
8968"Because the user may enter arbitrary text, an active model row isn't enough "
8969"to tell us what text the user has entered. Therefore, you should retrieve "
8970"the <classname>Entry</classname> widget with the <methodname>ComboBox::"
8971"get_entry()</methodname> method and call <methodname>get_text()</methodname> "
8972"on that."
4432msgstr ""8973msgstr ""
nn8974"Eftersom användaren kan mata in godtycklig text är en aktiv modellrad inte "
8975"tillräckligt för att säga till oss vilken text som användaren har matat in. "
8976"Du bör därför erhålla <classname>Entry</classname>-komponenten med metoden "
8977"<methodname>ComboBox::get_entry()</methodname> och anropa "
8978"<methodname>get_text()</methodname> på den."
44338979
4434#. (itstool) path: section/para8980#. (itstool) path: section/para
4435#: C/index-in.docbook:36608981#: C/index-in.docbook:3660
n4436msgid "When the user enters arbitrary text, it may not be enough to connect to tn8982#, fuzzy
>he <literal>changed</literal> signal, which is emitted for every typed character 
>. It is not emitted when the user presses the <keycap>Enter</keycap> key. Pressi 
>ng the <keycap>Enter</keycap> key or moving the keyboard focus to another widget 
> may signal that the user has finished entering text. To be notified of these ev 
>ents, connect to the <classname>Entry</classname>'s <literal>activate</literal>  
>signal (available since <application>gtkmm</application> 4.8), and add a <classn 
>ame>Gtk::EventControllerFocus</classname> and connect to its <literal>leave</lit 
>eral> signal, like so" 
8983msgid ""
8984"When the user enters arbitrary text, it may not be enough to connect to the "
8985"<literal>changed</literal> signal, which is emitted for every typed "
8986"character. It is not emitted when the user presses the <keycap>Enter</"
8987"keycap> key. Pressing the <keycap>Enter</keycap> key or moving the keyboard "
8988"focus to another widget may signal that the user has finished entering text. "
8989"To be notified of these events, connect to the <classname>Entry</"
8990"classname>'s <literal>activate</literal> signal (available since "
8991"<application>gtkmm</application> 4.8), and add a <classname>Gtk::"
8992"EventControllerFocus</classname> and connect to its <literal>leave</literal> "
8993"signal, like so"
4437msgstr ""8994msgstr ""
nn8995"När användaren matar in godtyckligt text är det kanske inte tillräckligt att "
8996"ansluta till signalen <literal>changed</literal>, som sänds ut för varje "
8997"inmatat tecken. Den sänds inte ut när användaren trycker på <keycap>Retur</"
8998"keycap>-tangenten. Att trycka på <keycap>Retur</keycap>-tangenten eller "
8999"flytta tangentbordsfokus till en annan komponent kan signalera att "
9000"användaren slutat mata in text. För att aviseras om dessa händelse ansluter "
9001"du till <classname>Entry</classname>ts <literal>activate</literal>-signal "
9002"(tillgänglig sedan <application>gtkmm</application> 4.8.0), och lägger till "
9003"ett <classname>Gtk::EventControllerFocus</classname> och ansluter till des "
9004"<literal>leave</literal>-signal, så här"
44389005
4439#. (itstool) path: section/programlisting9006#. (itstool) path: section/programlisting
4440#: C/index-in.docbook:36709007#: C/index-in.docbook:3670
n4441#, no-wrapn9008#, fuzzy, no-wrap
4442msgid ""9009msgid ""
4443"<code>auto entry = m_Combo.get_entry();\n"9010"<code>auto entry = m_Combo.get_entry();\n"
4444"if (entry)\n"9011"if (entry)\n"
4445"{\n"9012"{\n"
4446"  // Alternatively you can connect to m_Combo.signal_changed().\n"9013"  // Alternatively you can connect to m_Combo.signal_changed().\n"
4453"  m_ConnectionFocusLeave = controller-&gt;signal_leave().connect(\n"9020"  m_ConnectionFocusLeave = controller-&gt;signal_leave().connect(\n"
4454"    sigc::mem_fun(*this, &amp;ExampleWindow::on_entry_focus_leave));\n"9021"    sigc::mem_fun(*this, &amp;ExampleWindow::on_entry_focus_leave));\n"
4455"  entry-&gt;add_controller(controller);\n"9022"  entry-&gt;add_controller(controller);\n"
4456"}</code>"9023"}</code>"
4457msgstr ""9024msgstr ""
nn9025"auto entry = m_Combo.get_entry();\n"
9026"if (entry)\n"
9027"{\n"
9028"  // Alternativt kan du ansluta till m_Combo.signal_changed().\n"
9029"  entry-&gt;signal_changed().connect(sigc::mem_fun(*this,\n"
9030"    &amp;ExampleWindow::on_entry_changed));\n"
9031"  entry-&gt;signal_activate().connect(sigc::mem_fun(*this,\n"
9032"    &amp;ExampleWindow::on_entry_activate));\n"
9033"  // Entry ska ta emot fokuslämnande händelser.\n"
9034"  auto controller = Gtk::EventControllerFocus::create();\n"
9035"  m_ConnectionFocusLeave = controller-&gt;signal_leave().connect(\n"
9036"    sigc::mem_fun(*this, &amp;ExampleWindow::on_entry_focus_leave));\n"
9037"  entry-&gt;add_controller(controller);\n"
9038"}"
44589039
4459#. (itstool) path: section/para9040#. (itstool) path: section/para
4460#: C/index-in.docbook:36849041#: C/index-in.docbook:3684
n4461msgid "The <literal>changed</literal> signals of <classname>ComboBox</classname>n9042#, fuzzy
> and <classname>Entry</classname> are both emitted for every change. It doesn't  
>matter which one you connect to. But the <classname>EventControllerFocus</classn 
>ame> must be added to the <classname>Entry</classname>." 
9043msgid ""
9044"The <literal>changed</literal> signals of <classname>ComboBox</classname> "
9045"and <classname>Entry</classname> are both emitted for every change. It "
9046"doesn't matter which one you connect to. But the "
9047"<classname>EventControllerFocus</classname> must be added to the "
9048"<classname>Entry</classname>."
4462msgstr ""9049msgstr ""
nn9050"<literal>changed</literal>-signalerna för <classname>ComboBox</classname> "
9051"och <classname>Entry</classname> sänds båda ut för varje ändring. Det spelar "
9052"ingen roll vilken du ansluter till. Men detta "
9053"<classname>EventControllerFocus</classname> måste läggas till i "
9054"<classname>Entry</classname>t."
44639055
4464#. (itstool) path: figure/title9056#. (itstool) path: figure/title
4465#: C/index-in.docbook:36969057#: C/index-in.docbook:3696
nn9058#, fuzzy
4466msgid "ComboBox with Entry"9059msgid "ComboBox with Entry"
n4467msgstr ""n9060msgstr "ComboBox med Entry"
44689061
4469#. (itstool) path: imageobject/imagedata9062#. (itstool) path: imageobject/imagedata
4470#. This is a reference to an external file such as an image or video. When9063#. This is a reference to an external file such as an image or video. When
4471#. the file changes, the md5 hash will change to let you know you need to9064#. the file changes, the md5 hash will change to let you know you need to
4472#. update your localized copy. The msgstr is not used at all. Set it to9065#. update your localized copy. The msgstr is not used at all. Set it to
4473#. whatever you like once you have updated your copy of the file.9066#. whatever you like once you have updated your copy of the file.
4474#: C/index-in.docbook:36989067#: C/index-in.docbook:3698
nn9068#, fuzzy
4475msgctxt "_"9069msgctxt "_"
n4476msgid "external ref='figures/comboboxentry_complex.png' md5='09bd46bc2fb93193ed4n9070msgid ""
>f9cf910ede733'" 
9071"external ref='figures/comboboxentry_complex.png' "
9072"md5='09bd46bc2fb93193ed4f9cf910ede733'"
4477msgstr ""9073msgstr ""
nn9074"external ref='figures/comboboxentry_complex.png' "
9075"md5='09bd46bc2fb93193ed4f9cf910ede733'"
44789076
4479#. (itstool) path: section/para9077#. (itstool) path: section/para
4480#: C/index-in.docbook:37029078#: C/index-in.docbook:3702
n4481msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren9079msgid ""
>e/master/examples/book/combobox/entry_complex\">Source Code</link>" 
9080"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
9081"master/examples/book/combobox/entry_complex\">Source Code</link>"
4482msgstr ""9082msgstr ""
nn9083"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
9084"master/examples/book/combobox/entry_complex\">Källkod</link>"
44839085
4484#. (itstool) path: figure/title9086#. (itstool) path: figure/title
4485#: C/index-in.docbook:37109087#: C/index-in.docbook:3710
nn9088#, fuzzy
4486msgid "ComboBoxText with Entry"9089msgid "ComboBoxText with Entry"
n4487msgstr ""n9090msgstr "ComboBoxText med Entry"
44889091
4489#. (itstool) path: imageobject/imagedata9092#. (itstool) path: imageobject/imagedata
4490#. This is a reference to an external file such as an image or video. When9093#. This is a reference to an external file such as an image or video. When
4491#. the file changes, the md5 hash will change to let you know you need to9094#. the file changes, the md5 hash will change to let you know you need to
4492#. update your localized copy. The msgstr is not used at all. Set it to9095#. update your localized copy. The msgstr is not used at all. Set it to
4493#. whatever you like once you have updated your copy of the file.9096#. whatever you like once you have updated your copy of the file.
4494#: C/index-in.docbook:37129097#: C/index-in.docbook:3712
nn9098#, fuzzy
4495msgctxt "_"9099msgctxt "_"
n4496msgid "external ref='figures/comboboxentry_text.png' md5='164e857e073b574d617692n9100msgid ""
>7c8247ad96'" 
9101"external ref='figures/comboboxentry_text.png' "
9102"md5='164e857e073b574d6176927c8247ad96'"
4497msgstr ""9103msgstr ""
nn9104"external ref='figures/comboboxentry_text.png' "
9105"md5='164e857e073b574d6176927c8247ad96'"
44989106
4499#. (itstool) path: section/para9107#. (itstool) path: section/para
4500#: C/index-in.docbook:37169108#: C/index-in.docbook:3716
n4501msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren9109msgid ""
>e/master/examples/book/combobox/entry_text\">Source Code</link>" 
9110"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
9111"master/examples/book/combobox/entry_text\">Source Code</link>"
4502msgstr ""9112msgstr ""
nn9113"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
9114"master/examples/book/combobox/entry_text\">Källkod</link>"
45039115
4504#. (itstool) path: chapter/title9116#. (itstool) path: chapter/title
4505#. (itstool) path: figure/title9117#. (itstool) path: figure/title
n4506#: C/index-in.docbook:3724n9118#: C/index-in.docbook:3724 C/index-in.docbook:3949
4507#: C/index-in.docbook:3949
4508msgid "TextView"9119msgid "TextView"
n4509msgstr ""n9120msgstr "TextView"
45109121
4511#. (itstool) path: chapter/para9122#. (itstool) path: chapter/para
4512#: C/index-in.docbook:37269123#: C/index-in.docbook:3726
n4513msgid "The <classname>TextView</classname> widget can be used to display and edin9124#, fuzzy
>t large amounts of formatted text. Like the <classname>TreeView</classname>, it  
>has a model/view design. In this case the <classname>TextBuffer</classname> is t 
>he model." 
9125msgid ""
9126"The <classname>TextView</classname> widget can be used to display and edit "
9127"large amounts of formatted text. Like the <classname>TreeView</classname>, "
9128"it has a model/view design. In this case the <classname>TextBuffer</"
9129"classname> is the model."
4514msgstr ""9130msgstr ""
nn9131"<classname>TextView</classname>-komponenten kan användas för att visa och "
9132"redigera stora mängder formaterad text. Som <classname>TreeView</classname> "
9133"har det en model/view-design. I detta fall är det <classname>TextBuffer</"
9134"classname> som är modellen."
45159135
4516#. (itstool) path: section/title9136#. (itstool) path: section/title
4517#: C/index-in.docbook:37349137#: C/index-in.docbook:3734
4518msgid "The Buffer"9138msgid "The Buffer"
n4519msgstr ""n9139msgstr "Bufferten"
45209140
4521#. (itstool) path: section/para9141#. (itstool) path: section/para
4522#: C/index-in.docbook:37369142#: C/index-in.docbook:3736
n4523msgid "<classname>Gtk::TextBuffer</classname> is a model containing the data forn9143#, fuzzy
> the <classname>Gtk::TextView</classname>, like the <classname>Gtk::TreeModel</c 
>lassname> used by <classname>Gtk::TreeView</classname>. This allows two or more  
><classname>Gtk::TextView</classname>s to share the same <classname>TextBuffer</c 
>lassname>, and allows those TextBuffers to be displayed slightly differently. Or 
> you could maintain several <classname>Gtk::TextBuffer</classname>s and choose t 
>o display each one at different times in the same <classname>Gtk::TextView</clas 
>sname> widget." 
9144msgid ""
9145"<classname>Gtk::TextBuffer</classname> is a model containing the data for "
9146"the <classname>Gtk::TextView</classname>, like the <classname>Gtk::"
9147"TreeModel</classname> used by <classname>Gtk::TreeView</classname>. This "
9148"allows two or more <classname>Gtk::TextView</classname>s to share the same "
9149"<classname>TextBuffer</classname>, and allows those TextBuffers to be "
9150"displayed slightly differently. Or you could maintain several "
9151"<classname>Gtk::TextBuffer</classname>s and choose to display each one at "
9152"different times in the same <classname>Gtk::TextView</classname> widget."
4524msgstr ""9153msgstr ""
nn9154"<classname>Gtk::TextBuffer</classname> är en modell som innehåller data för "
9155"<classname>Gtk::TextView</classname>, som den <classname>Gtk::TreeModel</"
9156"classname> som används av <classname>Gtk::TreeView</classname>. Detta "
9157"tillåter två eller fler <classname>Gtk::TextView</classname> att dela på "
9158"samma <classname>TextBuffer</classname>, och låter dessa TextBuffer-"
9159"komponenter visas lite olika. Eller så kan du underhålla flera "
9160"<classname>Gtk::TextBuffer</classname>-komponenter och välja att visa var "
9161"och en på olika tider i samma <classname>Gtk::TextView</classname>-komponent."
45259162
4526#. (itstool) path: section/para9163#. (itstool) path: section/para
4527#: C/index-in.docbook:37469164#: C/index-in.docbook:3746
n4528msgid "The <classname>TextView</classname> creates its own default <classname>Ten9165#, fuzzy
>xtBuffer</classname>, which you can access via the <methodname>get_buffer()</met 
>hodname> method." 
9166msgid ""
9167"The <classname>TextView</classname> creates its own default "
9168"<classname>TextBuffer</classname>, which you can access via the "
9169"<methodname>get_buffer()</methodname> method."
4529msgstr ""9170msgstr ""
nn9171"<classname>TextView</classname> skapar sin egen standard-"
9172"<classname>TextBuffer</classname>, som du kan komma åt genom metoden "
9173"<methodname>get_buffer()</methodname>."
45309174
4531#. (itstool) path: section/para9175#. (itstool) path: section/para
4532#: C/index-in.docbook:37529176#: C/index-in.docbook:3752
n4533msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9177msgid ""
>1TextBuffer.html\">Reference</link>" 
9178"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9179"classGtk_1_1TextBuffer.html\">Reference</link>"
4534msgstr ""9180msgstr ""
nn9181"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9182"classGtk_1_1TextBuffer.html\">Referens</link>"
45359183
4536#. (itstool) path: section/title9184#. (itstool) path: section/title
4537#: C/index-in.docbook:37559185#: C/index-in.docbook:3755
4538msgid "Iterators"9186msgid "Iterators"
n4539msgstr ""n9187msgstr "Iteratorer"
45409188
4541#. (itstool) path: section/para9189#. (itstool) path: section/para
4542#: C/index-in.docbook:37579190#: C/index-in.docbook:3757
n4543msgid "A <classname>Gtk::TextBuffer::iterator</classname> and a <classname>Gtk::n9191#, fuzzy
>TextBuffer::const_iterator</classname> represent a position between two characte 
>rs in the text buffer. Whenever the buffer is modified in a way that affects the 
> number of characters in the buffer, all outstanding iterators become invalid. B 
>ecause of this, iterators can't be used to preserve positions across buffer modi 
>fications. To preserve a position, use <classname>Gtk::TextBuffer::Mark</classna 
>me>." 
9192msgid ""
9193"A <classname>Gtk::TextBuffer::iterator</classname> and a <classname>Gtk::"
9194"TextBuffer::const_iterator</classname> represent a position between two "
9195"characters in the text buffer. Whenever the buffer is modified in a way that "
9196"affects the number of characters in the buffer, all outstanding iterators "
9197"become invalid. Because of this, iterators can't be used to preserve "
9198"positions across buffer modifications. To preserve a position, use "
9199"<classname>Gtk::TextBuffer::Mark</classname>."
4544msgstr ""9200msgstr ""
nn9201"En <classname>Gtk::TextBuffer::iterator</classname> och en <classname>Gtk::"
9202"TextBuffer::const_iterator</classname> representerar en position mellan två "
9203"tecken i textbufferten. Närhelst bufferten ändras på ett sätt som påverkar "
9204"antalet tecken i bufferten kommer alla de tidigare iteratorerna bli "
9205"ogiltiga. På grund av detta kan iteratorer inte användas för att bevara "
9206"positioner genom buffertändringar. För att bevara en position, använd "
9207"<classname>Gtk::TextBuffer::Mark</classname>."
45459208
4546#. (itstool) path: section/para9209#. (itstool) path: section/para
4547#: C/index-in.docbook:37649210#: C/index-in.docbook:3764
n4548msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9211msgid ""
>1TextIter.html\">Reference</link>" 
9212"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9213"classGtk_1_1TextIter.html\">Reference</link>"
4549msgstr ""9214msgstr ""
nn9215"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9216"classGtk_1_1TextIter.html\">Referens</link>"
45509217
4551#. (itstool) path: section/title9218#. (itstool) path: section/title
4552#: C/index-in.docbook:37689219#: C/index-in.docbook:3768
4553msgid "Tags and Formatting"9220msgid "Tags and Formatting"
n4554msgstr ""n9221msgstr "Taggar och formatering"
45559222
4556#. (itstool) path: section/title9223#. (itstool) path: section/title
4557#: C/index-in.docbook:37719224#: C/index-in.docbook:3771
4558msgid "Tags"9225msgid "Tags"
n4559msgstr ""n9226msgstr "Taggar"
45609227
4561#. (itstool) path: section/para9228#. (itstool) path: section/para
4562#: C/index-in.docbook:37739229#: C/index-in.docbook:3773
n4563msgid "To specify that some text in the buffer should have specific formatting, n9230#, fuzzy
>you must define a tag to hold that formatting information, and then apply that t 
>ag to the region of text. For instance, to define the tag and its properties:" 
9231msgid ""
9232"To specify that some text in the buffer should have specific formatting, you "
9233"must define a tag to hold that formatting information, and then apply that "
9234"tag to the region of text. For instance, to define the tag and its "
9235"properties:"
4564msgstr ""9236msgstr ""
nn9237"För att ange att någon text i bufferten ska ha specifik formatering måste du "
9238"ange en tagg för att hålla den formatinformationen, och sedan tillämpa den "
9239"taggen på textområdet. För att exempelvis definiera taggen och dess "
9240"egenskaper:"
45659241
4566#. (itstool) path: section/programlisting9242#. (itstool) path: section/programlisting
4567#: C/index-in.docbook:37769243#: C/index-in.docbook:3776
n4568#, no-wrapn9244#, fuzzy, no-wrap
9245#| msgid ""
9246#| "auto refTagMatch = Gtk::TextBuffer::Tag::create();\n"
9247#| "refTagMatch-&gt;property_background() = \"orange\";"
4569msgid ""9248msgid ""
4570"<code>auto refTagMatch = Gtk::TextBuffer::Tag::create();\n"9249"<code>auto refTagMatch = Gtk::TextBuffer::Tag::create();\n"
4571"refTagMatch-&gt;property_background() = \"orange\";</code>"9250"refTagMatch-&gt;property_background() = \"orange\";</code>"
4572msgstr ""9251msgstr ""
nn9252"auto refTagMatch = Gtk::TextBuffer::Tag::create();\n"
9253"refTagMatch-&gt;property_background() = \"orange\";"
45739254
4574#. (itstool) path: section/para9255#. (itstool) path: section/para
4575#: C/index-in.docbook:37789256#: C/index-in.docbook:3778
n4576msgid "You can specify a name for the <classname>Tag</classname> when using the n9257#, fuzzy
><methodname>create()</methodname> method, but it is not necessary." 
9258msgid ""
9259"You can specify a name for the <classname>Tag</classname> when using the "
9260"<methodname>create()</methodname> method, but it is not necessary."
4577msgstr ""9261msgstr ""
nn9262"Du kan ange ett namn för denna <classname>Tag</classname> när du använder "
9263"<methodname>create()</methodname>-metoden, men det är inte nödvändigt."
45789264
4579#. (itstool) path: section/para9265#. (itstool) path: section/para
4580#: C/index-in.docbook:37839266#: C/index-in.docbook:3783
4581msgid "The <classname>Tag</classname> class has many other properties."9267msgid "The <classname>Tag</classname> class has many other properties."
n4582msgstr ""n9268msgstr "Klassen <classname>Tag</classname> har många andra egenskaper."
45839269
4584#. (itstool) path: section/para9270#. (itstool) path: section/para
4585#: C/index-in.docbook:37879271#: C/index-in.docbook:3787
n4586msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9272msgid ""
>1TextTag.html\">Reference</link>" 
9273"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9274"classGtk_1_1TextTag.html\">Reference</link>"
4587msgstr ""9275msgstr ""
nn9276"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9277"classGtk_1_1TextTag.html\">Referens</link>"
45889278
4589#. (itstool) path: section/title9279#. (itstool) path: section/title
4590#: C/index-in.docbook:37929280#: C/index-in.docbook:3792
4591msgid "TagTable"9281msgid "TagTable"
n4592msgstr ""n9282msgstr "TagTable"
45939283
4594#. (itstool) path: section/para9284#. (itstool) path: section/para
4595#: C/index-in.docbook:37949285#: C/index-in.docbook:3794
n4596msgid "Each <classname>Gtk::TextBuffer</classname> uses a <classname>Gtk::TextBun9286#, fuzzy
>ffer::TagTable</classname>, which contains the <classname>Tag</classname>s for t 
>hat buffer. 2 or more <classname>TextBuffer</classname>s may share the same <cla 
>ssname>TagTable</classname>. When you create <classname>Tag</classname>s you sho 
>uld add them to the <classname>TagTable</classname>. For instance:" 
9287msgid ""
9288"Each <classname>Gtk::TextBuffer</classname> uses a <classname>Gtk::"
9289"TextBuffer::TagTable</classname>, which contains the <classname>Tag</"
9290"classname>s for that buffer. 2 or more <classname>TextBuffer</classname>s "
9291"may share the same <classname>TagTable</classname>. When you create "
9292"<classname>Tag</classname>s you should add them to the <classname>TagTable</"
9293"classname>. For instance:"
4597msgstr ""9294msgstr ""
nn9295"Varje <classname>Gtk::TextBuffer</classname> använder en <classname>Gtk::"
9296"TextBuffer::TagTable</classname>, vilken innehåller den buffertens "
9297"<classname>Tag</classname>gar. 2 eller fler <classname>TextBuffer</"
9298"classname> kan dela på samma <classname>TagTable</classname>. När du skapar "
9299"<classname>Tag</classname>gar bör du lägga till dem i denna "
9300"<classname>TagTable</classname>. Till exempel:"
45989301
4599#. (itstool) path: section/programlisting9302#. (itstool) path: section/programlisting
4600#: C/index-in.docbook:38029303#: C/index-in.docbook:3802
n4601#, no-wrapn9304#, fuzzy, no-wrap
4602msgid ""9305msgid ""
4603"<code>auto refTagTable = Gtk::TextBuffer::TagTable::create();\n"9306"<code>auto refTagTable = Gtk::TextBuffer::TagTable::create();\n"
4604"refTagTable-&gt;add(refTagMatch);\n"9307"refTagTable-&gt;add(refTagMatch);\n"
4605"//Hopefully a future version of gtkmm will have a set_tag_table() method,\n"9308"//Hopefully a future version of gtkmm will have a set_tag_table() method,\n"
4606"//for use after creation of the buffer.\n"9309"//for use after creation of the buffer.\n"
4607"auto refBuffer = Gtk::TextBuffer::create(refTagTable);</code>"9310"auto refBuffer = Gtk::TextBuffer::create(refTagTable);</code>"
4608msgstr ""9311msgstr ""
nn9312"auto refTagTable = Gtk::TextBuffer::TagTable::create();\n"
9313"refTagTable-&gt;add(refTagMatch);\n"
9314"//Förhoppningsvis kommer en framtida version av <application>gtkmm</application
 >> ha en set_tag_table()-metod,\n"
9315"//för användning efter skapande av bufferten.\n"
9316"auto refBuffer = Gtk::TextBuffer::create(refTagTable);"
46099317
4610#. (itstool) path: section/para9318#. (itstool) path: section/para
4611#: C/index-in.docbook:38089319#: C/index-in.docbook:3808
n4612msgid "You can also use <methodname>get_tag_table()</methodname> to get, and mayn9320#, fuzzy
>be modify, the <classname>TextBuffer</classname>'s default <classname>TagTable</ 
>classname> instead of creating one explicitly." 
9321msgid ""
9322"You can also use <methodname>get_tag_table()</methodname> to get, and maybe "
9323"modify, the <classname>TextBuffer</classname>'s default <classname>TagTable</"
9324"classname> instead of creating one explicitly."
4613msgstr ""9325msgstr ""
nn9326"Du kan också använda <methodname>get_tag_table()</methodname> för att få, "
9327"och kanske modifiera, <classname>TextBuffer</classname>tens "
9328"<classname>TagTable</classname> i stället för att skapa en explicit."
46149329
4615#. (itstool) path: section/para9330#. (itstool) path: section/para
4616#: C/index-in.docbook:38149331#: C/index-in.docbook:3814
n4617msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9332msgid ""
>1TextTagTable.html\">Reference</link>" 
9333"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9334"classGtk_1_1TextTagTable.html\">Reference</link>"
4618msgstr ""9335msgstr ""
nn9336"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9337"classGtk_1_1TextTagTable.html\">Referens</link>"
46199338
4620#. (itstool) path: section/title9339#. (itstool) path: section/title
4621#: C/index-in.docbook:38199340#: C/index-in.docbook:3819
4622msgid "Applying Tags"9341msgid "Applying Tags"
n4623msgstr ""n9342msgstr "Tillämpa taggar"
46249343
4625#. (itstool) path: section/para9344#. (itstool) path: section/para
4626#: C/index-in.docbook:38219345#: C/index-in.docbook:3821
n4627msgid "If you have created a <classname>Tag</classname> and added it to the <clan9346#, fuzzy
>ssname>TagTable</classname>, you may apply that tag to part of the <classname>Te 
>xtBuffer</classname> so that some of the text is displayed with that formatting. 
> You define the start and end of the range of text by specifying <classname>Gtk: 
>:TextBuffer::iterator</classname>s. For instance:" 
9347msgid ""
9348"If you have created a <classname>Tag</classname> and added it to the "
9349"<classname>TagTable</classname>, you may apply that tag to part of the "
9350"<classname>TextBuffer</classname> so that some of the text is displayed with "
9351"that formatting. You define the start and end of the range of text by "
9352"specifying <classname>Gtk::TextBuffer::iterator</classname>s. For instance:"
4628msgstr ""9353msgstr ""
nn9354"Om du har skapat en <classname>Tag</classname> och lagt till den till din "
9355"<classname>TagTable</classname> kan du tillämpa den taggen på en del av din "
9356"<classname>TextBuffer</classname> så att delar av texten visas med den "
9357"formateringen. Du definierar start och slut på textintervallet genom att att "
9358"ange <classname>Gtk::TextBuffer::iterator</classname>er. Till exempel:"
46299359
4630#. (itstool) path: section/programlisting9360#. (itstool) path: section/programlisting
4631#: C/index-in.docbook:38289361#: C/index-in.docbook:3828
n4632#, no-wrapn9362#, fuzzy, no-wrap
4633msgid ""
4634"<code>refBuffer-&gt;apply_tag(refTagMatch, iterRangeStart, iterRangeStop);</cod9363msgid "<code>refBuffer-&gt;apply_tag(refTagMatch, iterRangeStart, iterRangeStop)
>e>">;</code>"
4635msgstr ""9364msgstr "refBuffer-&gt;apply_tag(refTagMatch, iterRangeStart, iterRangeStop);"
46369365
4637#. (itstool) path: section/para9366#. (itstool) path: section/para
4638#: C/index-in.docbook:38299367#: C/index-in.docbook:3829
nn9368#, fuzzy
4639msgid "Or you could specify the tag when first inserting the text:"9369msgid "Or you could specify the tag when first inserting the text:"
n4640msgstr ""n9370msgstr "Eller så kan du ange texten när du först infogar texten:"
46419371
4642#. (itstool) path: section/programlisting9372#. (itstool) path: section/programlisting
4643#: C/index-in.docbook:38329373#: C/index-in.docbook:3832
n4644#, no-wrapn9374#, fuzzy, no-wrap
4645msgid ""
4646"<code>refBuffer-&gt;insert_with_tag(iter, \"Some text\", refTagMatch);</code>"9375msgid "<code>refBuffer-&gt;insert_with_tag(iter, \"Some text\", refTagMatch);</c
 >ode>"
4647msgstr ""9376msgstr "refBuffer-&gt;insert_with_tag(iter, \"Lite text\", refTagMatch);"
46489377
4649#. (itstool) path: section/para9378#. (itstool) path: section/para
4650#: C/index-in.docbook:38349379#: C/index-in.docbook:3834
n4651msgid "You can apply more than one <classname>Tag</classname> to the same text, n9380#, fuzzy
>by using <methodname>apply_tag()</methodname> more than once, or by using <metho 
>dname>insert_with_tags()</methodname>. The <classname>Tag</classname>s might spe 
>cify different values for the same properties, but you can resolve these conflic 
>ts by using <methodname>Tag::set_priority()</methodname>." 
9381msgid ""
9382"You can apply more than one <classname>Tag</classname> to the same text, by "
9383"using <methodname>apply_tag()</methodname> more than once, or by using "
9384"<methodname>insert_with_tags()</methodname>. The <classname>Tag</classname>s "
9385"might specify different values for the same properties, but you can resolve "
9386"these conflicts by using <methodname>Tag::set_priority()</methodname>."
4652msgstr ""9387msgstr ""
nn9388"Du kan tillämpa mer än en <classname>Tag</classname> på samma text, genom "
9389"att använda <methodname>apply_tag()</methodname> mer än en gång, eller genom "
9390"att använda <methodname>insert_with_tags()</methodname>. The <classname>Tag</"
9391"classname>garna kan ange olika värden för samma egenskaper, men du kan lösa "
9392"dessa konflikter genom att använda <methodname>Tag::set_priority()</"
9393"methodname>."
46539394
4654#. (itstool) path: section/title9395#. (itstool) path: section/title
4655#: C/index-in.docbook:38469396#: C/index-in.docbook:3846
nn9397#, fuzzy
4656msgid "Marks"9398msgid "Marks"
n4657msgstr ""n9399msgstr "Mark"
46589400
4659#. (itstool) path: section/para9401#. (itstool) path: section/para
4660#: C/index-in.docbook:38489402#: C/index-in.docbook:3848
n4661msgid "<classname>TextBuffer</classname> iterators are generally invalidated when9403msgid ""
>n the text changes, but you can use a <classname>Gtk::TextBuffer::Mark</classnam 
>e> to remember a position in these situations. For instance," 
9404"<classname>TextBuffer</classname> iterators are generally invalidated when "
9405"the text changes, but you can use a <classname>Gtk::TextBuffer::Mark</"
9406"classname> to remember a position in these situations. For instance,"
4662msgstr ""9407msgstr ""
nn9408"<classname>TextBuffer</classname>-iteratorer görs vanligen ogiltiga när "
9409"texten ändras, men du kan använda ett <classname>Gtk::TextBuffer::Mark</"
9410"classname> för att komma ihåg en position i dessa fall. Till exempel,"
46639411
4664#. (itstool) path: section/programlisting9412#. (itstool) path: section/programlisting
4665#: C/index-in.docbook:38539413#: C/index-in.docbook:3853
n4666#, no-wrapn9414#, fuzzy, no-wrap
4667msgid ""9415#| msgid "auto refMark = refBuffer-&gt;create_mark(iter);"
4668"<code>auto refMark = refBuffer-&gt;create_mark(iter);</code>"9416msgid "<code>auto refMark = refBuffer-&gt;create_mark(iter);</code>"
4669msgstr ""9417msgstr "auto refMark = refBuffer-&gt;create_mark(iter);"
46709418
4671#. (itstool) path: section/para9419#. (itstool) path: section/para
4672#: C/index-in.docbook:38559420#: C/index-in.docbook:3855
n4673msgid "You can then use the <methodname>get_iter()</methodname> method later to n9421#, fuzzy
>create an iterator for the <classname>Mark</classname>'s new position." 
9422msgid ""
9423"You can then use the <methodname>get_iter()</methodname> method later to "
9424"create an iterator for the <classname>Mark</classname>'s new position."
4674msgstr ""9425msgstr ""
nn9426"Du kan sedan använda metoden <methodname>get_iter()</methodname> för att "
9427"senare skapa en iterator för den nya positionen för detta <classname>Mark</"
9428"classname>."
46759429
4676#. (itstool) path: section/para9430#. (itstool) path: section/para
4677#: C/index-in.docbook:38609431#: C/index-in.docbook:3860
n4678msgid "There are two built-in <classname>Mark</classname>s - <literal>insert</lin9432#, fuzzy
>teral> and <literal>selection_bound</literal>, which you can access with <classn 
>ame>TextBuffer</classname>'s <methodname>get_insert()</methodname> and <methodna 
>me>get_selection_bound()</methodname> methods." 
9433msgid ""
9434"There are two built-in <classname>Mark</classname>s - <literal>insert</"
9435"literal> and <literal>selection_bound</literal>, which you can access with "
9436"<classname>TextBuffer</classname>'s <methodname>get_insert()</methodname> "
9437"and <methodname>get_selection_bound()</methodname> methods."
4679msgstr ""9438msgstr ""
nn9439"Det finns två inbyggda <classname>Mark</classname> - <literal>insert</"
9440"literal> och <literal>selection_bound</literal>, vilka du kan komma åt med "
9441"<classname>TextBuffer</classname>tens metoder <methodname>get_insert()</"
9442"methodname> och <methodname>get_selection_bound()</methodname>."
46809443
4681#. (itstool) path: section/para9444#. (itstool) path: section/para
4682#: C/index-in.docbook:38679445#: C/index-in.docbook:3867
n4683msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9446msgid ""
>1TextMark.html\">Reference</link>" 
9447"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9448"classGtk_1_1TextMark.html\">Reference</link>"
4684msgstr ""9449msgstr ""
nn9450"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9451"classGtk_1_1TextMark.html\">Referens</link>"
46859452
4686#. (itstool) path: section/para9453#. (itstool) path: section/para
4687#: C/index-in.docbook:38749454#: C/index-in.docbook:3874
n4688msgid "As mentioned above, each <classname>TextView</classname> has a <classnamen9455msgid ""
>>TextBuffer</classname>, and one or more <classname>TextView</classname>s can sh 
>are the same <classname>TextBuffer</classname>." 
9456"As mentioned above, each <classname>TextView</classname> has a "
9457"<classname>TextBuffer</classname>, and one or more <classname>TextView</"
9458"classname>s can share the same <classname>TextBuffer</classname>."
4689msgstr ""9459msgstr ""
nn9460"Som nämns ovan har varje <classname>TextView</classname> en "
9461"<classname>TextBuffer</classname>, och en eller flera <classname>TextView</"
9462"classname> kan dela på samma <classname>TextBuffer</classname>."
46909463
4691#. (itstool) path: section/para9464#. (itstool) path: section/para
4692#: C/index-in.docbook:38819465#: C/index-in.docbook:3881
n4693msgid "Like the <classname>TreeView</classname>, you should probably put your <cn9466#, fuzzy
>lassname>TextView</classname> inside a <classname>ScrolledWindow</classname> to  
>allow the user to see and move around the whole text area with scrollbars." 
9467msgid ""
9468"Like the <classname>TreeView</classname>, you should probably put your "
9469"<classname>TextView</classname> inside a <classname>ScrolledWindow</"
9470"classname> to allow the user to see and move around the whole text area with "
9471"scrollbars."
4694msgstr ""9472msgstr ""
nn9473"Som med <classname>TreeView</classname> bör du troligen stoppa din "
9474"<classname>TextView</classname> i ett <classname>ScrolledWindow</classname> "
9475"för att låta användaren se och gå runt i hela textområdet med "
9476"rullningslister."
46959477
4696#. (itstool) path: section/para9478#. (itstool) path: section/para
4697#: C/index-in.docbook:38889479#: C/index-in.docbook:3888
n4698msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9480msgid ""
>1TextView.html\">Reference</link>" 
9481"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9482"classGtk_1_1TextView.html\">Reference</link>"
4699msgstr ""9483msgstr ""
nn9484"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9485"classGtk_1_1TextView.html\">Referens</link>"
47009486
4701#. (itstool) path: section/title9487#. (itstool) path: section/title
4702#: C/index-in.docbook:38919488#: C/index-in.docbook:3891
4703msgid "Default formatting"9489msgid "Default formatting"
n4704msgstr ""n9490msgstr "Standardformatering"
47059491
4706#. (itstool) path: section/para9492#. (itstool) path: section/para
4707#: C/index-in.docbook:38939493#: C/index-in.docbook:3893
n4708msgid "<classname>TextView</classname> has various methods which allow you to chn9494#, fuzzy
>ange the presentation of the buffer for this particular view. Some of these may  
>be overridden by the <classname>Gtk::TextTag</classname>s in the buffer, if they 
> specify the same things. For instance, <methodname>set_left_margin()</methodnam 
>e>, <methodname>set_right_margin()</methodname>, <methodname>set_indent()</metho 
>dname>, etc." 
9495msgid ""
9496"<classname>TextView</classname> has various methods which allow you to "
9497"change the presentation of the buffer for this particular view. Some of "
9498"these may be overridden by the <classname>Gtk::TextTag</classname>s in the "
9499"buffer, if they specify the same things. For instance, "
9500"<methodname>set_left_margin()</methodname>, <methodname>set_right_margin()</"
9501"methodname>, <methodname>set_indent()</methodname>, etc."
4709msgstr ""9502msgstr ""
nn9503"<classname>TextView</classname> har olika metoder som låter dig ändra "
9504"buffertens presentation för denna specifika vy. Vissa av dessa kan "
9505"åsidosättas av de <classname>Gtk::TextTag</classname> som finns i bufferten, "
9506"om de anger samma saker. Exempelvis <methodname>set_left_margin()</"
9507"methodname>, <methodname>set_right_margin()</methodname>, "
9508"<methodname>set_indent()</methodname> och så vidare."
47109509
4711#. (itstool) path: section/title9510#. (itstool) path: section/title
4712#: C/index-in.docbook:39049511#: C/index-in.docbook:3904
4713msgid "Scrolling"9512msgid "Scrolling"
n4714msgstr ""n9513msgstr "Rullning"
47159514
4716#. (itstool) path: section/para9515#. (itstool) path: section/para
4717#: C/index-in.docbook:39069516#: C/index-in.docbook:3906
n4718msgid "<classname>Gtk::TextView</classname> has various <methodname>scroll_to()<n9517msgid ""
>/methodname> methods. These allow you to ensure that a particular part of the te 
>xt buffer is visible. For instance, your application's Find feature might use <m 
>ethodname>Gtk::TextView::scroll_to()</methodname> to show the found text." 
9518"<classname>Gtk::TextView</classname> has various <methodname>scroll_to()</"
9519"methodname> methods. These allow you to ensure that a particular part of the "
9520"text buffer is visible. For instance, your application's Find feature might "
9521"use <methodname>Gtk::TextView::scroll_to()</methodname> to show the found "
9522"text."
4719msgstr ""9523msgstr ""
nn9524"<classname>Gtk::TextView</classname> har olika <methodname>scroll_to()</"
9525"methodname>-metoder. Dessa låter dig säkerställa att en viss del av "
9526"textbufferten är synlig. Exempelvis använder ditt programs sökfunktion "
9527"kanske <methodname>Gtk::TextView::scroll_to()</methodname> för att visa den "
9528"hittade texten."
47209529
4721#. (itstool) path: section/title9530#. (itstool) path: section/title
4722#: C/index-in.docbook:39219531#: C/index-in.docbook:3921
nn9532#, fuzzy
4723msgid "Widgets and ChildAnchors"9533msgid "Widgets and ChildAnchors"
n4724msgstr ""n9534msgstr "Komponenter och ChildAnchor"
47259535
4726#. (itstool) path: section/para9536#. (itstool) path: section/para
4727#: C/index-in.docbook:39239537#: C/index-in.docbook:3923
n4728msgid "You can embed widgets, such as <classname>Gtk::Button</classname>s, in thn9538#, fuzzy
>e text. Each such child widget needs a <classname>ChildAnchor</classname>. Child 
>Anchors are associated with <classname>iterator</classname>s. For instance, to c 
>reate a child anchor at a particular position, use <methodname>Gtk::TextBuffer:: 
>create_child_anchor()</methodname>:" 
9539msgid ""
9540"You can embed widgets, such as <classname>Gtk::Button</classname>s, in the "
9541"text. Each such child widget needs a <classname>ChildAnchor</classname>. "
9542"ChildAnchors are associated with <classname>iterator</classname>s. For "
9543"instance, to create a child anchor at a particular position, use "
9544"<methodname>Gtk::TextBuffer::create_child_anchor()</methodname>:"
4729msgstr ""9545msgstr ""
nn9546"Du kan bädda in komponenter, som <classname>Gtk::Button</classname>, i "
9547"texten. Varje sådan underordnad komponent behöver ett "
9548"<classname>ChildAnchor</classname>. ChildAnchor är associerat med "
9549"<classname>iterator</classname>er. För att exempelvis skapa ett ankare för "
9550"underordnade på en viss position använder du <methodname>Gtk::TextBuffer::"
9551"create_child_anchor()</methodname>:"
47309552
4731#. (itstool) path: section/programlisting9553#. (itstool) path: section/programlisting
4732#: C/index-in.docbook:39309554#: C/index-in.docbook:3930
n4733#, no-wrapn9555#, fuzzy, no-wrap
4734msgid ""9556#| msgid "auto refAnchor = refBuffer-&gt;create_child_anchor(iter);"
4735"<code>auto refAnchor = refBuffer-&gt;create_child_anchor(iter);</code>"9557msgid "<code>auto refAnchor = refBuffer-&gt;create_child_anchor(iter);</code>"
4736msgstr ""9558msgstr "auto refAnchor = refBuffer-&gt;create_child_anchor(iter);"
47379559
4738#. (itstool) path: section/para9560#. (itstool) path: section/para
4739#: C/index-in.docbook:39329561#: C/index-in.docbook:3932
nn9562msgid ""
4740msgid "Then, to add a widget at that position, use <methodname>Gtk::TextView::ad9563"Then, to add a widget at that position, use <methodname>Gtk::TextView::"
>d_child_at_anchor()</methodname>:" 
9564"add_child_at_anchor()</methodname>:"
4741msgstr ""9565msgstr ""
nn9566"Använd sedan <methodname>Gtk::TextView::add_child_at_anchor()</methodname> "
9567"för att lägga till en komponent på den positionen:"
47429568
4743#. (itstool) path: section/programlisting9569#. (itstool) path: section/programlisting
4744#: C/index-in.docbook:39369570#: C/index-in.docbook:3936
n4745#, no-wrapn9571#, fuzzy, no-wrap
4746msgid ""9572#| msgid "m_TextView.add_child_at_anchor(m_Button, refAnchor);"
4747"<code>m_TextView.add_child_at_anchor(m_Button, refAnchor);</code>"9573msgid "<code>m_TextView.add_child_at_anchor(m_Button, refAnchor);</code>"
4748msgstr ""9574msgstr "m_TextView.add_child_at_anchor(m_Button, refAnchor);"
47499575
4750#. (itstool) path: section/para9576#. (itstool) path: section/para
4751#: C/index-in.docbook:39389577#: C/index-in.docbook:3938
n4752msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n9578msgid ""
>1TextChildAnchor.html\">Reference</link>" 
9579"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9580"classGtk_1_1TextChildAnchor.html\">Reference</link>"
4753msgstr ""9581msgstr ""
nn9582"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
9583"classGtk_1_1TextChildAnchor.html\">Referens</link>"
47549584
4755#. (itstool) path: imageobject/imagedata9585#. (itstool) path: imageobject/imagedata
4756#. This is a reference to an external file such as an image or video. When9586#. This is a reference to an external file such as an image or video. When
4757#. the file changes, the md5 hash will change to let you know you need to9587#. the file changes, the md5 hash will change to let you know you need to
4758#. update your localized copy. The msgstr is not used at all. Set it to9588#. update your localized copy. The msgstr is not used at all. Set it to
4759#. whatever you like once you have updated your copy of the file.9589#. whatever you like once you have updated your copy of the file.
4760#: C/index-in.docbook:39519590#: C/index-in.docbook:3951
nn9591#, fuzzy
4761msgctxt "_"9592msgctxt "_"
nn9593msgid ""
4762msgid "external ref='figures/textview.png' md5='451e30f66cc32c4231bb6bc442cf0d2f9594"external ref='figures/textview.png' md5='451e30f66cc32c4231bb6bc442cf0d2f'"
>'" 
4763msgstr ""9595msgstr ""
nn9596"external ref='figures/textview.png' md5='451e30f66cc32c4231bb6bc442cf0d2f'"
47649597
4765#. (itstool) path: section/para9598#. (itstool) path: section/para
4766#: C/index-in.docbook:39559599#: C/index-in.docbook:3955
n4767msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren9600msgid ""
>e/master/examples/book/textview/\">Source Code</link>" 
9601"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
9602"master/examples/book/textview/\">Source Code</link>"
4768msgstr ""9603msgstr ""
nn9604"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
9605"master/examples/book/textview/\">Källkod</link>"
47699606
4770#. (itstool) path: section/title9607#. (itstool) path: section/title
4771#: C/index-in.docbook:39599608#: C/index-in.docbook:3959
nn9609#, fuzzy
9610#| msgid "Examples"
4772msgid "Other Examples"9611msgid "Other Examples"
n4773msgstr ""n9612msgstr "Exempel"
47749613
4775#. (itstool) path: section/para9614#. (itstool) path: section/para
4776#: C/index-in.docbook:39619615#: C/index-in.docbook:3961
n4777msgid "The example in the <link linkend=\"sec-i18n-example\"> Internationalizatin9616msgid ""
>on and Localization</link> chapter uses <classname>TextView</classname>." 
9617"The example in the <link linkend=\"sec-i18n-example\"> Internationalization "
9618"and Localization</link> chapter uses <classname>TextView</classname>."
4778msgstr ""9619msgstr ""
47799620
4780#. (itstool) path: section/para9621#. (itstool) path: section/para
4781#: C/index-in.docbook:39659622#: C/index-in.docbook:3965
n4782msgid "There is a more complicated example among <link xlink:href=\"https://gitln9623#, fuzzy
>ab.gnome.org/GNOME/gtkmm/tree/master/demos/gtk-demo/example_textview.cc\"><appli 
>cation>gtkmm</application>'s demo programs</link>." 
9624#| msgid ""
9625#| "Some <classname>TreeView</classname> examples are shown here. There are "
9626#| "more examples in the <link xlink:href=\"https://gitlab.gnome.org/GNOME/"
9627#| "gtkmm-documentation/tree/master/examples/book/treeview/\">treeview "
9628#| "directory</link> in <application>gtkmm-documentation</application>'s "
9629#| "examples."
9630msgid ""
9631"There is a more complicated example among <link xlink:href=\"https://gitlab."
9632"gnome.org/GNOME/gtkmm/tree/master/demos/gtk-demo/example_textview."
9633"cc\"><application>gtkmm</application>'s demo programs</link>."
4783msgstr ""9634msgstr ""
nn9635"Några <classname>TreeView</classname>-exempel visas här. Det finns mer "
9636"exempel i <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-"
9637"documentation/tree/master/examples/book/treeview/\">treeview-katalogen</"
9638"link> i <application>gtkmm-documentation</application>s exempel."
47849639
4785#. (itstool) path: chapter/title9640#. (itstool) path: chapter/title
4786#: C/index-in.docbook:39739641#: C/index-in.docbook:3973
4787msgid "Menus and Toolbars"9642msgid "Menus and Toolbars"
n4788msgstr ""n9643msgstr "Menyer och verktygsfält"
47899644
4790#. (itstool) path: chapter/para9645#. (itstool) path: chapter/para
4791#: C/index-in.docbook:39759646#: C/index-in.docbook:3975
n4792msgid "There are specific APIs for menus and toolbars, but you should usually den9647msgid ""
>al with them together, creating <classname>Gio::SimpleAction</classname>s that y 
>ou can refer to in both menus and toolbars. In this way you can handle activatio 
>n of the action instead of responding to the menu and toolbar items separately.  
>And you can enable or disable both the menu and toolbar item via the action. <cl 
>assname>Gtk::Builder</classname> can create menus and toolbars." 
9648"There are specific APIs for menus and toolbars, but you should usually deal "
9649"with them together, creating <classname>Gio::SimpleAction</classname>s that "
9650"you can refer to in both menus and toolbars. In this way you can handle "
9651"activation of the action instead of responding to the menu and toolbar items "
9652"separately. And you can enable or disable both the menu and toolbar item via "
9653"the action. <classname>Gtk::Builder</classname> can create menus and "
9654"toolbars."
4793msgstr ""9655msgstr ""
nn9656"Det finns specifika API:er för menyer och verktygsfält, men du bör vanligen "
9657"hantera dem tillsammans genom att skapa <classname>Gio::SimpleAction</"
9658"classname>-åtgärder som du kan hänvisa till både i menyer och verktygsfält. "
9659"På detta sätt kan du hantera aktivering av åtgärden i stället för att svara "
9660"på menyns och verktygsfältets objekt separat. Och du kan aktivera eller "
9661"inaktivera både menyns och verktygsfältets objekt via åtgärden. "
9662"<classname>Gtk::Builder</classname> kan skapa menyer och verktygsfält."
47949663
4795#. (itstool) path: chapter/para9664#. (itstool) path: chapter/para
4796#: C/index-in.docbook:39839665#: C/index-in.docbook:3983
n4797msgid "This involves the use of the <classname>Gio::SimpleActionGroup</classnamen9666msgid ""
>>, <classname>Gio::SimpleAction</classname> and <classname>Gtk::Builder</classna 
>me> classes, all of which should be instantiated via their <methodname>create()< 
>/methodname> methods, which return <classname>RefPtr</classname>s." 
9667"This involves the use of the <classname>Gio::SimpleActionGroup</classname>, "
9668"<classname>Gio::SimpleAction</classname> and <classname>Gtk::Builder</"
9669"classname> classes, all of which should be instantiated via their "
9670"<methodname>create()</methodname> methods, which return <classname>RefPtr</"
9671"classname>s."
4798msgstr ""9672msgstr ""
nn9673"Detta involverar användningen av klasserna <classname>Gio::"
9674"SimpleActionGroup</classname>, <classname>Gio::SimpleAction</classname> och "
9675"<classname>Gtk::Builder</classname>, vilka alla ska instansieras via sina "
9676"<methodname>create()</methodname>-metoder, vilka returnerar "
9677"<classname>RefPtr</classname>-pekare."
47999678
4800#. (itstool) path: section/title9679#. (itstool) path: section/title
4801#: C/index-in.docbook:39919680#: C/index-in.docbook:3991
4802msgid "Actions"9681msgid "Actions"
n4803msgstr ""n9682msgstr "Åtgärder"
48049683
4805#. (itstool) path: section/para9684#. (itstool) path: section/para
4806#: C/index-in.docbook:39939685#: C/index-in.docbook:3993
n4807msgid "First create the <classname>Gio::SimpleAction</classname>s and add them tn9686msgid ""
>o a <classname>Gio::SimpleActionGroup</classname>, with <methodname>Gio::ActionM 
>ap::add_action()</methodname>. (<classname>Gio::ActionMap</classname> is a base  
>class of <classname>Gio::SimpleActionGroup</classname>.) Then add the action gro 
>up to your window with <methodname>Gtk::Widget::insert_action_group()</methodnam 
>e>." 
9687"First create the <classname>Gio::SimpleAction</classname>s and add them to a "
9688"<classname>Gio::SimpleActionGroup</classname>, with <methodname>Gio::"
9689"ActionMap::add_action()</methodname>. (<classname>Gio::ActionMap</classname> "
9690"is a base class of <classname>Gio::SimpleActionGroup</classname>.) Then add "
9691"the action group to your window with <methodname>Gtk::Widget::"
9692"insert_action_group()</methodname>."
4808msgstr ""9693msgstr ""
nn9694"Skapa först <classname>Gio::SimpleAction</classname>-åtgärder och lägg till "
9695"dem till en <classname>Gio::SimpleActionGroup</classname> med "
9696"<methodname>Gio::ActionMap::add_action()</methodname>. (<classname>Gio::"
9697"ActionMap</classname> är en basklass för <classname>Gio::SimpleActionGroup</"
9698"classname>.) Lägg sedan till åtgärdsgruppen till ditt fönster med "
9699"<methodname>Gtk::Widget::insert_action_group()</methodname>."
48099700
4810#. (itstool) path: section/para9701#. (itstool) path: section/para
4811#: C/index-in.docbook:40019702#: C/index-in.docbook:4001
n4812msgid "The arguments to <methodname>add_action()</methodname> specify the actionn9703msgid ""
>'s name, which is used in the menu items and toolbar buttons. You can also speci 
>fy a signal handler when calling <methodname>add_action()</methodname>. This sig 
>nal handler will be called when the action is activated via either a menu item o 
>r a toolbar button." 
9704"The arguments to <methodname>add_action()</methodname> specify the action's "
9705"name, which is used in the menu items and toolbar buttons. You can also "
9706"specify a signal handler when calling <methodname>add_action()</methodname>. "
9707"This signal handler will be called when the action is activated via either a "
9708"menu item or a toolbar button."
4813msgstr ""9709msgstr ""
nn9710"Argumenten till <methodname>add_action()</methodname> anger åtgärdens namn, "
9711"vilket används i menyobjekten och verktygsfältsknapparna. Du kan också ange "
9712"en signalhanterare när du anropar <methodname>add_action()</methodname>. "
9713"Denna signalhanterare kommer anropas när åtgärden aktiveras antingen via ett "
9714"menyobjekt eller en verktygsfältsknapp."
48149715
4815#. (itstool) path: section/para9716#. (itstool) path: section/para
n4816#: C/index-in.docbook:4009n9717#: C/index-in.docbook:4009 C/index-in.docbook:4132
4817#: C/index-in.docbook:4132
4818msgid "For instance:"9718msgid "For instance:"
n4819msgstr ""n9719msgstr "Till exempel:"
48209720
4821#. (itstool) path: section/programlisting9721#. (itstool) path: section/programlisting
4822#: C/index-in.docbook:40119722#: C/index-in.docbook:4011
n4823#, no-wrapn9723#, fuzzy, no-wrap
4824msgid ""9724msgid ""
4825"<code>m_refActionGroup = Gio::SimpleActionGroup::create();\n"9725"<code>m_refActionGroup = Gio::SimpleActionGroup::create();\n"
4826"\n"9726"\n"
4827"m_refActionGroup-&gt;add_action(\"new\", sigc::mem_fun(*this, &amp;ExampleWindo9727"m_refActionGroup-&gt;add_action(\"new\", sigc::mem_fun(*this, &amp;ExampleWindo
>w::on_action_file_new));\n">w::on_action_file_new));\n"
4828"m_refActionGroup-&gt;add_action(\"open\", sigc::mem_fun(*this, &amp;ExampleWind9728"m_refActionGroup-&gt;add_action(\"open\", sigc::mem_fun(*this, &amp;ExampleWind
>ow::on_action_file_open));\n">ow::on_action_file_open));\n"
4829"m_refActionGroup-&gt;add_action(\"quit\", sigc::mem_fun(*this, &amp;ExampleWind9729"m_refActionGroup-&gt;add_action(\"quit\", sigc::mem_fun(*this, &amp;ExampleWind
>ow::on_action_file_quit));\n">ow::on_action_file_quit));\n"
4830"\n"9730"\n"
4831"insert_action_group(\"example\", m_refActionGroup);\n"9731"insert_action_group(\"example\", m_refActionGroup);\n"
4832"</code>"9732"</code>"
4833msgstr ""9733msgstr ""
nn9734"\n"
9735"m_refActionGroup = Gio::SimpleActionGroup::create();\n"
9736"\n"
9737"m_refActionGroup-&gt;add_action(\"new\", sigc::mem_fun(*this, &amp;ExampleWindo
 >w::on_action_file_new));\n"
9738"m_refActionGroup-&gt;add_action(\"open\", sigc::mem_fun(*this, &amp;ExampleWind
 >ow::on_action_file_open));\n"
9739"m_refActionGroup-&gt;add_action(\"quit\", sigc::mem_fun(*this, &amp;ExampleWind
 >ow::on_action_file_quit));\n"
9740"\n"
9741"insert_action_group(\"example\", m_refActionGroup);\n"
48349742
4835#. (itstool) path: section/para9743#. (itstool) path: section/para
4836#: C/index-in.docbook:40209744#: C/index-in.docbook:4020
n4837msgid "If you use an <classname>Gtk::ApplicationWindow</classname>, you don't han9745msgid ""
>ve to create your own action group. <classname>Gio::ActionGroup</classname> and  
><classname>Gio::ActionMap</classname> are base classes of <classname>Gtk::Applic 
>ationWindow</classname>." 
9746"If you use an <classname>Gtk::ApplicationWindow</classname>, you don't have "
9747"to create your own action group. <classname>Gio::ActionGroup</classname> and "
9748"<classname>Gio::ActionMap</classname> are base classes of <classname>Gtk::"
9749"ApplicationWindow</classname>."
4838msgstr ""9750msgstr ""
nn9751"Om du använder ett <classname>Gtk::ApplicationWindow</classname> behöver du "
9752"inte skapa din egen åtgärdsgrupp. <classname>Gio::ActionGroup</classname> "
9753"och <classname>Gio::ActionMap</classname> är basklasser för <classname>Gtk::"
9754"ApplicationWindow</classname>."
48399755
4840#. (itstool) path: section/title9756#. (itstool) path: section/title
4841#: C/index-in.docbook:40319757#: C/index-in.docbook:4031
4842msgid "Menubar and Toolbar"9758msgid "Menubar and Toolbar"
n4843msgstr ""n9759msgstr "Menyrad och verktygsfält"
48449760
4845#. (itstool) path: section/para9761#. (itstool) path: section/para
4846#: C/index-in.docbook:40339762#: C/index-in.docbook:4033
n4847msgid "Next you should create a <classname>Gtk::Builder</classname>. At this poin9763msgid ""
>nt is also a good idea to tell the application to respond to keyboard shortcuts, 
> by using <methodname>Gtk::Application::set_accel_for_action()</methodname>." 
9764"Next you should create a <classname>Gtk::Builder</classname>. At this point "
9765"is also a good idea to tell the application to respond to keyboard "
9766"shortcuts, by using <methodname>Gtk::Application::set_accel_for_action()</"
9767"methodname>."
4848msgstr ""9768msgstr ""
nn9769"Härnäst ska du skapa en <classname>Gtk::Builder</classname>. Vid detta "
9770"tillfälle är det också en bra idé att säga till programmet att svara på "
9771"tangentbordsgenvägar genom att använda <methodname>Gtk::Application::"
9772"set_accel_for_action()</methodname>."
48499773
4850#. (itstool) path: section/para9774#. (itstool) path: section/para
n4851#: C/index-in.docbook:4039n9775#: C/index-in.docbook:4039 C/index-in.docbook:5751 C/index-in.docbook:5815
4852#: C/index-in.docbook:5751
4853#: C/index-in.docbook:5815
4854#: C/index-in.docbook:114919776#: C/index-in.docbook:11491
4855msgid "For instance,"9777msgid "For instance,"
n4856msgstr ""n9778msgstr "Till exempel,"
48579779
4858#. (itstool) path: section/programlisting9780#. (itstool) path: section/programlisting
4859#: C/index-in.docbook:40419781#: C/index-in.docbook:4041
n4860#, no-wrapn9782#, fuzzy, no-wrap
4861msgid ""9783msgid ""
4862"<code>m_refBuilder = Gtk::Builder::create();\n"9784"<code>m_refBuilder = Gtk::Builder::create();\n"
4863"\n"9785"\n"
4864"app-&gt;set_accel_for_action(\"example.new\", \"&lt;Primary&gt;n\");\n"9786"app-&gt;set_accel_for_action(\"example.new\", \"&lt;Primary&gt;n\");\n"
4865"app-&gt;set_accel_for_action(\"example.quit\", \"&lt;Primary&gt;q\");\n"9787"app-&gt;set_accel_for_action(\"example.quit\", \"&lt;Primary&gt;q\");\n"
4866"app-&gt;set_accel_for_action(\"example.copy\", \"&lt;Primary&gt;c\");\n"9788"app-&gt;set_accel_for_action(\"example.copy\", \"&lt;Primary&gt;c\");\n"
4867"app-&gt;set_accel_for_action(\"example.paste\", \"&lt;Primary&gt;v\");\n"9789"app-&gt;set_accel_for_action(\"example.paste\", \"&lt;Primary&gt;v\");\n"
4868"</code>"9790"</code>"
4869msgstr ""9791msgstr ""
nn9792"\n"
9793"m_refBuilder = Gtk::Builder::create();\n"
9794"\n"
9795"app-&gt;set_accel_for_action(\"example.new\", \"&lt;Primary&gt;n\");\n"
9796"app-&gt;set_accel_for_action(\"example.quit\", \"&lt;Primary&gt;q\");\n"
9797"app-&gt;set_accel_for_action(\"example.copy\", \"&lt;Primary&gt;c\");\n"
9798"app-&gt;set_accel_for_action(\"example.paste\", \"&lt;Primary&gt;v\");\n"
48709799
4871#. (itstool) path: section/para9800#. (itstool) path: section/para
4872#: C/index-in.docbook:40599801#: C/index-in.docbook:4059
n4873msgid "Then, you can define the actual visible layout of the menus and toolbars,n9802#, fuzzy
> and add the UI layout to the <classname>Builder</classname>. This \"ui string\" 
> uses an XML format, in which you should mention the names of the actions that y 
>ou have already created. For instance:" 
9803msgid ""
9804"Then, you can define the actual visible layout of the menus and toolbars, "
9805"and add the UI layout to the <classname>Builder</classname>. This \"ui "
9806"string\" uses an XML format, in which you should mention the names of the "
9807"actions that you have already created. For instance:"
4874msgstr ""9808msgstr ""
nn9809"Sedan kan du definiera den faktiska synliga layouten för menyerna och "
9810"verktygsfälten, och lägga till UI-layouten till vår <classname>Builder</"
9811"classname>. Denna ”ui-sträng” använder ett XML-format, i vilket du ska nämna "
9812"namnet på åtgärderna som du redan skapat. Till exempel:"
48759813
4876#. (itstool) path: section/programlisting9814#. (itstool) path: section/programlisting
4877#: C/index-in.docbook:40659815#: C/index-in.docbook:4065
n4878#, no-wrapn9816#, fuzzy, no-wrap
4879msgid ""9817msgid ""
4880"<code>Glib::ustring ui_info =\n"9818"<code>Glib::ustring ui_info =\n"
4881"  \"&lt;interface&gt;\"\n"9819"  \"&lt;interface&gt;\"\n"
4882"  \"  &lt;menu id='menubar'&gt;\"\n"9820"  \"  &lt;menu id='menubar'&gt;\"\n"
4883"  \"    &lt;submenu&gt;\"\n"9821"  \"    &lt;submenu&gt;\"\n"
4911"\n"9849"\n"
4912"m_refBuilder-&gt;add_from_string(ui_info);\n"9850"m_refBuilder-&gt;add_from_string(ui_info);\n"
4913"m_refBuilder-&gt;add_from_resource(\"/toolbar/toolbar.ui\");\n"9851"m_refBuilder-&gt;add_from_resource(\"/toolbar/toolbar.ui\");\n"
4914"</code>"9852"</code>"
4915msgstr ""9853msgstr ""
nn9854"\n"
9855"Glib::ustring ui_info =\n"
9856"  \"&lt;interface&gt;\"\n"
9857"  \"  &lt;menu id='menubar'&gt;\"\n"
9858"  \"    &lt;submenu&gt;\"\n"
9859"  \"      &lt;attribute name='label' translatable='yes'&gt;_File&lt;/attribute&
 >gt;\"\n"
9860"  \"      &lt;section&gt;\"\n"
9861"  \"        &lt;item&gt;\"\n"
9862"  \"          &lt;attribute name='label' translatable='yes'&gt;_New&lt;/attribu
 >te&gt;\"\n"
9863"  \"          &lt;attribute name='action'&gt;example.new&lt;/attribute&gt;\"\n"
9864"  \"        &lt;/item&gt;\"\n"
9865"  \"      &lt;/section&gt;\"\n"
9866"  \"      &lt;section&gt;\"\n"
9867"  \"        &lt;item&gt;\"\n"
9868"  \"          &lt;attribute name='label' translatable='yes'&gt;_Quit&lt;/attrib
 >ute&gt;\"\n"
9869"  \"          &lt;attribute name='action'&gt;example.quit&lt;/attribute&gt;\"\n
 >"
9870"  \"        &lt;/item&gt;\"\n"
9871"  \"      &lt;/section&gt;\"\n"
9872"  \"    &lt;/submenu&gt;\"\n"
9873"  \"    &lt;submenu&gt;\"\n"
9874"  \"      &lt;attribute name='label' translatable='yes'&gt;_Edit&lt;/attribute&
 >gt;\"\n"
9875"  \"      &lt;item&gt;\"\n"
9876"  \"        &lt;attribute name='label' translatable='yes'&gt;_Copy&lt;/attribut
 >e&gt;\"\n"
9877"  \"        &lt;attribute name='action'&gt;example.copy&lt;/attribute&gt;\"\n"
9878"  \"      &lt;/item&gt;\"\n"
9879"  \"      &lt;item&gt;\"\n"
9880"  \"        &lt;attribute name='label' translatable='yes'&gt;_Paste&lt;/attribu
 >te&gt;\"\n"
9881"  \"        &lt;attribute name='action'&gt;example.paste&lt;/attribute&gt;\"\n"
9882"  \"      &lt;/item&gt;\"\n"
9883"  \"    &lt;/submenu&gt;\"\n"
9884"  \"  &lt;/menu&gt;\"\n"
9885"  \"&lt;/interface&gt;\";\n"
9886"\n"
9887"m_refBuilder-&gt;add_from_string(ui_info);\n"
9888"m_refBuilder-&gt;add_from_resource(\"/toolbar/toolbar.glade\");\n"
49169889
4917#. (itstool) path: section/para9890#. (itstool) path: section/para
4918#: C/index-in.docbook:41019891#: C/index-in.docbook:4101
n4919msgid "This is where we specify the names of the menu items as they will be seenn9892msgid ""
> by users in the menu. Therefore, this is where you should make strings translat 
>able, by adding <literal>translatable='yes'</literal>." 
9893"This is where we specify the names of the menu items as they will be seen by "
9894"users in the menu. Therefore, this is where you should make strings "
9895"translatable, by adding <literal>translatable='yes'</literal>."
4920msgstr ""9896msgstr ""
nn9897"Här anger vi namnen för menyobjekten som de kommer ses av användare i menyn. "
9898"Det är därför här som du ska göra strängar översättbara genom att lägga till "
9899"<literal>translatable='yes'</literal>."
49219900
4922#. (itstool) path: section/para9901#. (itstool) path: section/para
4923#: C/index-in.docbook:41059902#: C/index-in.docbook:4105
n4924msgid "To instantiate a <classname>Gtk::PopoverMenuBar</classname> and toolbar (n9903#, fuzzy
>a horizontal <classname>Gtk::Box</classname>) which you can actually show, you s 
>hould use the <methodname>Builder::get_object()</methodname> and <methodname>Bui 
>lder::get_widget()</methodname> methods, and then add the widgets to a container 
>. For instance:" 
9904msgid ""
9905"To instantiate a <classname>Gtk::PopoverMenuBar</classname> and toolbar (a "
9906"horizontal <classname>Gtk::Box</classname>) which you can actually show, you "
9907"should use the <methodname>Builder::get_object()</methodname> and "
9908"<methodname>Builder::get_widget()</methodname> methods, and then add the "
9909"widgets to a container. For instance:"
4925msgstr ""9910msgstr ""
nn9911"För att instansiera en <classname>Gtk::PopoverMenuBar</classname> och "
9912"verktygsfält (en horisontell <classname>Gtk::Box</classname>) som du "
9913"faktiskt kan visa, bör du använda metoderna <methodname>Builder::"
9914"get_object()</methodname> och <methodname>Builder::get_widget()</"
9915"methodname>, och sedan lägga till komponenterna till en behållare. Till "
9916"exempel:"
49269917
4927#. (itstool) path: section/programlisting9918#. (itstool) path: section/programlisting
4928#: C/index-in.docbook:41129919#: C/index-in.docbook:4112
n4929#, no-wrapn9920#, fuzzy, no-wrap
4930msgid ""9921msgid ""
4931"<code>auto gmenu = m_refBuilder-&gt;get_object&lt;Gio::Menu&gt;(\"menubar\");\n9922"<code>auto gmenu = m_refBuilder-&gt;get_object&lt;Gio::Menu&gt;(\"menubar\");\n
>">"
4932"auto pMenuBar = Gtk::make_managed&lt;Gtk::PopoverMenuBar&gt;(gmenu);\n"9923"auto pMenuBar = Gtk::make_managed&lt;Gtk::PopoverMenuBar&gt;(gmenu);\n"
4933"m_Box.append(*pMenuBar);\n"9924"m_Box.append(*pMenuBar);\n"
4934"\n"9925"\n"
4935"auto toolbar = m_refBuilder-&gt;get_widget&lt;Gtk::Box&gt;(\"toolbar\");\n"9926"auto toolbar = m_refBuilder-&gt;get_widget&lt;Gtk::Box&gt;(\"toolbar\");\n"
4936"m_Box.append(*toolbar);\n"9927"m_Box.append(*toolbar);\n"
4937"</code>"9928"</code>"
4938msgstr ""9929msgstr ""
nn9930"\n"
9931"auto gmenu = m_refBuilder-&gt;get_object&lt;Gio::Menu&gt;(\"menubar\");\n"
9932"auto pMenuBar = Gtk::make_managed&lt;Gtk::PopoverMenuBar&gt;(gmenu);\n"
9933"m_Box.append(*pMenuBar);\n"
9934"\n"
9935"auto toolbar = m_refBuilder-&gt;get_widget&lt;Gtk::Box&gt;(\"toolbar\");\n"
9936"m_Box.append(*toolbar);\n"
49399937
4940#. (itstool) path: section/title9938#. (itstool) path: section/title
4941#: C/index-in.docbook:41249939#: C/index-in.docbook:4124
4942msgid "Popup Menus"9940msgid "Popup Menus"
n4943msgstr ""n9941msgstr "Poppuppmenyer"
49449942
4945#. (itstool) path: section/para9943#. (itstool) path: section/para
4946#: C/index-in.docbook:41259944#: C/index-in.docbook:4125
n4947msgid "<classname>Menu</classname>s are normally just added to a window, but then9945#, fuzzy
>y can also be displayed temporarily as the result of a mouse button click. For i 
>nstance, a context menu might be displayed when the user clicks their right mous 
>e button." 
9946msgid ""
9947"<classname>Menu</classname>s are normally just added to a window, but they "
9948"can also be displayed temporarily as the result of a mouse button click. For "
9949"instance, a context menu might be displayed when the user clicks their right "
9950"mouse button."
4948msgstr ""9951msgstr ""
nn9952"<classname>Menu</classname> läggs vanligen bara till i ett fönster, men de "
9953"kan också visas tillfälligt som resultatet av ett musklick. En snabbvalsmeny "
9954"kan exempelvis visas när användaren klickar på höger musknapp."
49499955
4950#. (itstool) path: section/programlisting9956#. (itstool) path: section/programlisting
4951#: C/index-in.docbook:41349957#: C/index-in.docbook:4134
n4952#, no-wrapn9958#, fuzzy, no-wrap
4953msgid ""9959msgid ""
4954"<code>Glib::ustring ui_info =\n"9960"<code>Glib::ustring ui_info =\n"
4955"  \"&lt;interface&gt;\"\n"9961"  \"&lt;interface&gt;\"\n"
4956"  \"  &lt;menu id='menu-examplepopup'&gt;\"\n"9962"  \"  &lt;menu id='menu-examplepopup'&gt;\"\n"
4957"  \"    &lt;section&gt;\"\n"9963"  \"    &lt;section&gt;\"\n"
4975"\n"9981"\n"
4976"auto gmenu = m_refBuilder-&gt;get_object&lt;Gio::Menu&gt;(\"menu-examplepopup\"9982"auto gmenu = m_refBuilder-&gt;get_object&lt;Gio::Menu&gt;(\"menu-examplepopup\"
>);\n">);\n"
4977"m_MenuPopup.set_menu_model(gmenu);\n"9983"m_MenuPopup.set_menu_model(gmenu);\n"
4978"</code>"9984"</code>"
4979msgstr ""9985msgstr ""
nn9986"\n"
9987"Glib::ustring ui_info =\n"
9988"  \"&lt;interface&gt;\"\n"
9989"  \"  &lt;menu id='menu-examplepopup'&gt;\"\n"
9990"  \"    &lt;section&gt;\"\n"
9991"  \"      &lt;item&gt;\"\n"
9992"  \"        &lt;attribute name='label' translatable='yes'&gt;Edit&lt;/attribute
 >&gt;\"\n"
9993"  \"        &lt;attribute name='action'&gt;examplepopup.edit&lt;/attribute&gt;\
 >"\n"
9994"  \"      &lt;/item&gt;\"\n"
9995"  \"      &lt;item&gt;\"\n"
9996"  \"        &lt;attribute name='label' translatable='yes'&gt;Process&lt;/attrib
 >ute&gt;\"\n"
9997"  \"        &lt;attribute name='action'&gt;examplepopup.process&lt;/attribute&g
 >t;\"\n"
9998"  \"      &lt;/item&gt;\"\n"
9999"  \"      &lt;item&gt;\"\n"
10000"  \"        &lt;attribute name='label' translatable='yes'&gt;Remove&lt;/attribu
 >te&gt;\"\n"
10001"  \"        &lt;attribute name='action'&gt;examplepopup.remove&lt;/attribute&gt
 >;\"\n"
10002"  \"      &lt;/item&gt;\"\n"
10003"  \"    &lt;/section&gt;\"\n"
10004"  \"  &lt;/menu&gt;\"\n"
10005"  \"&lt;/interface&gt;\";\n"
10006"\n"
10007"m_refBuilder-&gt;add_from_string(ui_info);\n"
10008"\n"
10009"auto gmenu = m_refBuilder-&gt;get_object&lt;Gio::Menu&gt;(\"menu-examplepopup\"
 >);\n"
10010"m_MenuPopup.set_menu_model(gmenu);\n"
498010011
4981#. (itstool) path: section/para10012#. (itstool) path: section/para
4982#: C/index-in.docbook:416010013#: C/index-in.docbook:4160
n4983msgid "To show the popup menu, use a <classname>Gtk::GestureClick</classname> ann10014#, fuzzy
>d connect to its <literal>pressed</literal> signal. In the signal handler, use < 
>classname>Gtk::PopoverMenu</classname>'s <methodname>popup()</methodname> method 
>. For instance:" 
10015#| msgid ""
10016#| "To show the popup menu, use a <classname>Gtk::EventControllerClick</"
10017#| "classname> and connect to its <literal>pressed</literal> signal. In the "
10018#| "signal handler, use <classname>Gtk::PopoverMenu</classname>'s "
10019#| "<methodname>popup()</methodname> method. For instance:"
10020msgid ""
10021"To show the popup menu, use a <classname>Gtk::GestureClick</classname> and "
10022"connect to its <literal>pressed</literal> signal. In the signal handler, use "
10023"<classname>Gtk::PopoverMenu</classname>'s <methodname>popup()</methodname> "
10024"method. For instance:"
4984msgstr ""10025msgstr ""
nn10026"Använd för att visa poppuppmenyn en <classname>Gtk::EventControllerClick</"
10027"classname> och anslut till dess <literal>pressed</literal>-signal. Använd i "
10028"signalhanteraren <classname>Gtk::PopoverMenu</classname>s "
10029"<methodname>popup()</methodname>-metod. Till exempel:"
498510030
4986#. (itstool) path: section/programlisting10031#. (itstool) path: section/programlisting
4987#: C/index-in.docbook:416610032#: C/index-in.docbook:4166
n4988#, no-wrapn10033#, fuzzy, no-wrap
10034#| msgid ""
10035#| "\n"
10036#| "void ExampleWindow::on_label_pressed(int /* n_press */, double x, double y)\
 >n"
10037#| "{\n"
10038#| "  const Gdk::Rectangle rect(x, y, 1, 1);\n"
10039#| "  m_MenuPopup.set_pointing_to(rect);\n"
10040#| "  m_MenuPopup.popup();\n"
10041#| "}"
4989msgid ""10042msgid ""
4990"<code>void ExampleWindow::on_label_pressed(int /* n_press */, double x, double 10043"<code>void ExampleWindow::on_label_pressed(int /* n_press */, double x, double 
>y)\n">y)\n"
4991"{\n"10044"{\n"
4992"  const Gdk::Rectangle rect(x, y, 1, 1);\n"10045"  const Gdk::Rectangle rect(x, y, 1, 1);\n"
4993"  m_MenuPopup.set_pointing_to(rect);\n"10046"  m_MenuPopup.set_pointing_to(rect);\n"
4994"  m_MenuPopup.popup();\n"10047"  m_MenuPopup.popup();\n"
4995"}</code>"10048"}</code>"
4996msgstr ""10049msgstr ""
nn10050"\n"
10051"void ExampleWindow::on_label_pressed(int /* n_press */, double x, double y)\n"
10052"{\n"
10053"  const Gdk::Rectangle rect(x, y, 1, 1);\n"
10054"  m_MenuPopup.set_pointing_to(rect);\n"
10055"  m_MenuPopup.popup();\n"
10056"}"
499710057
4998#. (itstool) path: section/title10058#. (itstool) path: section/title
4999#: C/index-in.docbook:417610059#: C/index-in.docbook:4176
5000msgid "Gio::Resource and glib-compile-resources"10060msgid "Gio::Resource and glib-compile-resources"
n5001msgstr ""n10061msgstr "Gio::Resource och glib-compile-resources"
500210062
5003#. (itstool) path: section/para10063#. (itstool) path: section/para
5004#: C/index-in.docbook:417810064#: C/index-in.docbook:4178
n5005msgid "Applications and libraries often contain binary or textual data that is rn10065#, fuzzy
>eally part of the application, rather than user data. For instance <classname>Gt 
>k::Builder</classname> <filename class=\"extension\">.ui</filename> files, splas 
>hscreen images, <classname>Gio::Menu</classname> markup xml, CSS files, icons, e 
>tc. These are often shipped as files in <filename class=\"directory\">$datadir/a 
>ppname</filename>, or manually included as literal strings in the code." 
10066msgid ""
10067"Applications and libraries often contain binary or textual data that is "
10068"really part of the application, rather than user data. For instance "
10069"<classname>Gtk::Builder</classname> <filename class=\"extension\">.ui</"
10070"filename> files, splashscreen images, <classname>Gio::Menu</classname> "
10071"markup xml, CSS files, icons, etc. These are often shipped as files in "
10072"<filename class=\"directory\">$datadir/appname</filename>, or manually "
10073"included as literal strings in the code."
5006msgstr ""10074msgstr ""
nn10075"Program och bibliotek innehåller ofta binär- och textdata som egentligen hör "
10076"till programmet snarare än användardata. Exempelvis <classname>Gtk::Builder</"
10077"classname>s <filename class=\"extension\">.glade</filename>-filer, "
10078"uppstartsbilder, <classname>Gio::Menu</classname>s markup-xml, CSS-filer, "
10079"ikoner o.s.v. Dessa levereras ofta som filer i <filename "
10080"class=\"directory\">$datadir/appname</filename>, eller inkluderas manuellt "
10081"som uttryckliga strängar i koden."
500710082
5008#. (itstool) path: section/para10083#. (itstool) path: section/para
5009#: C/index-in.docbook:418610084#: C/index-in.docbook:4186
n5010msgid "The <classname>Gio::Resource</classname> API and the <application>glib-con10085#, fuzzy
>mpile-resources</application> program provide a convenient and efficient alterna 
>tive to this, which has some nice properties. You maintain the files as normal f 
>iles, so it's easy to edit them, but during the build the files are combined int 
>o a binary bundle that is linked into the executable. This means that loading th 
>e resource files is efficient (as they are already in memory, shared with other  
>instances) and simple (no need to check for things like I/O errors or locate the 
> files in the filesystem). It also makes it easier to create relocatable applica 
>tions." 
10086msgid ""
10087"The <classname>Gio::Resource</classname> API and the <application>glib-"
10088"compile-resources</application> program provide a convenient and efficient "
10089"alternative to this, which has some nice properties. You maintain the files "
10090"as normal files, so it's easy to edit them, but during the build the files "
10091"are combined into a binary bundle that is linked into the executable. This "
10092"means that loading the resource files is efficient (as they are already in "
10093"memory, shared with other instances) and simple (no need to check for things "
10094"like I/O errors or locate the files in the filesystem). It also makes it "
10095"easier to create relocatable applications."
5011msgstr ""10096msgstr ""
nn10097"<classname>Gio::Resource</classname>-API:t och programmet <application>glib-"
10098"compile-resources</application> tillhandahåller ett bekvämt och effektivt "
10099"alternativ till detta, vilket har några trevliga egenskaper. Du underhåller "
10100"filerna som vanliga filer, så det är lätt att redigera dem, men under bygget "
10101"komponeras filerna till en binär bunt som länkas till den exekverbara filen. "
10102"Det här betyder att inläsning av resursfilerna är effektiv (då de redan "
10103"finns i minnet, delade med andra instanser) och enkelt (inget behov av att "
10104"kontrollera saker som I/O-fel eller hitta filerna i filsystemet). Det gör "
10105"det också lättare att skapa flyttbara program."
501210106
5013#. (itstool) path: section/para10107#. (itstool) path: section/para
5014#: C/index-in.docbook:419810108#: C/index-in.docbook:4198
n5015msgid "Resource bundles are created by the <application>glib-compile-resources</n10109#, fuzzy
>application> program which takes an xml file that describes the bundle, and a se 
>t of files that the xml references. These are combined into a binary resource bu 
>ndle." 
10110#| msgid ""
10111#| "Resource bundles are created by the <link xlink:href=\"https://developer-"
10112#| "old.gnome.org/gio/stable/glib-compile-resources.html\">glib-compile-"
10113#| "resources</link> program which takes an xml file that describes the "
10114#| "bundle, and a set of files that the xml references. These are combined "
10115#| "into a binary resource bundle."
10116msgid ""
10117"Resource bundles are created by the <application>glib-compile-resources</"
10118"application> program which takes an xml file that describes the bundle, and "
10119"a set of files that the xml references. These are combined into a binary "
10120"resource bundle."
5016msgstr ""10121msgstr ""
nn10122"Resursbuntar skapas av programmet <link xlink:href=\"https://developer-old."
10123"gnome.org/gio/stable/glib-compile-resources.html\">glib-compile-resources</"
10124"link> som tar en xml-fil som beskriver bunten, och en uppsättning filer som "
10125"xml-filen refererar till. Dessa kombineras till en binär resursbunt."
501710126
5018#. (itstool) path: section/para10127#. (itstool) path: section/para
5019#: C/index-in.docbook:420310128#: C/index-in.docbook:4203
n5020msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/classGio_1n10129msgid ""
>_1Resource.html\">Gio::Resource Reference</link>" 
10130"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
10131"classGio_1_1Resource.html\">Gio::Resource Reference</link>"
5021msgstr ""10132msgstr ""
nn10133"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
10134"classGio_1_1Resource.html\">Referens för Gio::Resource</link>"
502210135
5023#. (itstool) path: section/para10136#. (itstool) path: section/para
5024#: C/index-in.docbook:420410137#: C/index-in.docbook:4204
nn10138#, fuzzy
10139#| msgid "For example:"
5025msgid "An example:"10140msgid "An example:"
n5026msgstr ""n10141msgstr "Till exempel:"
502710142
5028#. (itstool) path: section/programlisting10143#. (itstool) path: section/programlisting
5029#: C/index-in.docbook:420510144#: C/index-in.docbook:4205
n5030#, no-wrapn10145#, fuzzy, no-wrap
5031msgid ""10146msgid ""
5032"<code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"10147"<code>&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
5033"&lt;gresources&gt;\n"10148"&lt;gresources&gt;\n"
5034"  &lt;gresource prefix=\"/toolbar\"&gt;\n"10149"  &lt;gresource prefix=\"/toolbar\"&gt;\n"
5035"    &lt;file preprocess=\"xml-stripblanks\"&gt;toolbar.ui&lt;/file&gt;\n"10150"    &lt;file preprocess=\"xml-stripblanks\"&gt;toolbar.ui&lt;/file&gt;\n"
5036"    &lt;file&gt;rain.png&lt;/file&gt;\n"10151"    &lt;file&gt;rain.png&lt;/file&gt;\n"
5037"  &lt;/gresource&gt;\n"10152"  &lt;/gresource&gt;\n"
5038"&lt;/gresources&gt;\n"10153"&lt;/gresources&gt;\n"
5039"</code>"10154"</code>"
5040msgstr ""10155msgstr ""
nn10156"\n"
10157"&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n"
10158"&lt;gresources&gt;\n"
10159"  &lt;gresource prefix=\"/toolbar\"&gt;\n"
10160"    &lt;file preprocess=\"xml-stripblanks\"&gt;toolbar.glade&lt;/file&gt;\n"
10161"    &lt;file&gt;rain.png&lt;/file&gt;\n"
10162"  &lt;/gresource&gt;\n"
10163"&lt;/gresources&gt;\n"
504110164
5042#. (itstool) path: listitem/para10165#. (itstool) path: listitem/para
5043#: C/index-in.docbook:421510166#: C/index-in.docbook:4215
nn10167#, fuzzy
10168#| msgid "<filename>/toolbar/toolbar.glade</filename>"
5044msgid "<filename>/toolbar/toolbar.ui</filename>"10169msgid "<filename>/toolbar/toolbar.ui</filename>"
n5045msgstr ""n10170msgstr "<filename>/toolbar/toolbar.glade</filename>"
504610171
5047#. (itstool) path: listitem/para10172#. (itstool) path: listitem/para
5048#: C/index-in.docbook:421610173#: C/index-in.docbook:4216
5049msgid "<filename>/toolbar/rain.png</filename>"10174msgid "<filename>/toolbar/rain.png</filename>"
n5050msgstr ""n10175msgstr "<filename>/toolbar/rain.png</filename>"
505110176
5052#. (itstool) path: section/para10177#. (itstool) path: section/para
5053#: C/index-in.docbook:421310178#: C/index-in.docbook:4213
nn10179#, fuzzy
10180#| msgid ""
10181#| "An example: <_:programlisting-1/> This will create a resource bundle with "
10182#| "the files <_:itemizedlist-2/>"
5054msgid "This will create a resource bundle with the files <_:itemizedlist-1/>"10183msgid "This will create a resource bundle with the files <_:itemizedlist-1/>"
5055msgstr ""10184msgstr ""
nn10185"Ett exempel: <_:programlisting-1/> Detta kommer skapa en resursbunt med "
10186"filerna <_:itemizedlist-2/>"
505610187
5057#. (itstool) path: para/screen10188#. (itstool) path: para/screen
5058#: C/index-in.docbook:422410189#: C/index-in.docbook:4224
5059#, no-wrap10190#, no-wrap
n5060msgid ""n
5061"$ glib-compile-resources --target=resources.c --generate-source toolbar.gresour10191msgid "$ glib-compile-resources --target=resources.c --generate-source toolbar.g
>ce.xml">resource.xml"
5062msgstr ""10192msgstr "$ glib-compile-resources --target=resources.c --generate-source toolbar.
 >gresource.xml"
506310193
5064#. (itstool) path: section/para10194#. (itstool) path: section/para
5065#: C/index-in.docbook:421910195#: C/index-in.docbook:4219
n5066msgid "You can then use <application>glib-compile-resources</application> to comn10196#, fuzzy
>pile the xml to a binary bundle that you can load with <methodname>Gio::Resource 
>::create_from_file()</methodname>. However, it's more common to use the <paramet 
>er class=\"command\">--generate-source</parameter> argument to create a C source 
> file to link directly into your application. E.g. <_:screen-1/>" 
10197msgid ""
10198"You can then use <application>glib-compile-resources</application> to "
10199"compile the xml to a binary bundle that you can load with <methodname>Gio::"
10200"Resource::create_from_file()</methodname>. However, it's more common to use "
10201"the <parameter class=\"command\">--generate-source</parameter> argument to "
10202"create a C source file to link directly into your application. E.g. <_:"
10203"screen-1/>"
5067msgstr ""10204msgstr ""
nn10205"Du kan sedan använda <application>glib-compile-resources</application> för "
10206"att kompilera xml-filen till en binär bunt som du kan läsa in med "
10207"<methodname>Gio::Resource::create_from_file()</methodname>. Det är dock "
10208"vanligare att använda argumentet <parameter class=\"command\">--generate-"
10209"source</parameter> för att skapa en C-källfil för att länka direkt till ditt "
10210"program. T.ex. <_:screen-1/>"
506810211
5069#. (itstool) path: section/para10212#. (itstool) path: section/para
5070#: C/index-in.docbook:422610213#: C/index-in.docbook:4226
n5071msgid "Once a <classname>Gio::Resource</classname> has been created and registern10214#, fuzzy
>ed all the data in it can be accessed globally in the process by using API calls 
> like <methodname>Gio::Resource::open_stream_from_global_resources()</methodname 
>> to stream the data or <methodname>Gio::Resource::lookup_data_in_global_resourc 
>es()</methodname> to get a direct pointer to the data. You can also use URIs lik 
>e <uri>resource:///toolbar/rain.png</uri> with <classname>Gio::File</classname>  
>to access the resource data." 
10215msgid ""
10216"Once a <classname>Gio::Resource</classname> has been created and registered "
10217"all the data in it can be accessed globally in the process by using API "
10218"calls like <methodname>Gio::Resource::open_stream_from_global_resources()</"
10219"methodname> to stream the data or <methodname>Gio::Resource::"
10220"lookup_data_in_global_resources()</methodname> to get a direct pointer to "
10221"the data. You can also use URIs like <uri>resource:///toolbar/rain.png</uri> "
10222"with <classname>Gio::File</classname> to access the resource data."
5072msgstr ""10223msgstr ""
nn10224"När en <classname>Gio::Resource</classname> har skapats och registrerats kan "
10225"alla data i den kommas åt globalt i processen genom att använda API-anrop "
10226"som <methodname>Gio::Resource::open_stream_from_global_resources()</"
10227"methodname> för att strömma data eller <methodname>Gio::Resource::"
10228"lookup_data_in_global_resources()</methodname> för att få en direkt pekare "
10229"till data. Du kan också använda URI:er som <uri>resource:///toolbar/rain."
10230"png</uri> med <classname>Gio::File</classname> för att komma åt resursdata."
507310231
5074#. (itstool) path: section/para10232#. (itstool) path: section/para
5075#: C/index-in.docbook:423410233#: C/index-in.docbook:4234
n5076msgid "Often you don't need a <classname>Gio::Resource</classname> instance, becn10234msgid ""
>ause resource data can be loaded with methods such as <methodname>Gdk::Pixbuf::c 
>reate_from_resource()</methodname>, <methodname>Gtk::Builder::add_from_resource( 
>)</methodname> and <methodname>Gtk::Image::set_from_resource()</methodname>." 
10235"Often you don't need a <classname>Gio::Resource</classname> instance, "
10236"because resource data can be loaded with methods such as <methodname>Gdk::"
10237"Pixbuf::create_from_resource()</methodname>, <methodname>Gtk::Builder::"
10238"add_from_resource()</methodname> and <methodname>Gtk::Image::"
10239"set_from_resource()</methodname>."
5077msgstr ""10240msgstr ""
nn10241"Ofta behöver du ingen <classname>Gio::Resource</classname>-instans eftersom "
10242"resursdata kan läsas in med metoder som <methodname>Gdk::Pixbuf::"
10243"create_from_resource()</methodname>, <methodname>Gtk::Builder::"
10244"add_from_resource()</methodname> och <methodname>Gtk::Image::"
10245"set_from_resource()</methodname>."
507810246
5079#. (itstool) path: section/title10247#. (itstool) path: section/title
5080#: C/index-in.docbook:424810248#: C/index-in.docbook:4248
5081msgid "Application Menu and Main Menu example"10249msgid "Application Menu and Main Menu example"
n5082msgstr ""n10250msgstr "Exempel på programmeny och huvudmeny"
508310251
5084#. (itstool) path: section/para10252#. (itstool) path: section/para
5085#: C/index-in.docbook:424910253#: C/index-in.docbook:4249
n5086msgid "This program contains an application menu, a menubar and a toolbar. Classn10254msgid ""
>es are derived from <classname>Gtk::Application</classname> and <classname>Gtk:: 
>ApplicationWindow</classname>." 
10255"This program contains an application menu, a menubar and a toolbar. Classes "
10256"are derived from <classname>Gtk::Application</classname> and <classname>Gtk::"
10257"ApplicationWindow</classname>."
5087msgstr ""10258msgstr ""
nn10259"Detta program innehåller en programmeny, en menyrad och ett verktygsfält. "
10260"Klasser härleds från <classname>Gtk::Application</classname> och "
10261"<classname>Gtk::ApplicationWindow</classname>."
508810262
5089#. (itstool) path: figure/title10263#. (itstool) path: figure/title
5090#: C/index-in.docbook:425610264#: C/index-in.docbook:4256
5091msgid "App and Main Menu"10265msgid "App and Main Menu"
n5092msgstr ""n10266msgstr "Program- och huvudmeny"
509310267
5094#. (itstool) path: imageobject/imagedata10268#. (itstool) path: imageobject/imagedata
5095#. This is a reference to an external file such as an image or video. When10269#. This is a reference to an external file such as an image or video. When
5096#. the file changes, the md5 hash will change to let you know you need to10270#. the file changes, the md5 hash will change to let you know you need to
5097#. update your localized copy. The msgstr is not used at all. Set it to10271#. update your localized copy. The msgstr is not used at all. Set it to
5098#. whatever you like once you have updated your copy of the file.10272#. whatever you like once you have updated your copy of the file.
5099#: C/index-in.docbook:425810273#: C/index-in.docbook:4258
nn10274#, fuzzy
5100msgctxt "_"10275msgctxt "_"
nn10276msgid ""
5101msgid "external ref='figures/main_menu.png' md5='fc670c5887873c4c8ec1e5aa1e0326810277"external ref='figures/main_menu.png' md5='fc670c5887873c4c8ec1e5aa1e032680'"
>0'" 
5102msgstr ""10278msgstr ""
nn10279"external ref='figures/main_menu.png' md5='fc670c5887873c4c8ec1e5aa1e032680'"
510310280
5104#. (itstool) path: section/para10281#. (itstool) path: section/para
5105#: C/index-in.docbook:426210282#: C/index-in.docbook:4262
n5106msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren10283msgid ""
>e/master/examples/book/menus/main_menu/\">Source Code</link>" 
10284"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10285"master/examples/book/menus/main_menu/\">Source Code</link>"
5107msgstr ""10286msgstr ""
nn10287"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10288"master/examples/book/menus/main_menu/\">Källkod</link>"
510810289
5109#. (itstool) path: section/title10290#. (itstool) path: section/title
5110#: C/index-in.docbook:426710291#: C/index-in.docbook:4267
5111msgid "Main Menu example"10292msgid "Main Menu example"
n5112msgstr ""n10293msgstr "Exempel på huvudmeny"
511310294
5114#. (itstool) path: section/para10295#. (itstool) path: section/para
5115#: C/index-in.docbook:426810296#: C/index-in.docbook:4268
nn10297msgid ""
5116msgid "This program contains a menubar and a toolbar. A class is derived from <c10298"This program contains a menubar and a toolbar. A class is derived from "
>lassname>Gtk::Window</classname>." 
10299"<classname>Gtk::Window</classname>."
5117msgstr ""10300msgstr ""
nn10301"Detta program innehåller en menyrad och ett verktygsfält. En klass härleds "
10302"från <classname>Gtk::Window</classname>."
511810303
5119#. (itstool) path: figure/title10304#. (itstool) path: figure/title
5120#: C/index-in.docbook:427410305#: C/index-in.docbook:4274
5121msgid "Main Menu"10306msgid "Main Menu"
n5122msgstr ""n10307msgstr "Huvudmeny"
512310308
5124#. (itstool) path: imageobject/imagedata10309#. (itstool) path: imageobject/imagedata
5125#. This is a reference to an external file such as an image or video. When10310#. This is a reference to an external file such as an image or video. When
5126#. the file changes, the md5 hash will change to let you know you need to10311#. the file changes, the md5 hash will change to let you know you need to
5127#. update your localized copy. The msgstr is not used at all. Set it to10312#. update your localized copy. The msgstr is not used at all. Set it to
5128#. whatever you like once you have updated your copy of the file.10313#. whatever you like once you have updated your copy of the file.
5129#: C/index-in.docbook:427610314#: C/index-in.docbook:4276
nn10315#, fuzzy
5130msgctxt "_"10316msgctxt "_"
n5131msgid "external ref='figures/menus_and_toolbars.png' md5='cbe894e7603b7c3de488d4n10317msgid ""
>c9ff503442'" 
10318"external ref='figures/menus_and_toolbars.png' "
10319"md5='cbe894e7603b7c3de488d4c9ff503442'"
5132msgstr ""10320msgstr ""
nn10321"external ref='figures/menus_and_toolbars.png' "
10322"md5='cbe894e7603b7c3de488d4c9ff503442'"
513310323
5134#. (itstool) path: section/para10324#. (itstool) path: section/para
5135#: C/index-in.docbook:428010325#: C/index-in.docbook:4280
n5136msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren10326msgid ""
>e/master/examples/book/menus_and_toolbars\">Source Code</link>" 
10327"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10328"master/examples/book/menus_and_toolbars\">Source Code</link>"
5137msgstr ""10329msgstr ""
nn10330"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10331"master/examples/book/menus_and_toolbars\">Källkod</link>"
513810332
5139#. (itstool) path: section/title10333#. (itstool) path: section/title
5140#: C/index-in.docbook:428510334#: C/index-in.docbook:4285
5141msgid "Popup Menu example"10335msgid "Popup Menu example"
n5142msgstr ""n10336msgstr "Exempel på poppuppmeny"
514310337
5144#. (itstool) path: figure/title10338#. (itstool) path: figure/title
5145#: C/index-in.docbook:428810339#: C/index-in.docbook:4288
5146msgid "Popup Menu"10340msgid "Popup Menu"
n5147msgstr ""n10341msgstr "Poppuppmeny"
514810342
5149#. (itstool) path: imageobject/imagedata10343#. (itstool) path: imageobject/imagedata
5150#. This is a reference to an external file such as an image or video. When10344#. This is a reference to an external file such as an image or video. When
5151#. the file changes, the md5 hash will change to let you know you need to10345#. the file changes, the md5 hash will change to let you know you need to
5152#. update your localized copy. The msgstr is not used at all. Set it to10346#. update your localized copy. The msgstr is not used at all. Set it to
5153#. whatever you like once you have updated your copy of the file.10347#. whatever you like once you have updated your copy of the file.
5154#: C/index-in.docbook:429010348#: C/index-in.docbook:4290
nn10349#, fuzzy
5155msgctxt "_"10350msgctxt "_"
nn10351msgid ""
5156msgid "external ref='figures/menu_popup.png' md5='bd168ad48b89f488d29e13db9b765110352"external ref='figures/menu_popup.png' md5='bd168ad48b89f488d29e13db9b765168'"
>68'" 
5157msgstr ""10353msgstr ""
nn10354"external ref='figures/menu_popup.png' md5='bd168ad48b89f488d29e13db9b765168'"
515810355
5159#. (itstool) path: section/para10356#. (itstool) path: section/para
5160#: C/index-in.docbook:429410357#: C/index-in.docbook:4294
n5161msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren10358msgid ""
>e/master/examples/book/menus/popup/\">Source Code</link>" 
10359"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10360"master/examples/book/menus/popup/\">Source Code</link>"
5162msgstr ""10361msgstr ""
nn10362"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10363"master/examples/book/menus/popup/\">Källkod</link>"
516310364
5164#. (itstool) path: chapter/title10365#. (itstool) path: chapter/title
5165#: C/index-in.docbook:430110366#: C/index-in.docbook:4301
nn10367#, fuzzy
5166msgid "Adjustments"10368msgid "Adjustments"
n5167msgstr ""n10369msgstr "Justeringar"
516810370
5169#. (itstool) path: chapter/para10371#. (itstool) path: chapter/para
5170#: C/index-in.docbook:430310372#: C/index-in.docbook:4303
n5171msgid "<application>gtkmm</application> has various widgets that can be visuallyn10373#, fuzzy
> adjusted using the mouse or the keyboard, such as the <classname>Range</classna 
>me> widgets (described in the <link linkend=\"chapter-range-widgets\">Range Widg 
>ets</link> section). There are also a few widgets that display some adjustable p 
>art of a larger area, such as the <classname>Viewport</classname> widget. These  
>widgets have <classname>Gtk::Adjustment</classname> objects that express this co 
>mmon part of their API." 
10374msgid ""
10375"<application>gtkmm</application> has various widgets that can be visually "
10376"adjusted using the mouse or the keyboard, such as the <classname>Range</"
10377"classname> widgets (described in the <link linkend=\"chapter-range-"
10378"widgets\">Range Widgets</link> section). There are also a few widgets that "
10379"display some adjustable part of a larger area, such as the "
10380"<classname>Viewport</classname> widget. These widgets have <classname>Gtk::"
10381"Adjustment</classname> objects that express this common part of their API."
5172msgstr ""10382msgstr ""
nn10383"<application>gtkmm</application> har olika komponenter som kan visuellt "
10384"justeras med musen eller tangentbordet, som <classname>Range</classname>-"
10385"komponenterna (beskrivna i avsnittet <link linkend=\"chapter-range-"
10386"widgets\">Range-komponenter</link>). Det finns också några komponenter som "
10387"visar en justerbar del av ett större område, som <classname>Viewport</"
10388"classname>-komponenten. Dessa komponenter har <classname>Gtk::Adjustment</"
10389"classname>-objekt som uttrycker denna gemensamma del av deras API."
517310390
5174#. (itstool) path: chapter/para10391#. (itstool) path: chapter/para
5175#: C/index-in.docbook:431310392#: C/index-in.docbook:4313
n5176msgid "So that applications can react to changes, for instance when a user movesn10393msgid ""
> a scrollbar, <classname>Gtk::Adjustment</classname> has a <literal>value_change 
>d</literal> signal. You can then use the <methodname>get_value()</methodname> me 
>thod to discover the new value." 
10394"So that applications can react to changes, for instance when a user moves a "
10395"scrollbar, <classname>Gtk::Adjustment</classname> has a "
10396"<literal>value_changed</literal> signal. You can then use the "
10397"<methodname>get_value()</methodname> method to discover the new value."
5177msgstr ""10398msgstr ""
nn10399"<classname>Gtk::Adjustment</classname> har en <literal>value_changed</"
10400"literal>-signal så att program kan reagera på ändringar, exempelvis då en "
10401"användare flyttar en rullningslist. Du kan sedan använda metoden "
10402"<methodname>get_value()</methodname> för att få reda på det nya värdet."
517810403
5179#. (itstool) path: section/title10404#. (itstool) path: section/title
5180#: C/index-in.docbook:432110405#: C/index-in.docbook:4321
nn10406#, fuzzy
5181msgid "Creating an Adjustment"10407msgid "Creating an Adjustment"
n5182msgstr ""n10408msgstr "Skapa en Adjustment"
518310409
5184#. (itstool) path: section/para10410#. (itstool) path: section/para
5185#: C/index-in.docbook:432310411#: C/index-in.docbook:4323
n5186msgid "The <classname>Gtk::Adjustment</classname> is created by its <methodname>n10412#, fuzzy
>create()</methodname> method which is as follows:" 
10413msgid ""
10414"The <classname>Gtk::Adjustment</classname> is created by its "
10415"<methodname>create()</methodname> method which is as follows:"
5187msgstr ""10416msgstr ""
nn10417"Denna <classname>Gtk::Adjustment</classname> skapas av sin "
10418"<methodname>create()</methodname>-metod som är som följer:"
518810419
5189#. (itstool) path: section/programlisting10420#. (itstool) path: section/programlisting
5190#: C/index-in.docbook:432810421#: C/index-in.docbook:4328
n5191#, no-wrapn10422#, fuzzy, no-wrap
10423#| msgid ""
10424#| "Glib::RefPtr&lt;Gtk::Adjustment&gt; Gtk::Adjustment::create(\n"
10425#| "  double value,\n"
10426#| "  double lower,\n"
10427#| "  double upper,\n"
10428#| "  double step_increment = 1,\n"
10429#| "  double page_increment = 10,\n"
10430#| "  double page_size = 0);"
5192msgid ""10431msgid ""
5193"<code>Glib::RefPtr&lt;Gtk::Adjustment&gt; Gtk::Adjustment::create(\n"10432"<code>Glib::RefPtr&lt;Gtk::Adjustment&gt; Gtk::Adjustment::create(\n"
5194"  double value,\n"10433"  double value,\n"
5195"  double lower,\n"10434"  double lower,\n"
5196"  double upper,\n"10435"  double upper,\n"
5197"  double step_increment = 1,\n"10436"  double step_increment = 1,\n"
5198"  double page_increment = 10,\n"10437"  double page_increment = 10,\n"
5199"  double page_size = 0);</code>"10438"  double page_size = 0);</code>"
5200msgstr ""10439msgstr ""
nn10440"Glib::RefPtr&lt;Gtk::Adjustment&gt; Gtk::Adjustment::create(\n"
10441"  double value,\n"
10442"  double lower,\n"
10443"  double upper,\n"
10444"  double step_increment = 1,\n"
10445"  double page_increment = 10,\n"
10446"  double page_size = 0);"
520110447
5202#. (itstool) path: section/para10448#. (itstool) path: section/para
5203#: C/index-in.docbook:433610449#: C/index-in.docbook:4336
n5204msgid "The <parameter>value</parameter> argument is the initial value of the adjn10450#, fuzzy
>ustment, usually corresponding to the topmost or leftmost position of an adjusta 
>ble widget. The <parameter>lower</parameter> and <parameter>upper</parameter> ar 
>guments specify the possible range of values which the adjustment can hold. The  
><parameter>step_increment</parameter> argument specifies the smaller of the two  
>increments by which the user can change the value, while the <parameter>page_inc 
>rement</parameter> is the larger one. The <parameter>page_size</parameter> argum 
>ent usually corresponds somehow to the visible area of a panning widget. The <pa 
>rameter>upper</parameter> argument is used to represent the bottommost or rightm 
>ost coordinate in a panning widget's child." 
10451msgid ""
10452"The <parameter>value</parameter> argument is the initial value of the "
10453"adjustment, usually corresponding to the topmost or leftmost position of an "
10454"adjustable widget. The <parameter>lower</parameter> and <parameter>upper</"
10455"parameter> arguments specify the possible range of values which the "
10456"adjustment can hold. The <parameter>step_increment</parameter> argument "
10457"specifies the smaller of the two increments by which the user can change the "
10458"value, while the <parameter>page_increment</parameter> is the larger one. "
10459"The <parameter>page_size</parameter> argument usually corresponds somehow to "
10460"the visible area of a panning widget. The <parameter>upper</parameter> "
10461"argument is used to represent the bottommost or rightmost coordinate in a "
10462"panning widget's child."
5205msgstr ""10463msgstr ""
nn10464"Argumentet <parameter>value</parameter> är justeringens ursprungliga värde, "
10465"vanligen motsvarande positionen överst eller längst till vänster för en "
10466"justerbar komponent. Argumenten <parameter>lower</parameter> och "
10467"<parameter>upper</parameter> anger det möjliga värdeintervallet som "
10468"justeringen kan hålla. Argumentet <parameter>step_increment</parameter> "
10469"anger den mindre av de två ökningar som användaren kan ändra värdet med, "
10470"medan <parameter>page_increment</parameter> är den större. Argumentet "
10471"<parameter>page_size</parameter> motsvarar vanligen på något vis det synliga "
10472"området för en panoreringskomponent. Argumentet <parameter>upper</parameter> "
10473"används för att representera koordinaten längst ner eller till höger i en "
10474"panoreringskomponents underordnade."
520610475
5207#. (itstool) path: section/title10476#. (itstool) path: section/title
5208#: C/index-in.docbook:435510477#: C/index-in.docbook:4355
nn10478#, fuzzy
5209msgid "Using Adjustments the Easy Way"10479msgid "Using Adjustments the Easy Way"
n5210msgstr ""n10480msgstr "Det enkla sättet att använda justeringar"
521110481
5212#. (itstool) path: section/para10482#. (itstool) path: section/para
5213#: C/index-in.docbook:435710483#: C/index-in.docbook:4357
n5214msgid "The adjustable widgets can be roughly divided into those which use and ren10484#, fuzzy
>quire specific units for these values, and those which treat them as arbitrary n 
>umbers." 
10485msgid ""
10486"The adjustable widgets can be roughly divided into those which use and "
10487"require specific units for these values, and those which treat them as "
10488"arbitrary numbers."
5215msgstr ""10489msgstr ""
nn10490"De justerbara komponenterna kan i stort delas upp i de som använder och "
10491"kräver specifika enheter för dessa värden, och de som behandlar dem som "
10492"godtyckliga tal."
521610493
5217#. (itstool) path: section/para10494#. (itstool) path: section/para
5218#: C/index-in.docbook:436210495#: C/index-in.docbook:4362
n5219msgid "The group which treats the values as arbitrary numbers includes the <clasn10496#, fuzzy
>sname>Range</classname> widgets (<classname>Scrollbar</classname> and <classname 
>>Scale</classname>), the <classname>ScaleButton</classname> widget, and the <cla 
>ssname>SpinButton</classname> widget. These widgets are typically \"adjusted\" d 
>irectly by the user with the mouse or keyboard. They will treat the <parameter>l 
>ower</parameter> and <parameter>upper</parameter> values of an adjustment as a r 
>ange within which the user can manipulate the adjustment's <parameter>value</par 
>ameter>. By default, they will only modify the <parameter>value</parameter> of a 
>n adjustment." 
10497msgid ""
10498"The group which treats the values as arbitrary numbers includes the "
10499"<classname>Range</classname> widgets (<classname>Scrollbar</classname> and "
10500"<classname>Scale</classname>), the <classname>ScaleButton</classname> "
10501"widget, and the <classname>SpinButton</classname> widget. These widgets are "
10502"typically \"adjusted\" directly by the user with the mouse or keyboard. They "
10503"will treat the <parameter>lower</parameter> and <parameter>upper</parameter> "
10504"values of an adjustment as a range within which the user can manipulate the "
10505"adjustment's <parameter>value</parameter>. By default, they will only modify "
10506"the <parameter>value</parameter> of an adjustment."
5220msgstr ""10507msgstr ""
nn10508"Gruppen som behandlar värdena som godtyckliga tal inkluderar "
10509"<classname>Range</classname>-komponenterna (<classname>Scrollbar</classname> "
10510"och <classname>Scale</classname>), <classname>ScaleButton</classname>-"
10511"komponenten och <classname>SpinButton</classname>-komponenten. Dessa "
10512"komponenter ”justeras” typiskt av användaren med musen eller tangentbordet. "
10513"De kommer behandla <parameter>lower</parameter>- och <parameter>upper</"
10514"parameter>-värdena för en justering som ett intervall som användaren kan "
10515"manipulera justeringens <parameter>value</parameter> inom. Som standard "
10516"kommer de endast ändra <parameter>value</parameter> för en justering."
522110517
5222#. (itstool) path: section/para10518#. (itstool) path: section/para
5223#: C/index-in.docbook:437410519#: C/index-in.docbook:4374
n5224msgid "The other group includes the <classname>Viewport</classname> widget and tn10520#, fuzzy
>he <classname>ScrolledWindow</classname> widget. All of these widgets use pixel  
>values for their adjustments. These are also typically adjusted indirectly using 
> scrollbars. While all widgets which use adjustments can either create their own 
> adjustments or use ones you supply, you'll generally want to let this particula 
>r category of widgets create its own adjustments." 
10521msgid ""
10522"The other group includes the <classname>Viewport</classname> widget and the "
10523"<classname>ScrolledWindow</classname> widget. All of these widgets use pixel "
10524"values for their adjustments. These are also typically adjusted indirectly "
10525"using scrollbars. While all widgets which use adjustments can either create "
10526"their own adjustments or use ones you supply, you'll generally want to let "
10527"this particular category of widgets create its own adjustments."
5225msgstr ""10528msgstr ""
nn10529"Den andra gruppen inkluderar <classname>Viewport</classname>-komponenten och "
10530"<classname>ScrolledWindow</classname>-komponenten. Alla dessa komponenter "
10531"använder bildpunktsvärden för sina justeringar. Dessa justeras också typiskt "
10532"indirekt med rullningslister. Medan alla komponenter som använder "
10533"justeringar antingen kan skapa sina egna justeringar eller använda sådana "
10534"som du tillhandahåller, så kommer du allmänt vilja låta denna specifika "
10535"kategori komponenter skapa sina egna justeringar."
522610536
5227#. (itstool) path: section/para10537#. (itstool) path: section/para
5228#: C/index-in.docbook:438310538#: C/index-in.docbook:4383
n5229msgid "If you share an adjustment object between a Scrollbar and a TextView widgn10539#, fuzzy
>et, manipulating the scrollbar will automagically adjust the TextView widget. Yo 
>u can set it up like this:" 
10540msgid ""
10541"If you share an adjustment object between a Scrollbar and a TextView widget, "
10542"manipulating the scrollbar will automagically adjust the TextView widget. "
10543"You can set it up like this:"
5230msgstr ""10544msgstr ""
nn10545"Om du delar ett justeringsobjekt mellan en Scrollbar- och en TextView-"
10546"komponent, kommer att manipulera rullningslisten automagiskt justera "
10547"TextView-komponenten. Du kan konfigurera det så här:"
523110548
5232#. (itstool) path: section/programlisting10549#. (itstool) path: section/programlisting
5233#: C/index-in.docbook:438810550#: C/index-in.docbook:4388
n5234#, no-wrapn10551#, fuzzy, no-wrap
5235msgid ""10552msgid ""
5236"<code>// creates its own adjustments\n"10553"<code>// creates its own adjustments\n"
5237"Gtk::TextView textview;\n"10554"Gtk::TextView textview;\n"
5238"// uses the newly-created adjustment for the scrollbar as well\n"10555"// uses the newly-created adjustment for the scrollbar as well\n"
5239"Gtk::Scrollbar vscrollbar(textview.get_vadjustment(), Gtk::Orientation::VERTICA10556"Gtk::Scrollbar vscrollbar(textview.get_vadjustment(), Gtk::Orientation::VERTICA
>L);</code>">L);</code>"
5240msgstr ""10557msgstr ""
nn10558"// skapar sina egna justeringar\n"
10559"Gtk::TextView textview;\n"
10560"// använder den nyss skapade justeringen även för rullningslisten\n"
10561"Gtk::Scrollbar vscrollbar(textview.get_vadjustment(), Gtk::Orientation::VERTICA
 >L);"
524110562
5242#. (itstool) path: section/title10563#. (itstool) path: section/title
5243#: C/index-in.docbook:439610564#: C/index-in.docbook:4396
nn10565#, fuzzy
5244msgid "Adjustment Internals"10566msgid "Adjustment Internals"
n5245msgstr ""n10567msgstr "Inre delarna av Adjustment"
524610568
5247#. (itstool) path: section/para10569#. (itstool) path: section/para
5248#: C/index-in.docbook:439810570#: C/index-in.docbook:4398
n5249msgid "OK, you say, that's nice, but what if I want to create my own handlers ton10571msgid ""
> respond when the user adjusts a <classname>Range</classname> widget or a <class 
>name>SpinButton</classname>. To access the value of a <classname>Gtk::Adjustment 
></classname>, you can use the <methodname>get_value()</methodname> and <methodna 
>me>set_value()</methodname> methods:" 
10572"OK, you say, that's nice, but what if I want to create my own handlers to "
10573"respond when the user adjusts a <classname>Range</classname> widget or a "
10574"<classname>SpinButton</classname>. To access the value of a <classname>Gtk::"
10575"Adjustment</classname>, you can use the <methodname>get_value()</methodname> "
10576"and <methodname>set_value()</methodname> methods:"
5250msgstr ""10577msgstr ""
nn10578"OK, då säger du att det var väl fint, men om jag vill skapa mina egna "
10579"hanterare för att svara när användaren justerar en <classname>Range</"
10580"classname>-komponent eller en <classname>SpinButton</classname> då? För att "
10581"komma åt värdet på en <classname>Gtk::Adjustment</classname> kan du använda "
10582"metoderna <methodname>get_value()</methodname> och <methodname>set_value()</"
10583"methodname>:"
525110584
5252#. (itstool) path: section/para10585#. (itstool) path: section/para
5253#: C/index-in.docbook:440610586#: C/index-in.docbook:4406
n5254msgid "As mentioned earlier, <classname>Gtk::Adjustment</classname> can emit sign10587#, fuzzy
>nals. This is, of course, how updates happen automatically when you share an <cl 
>assname>Adjustment</classname> object between a <classname>Scrollbar</classname> 
> and another adjustable widget; all adjustable widgets connect signal handlers t 
>o their adjustment's <literal>value_changed</literal> signal, as can your progra 
>m." 
10588msgid ""
10589"As mentioned earlier, <classname>Gtk::Adjustment</classname> can emit "
10590"signals. This is, of course, how updates happen automatically when you share "
10591"an <classname>Adjustment</classname> object between a <classname>Scrollbar</"
10592"classname> and another adjustable widget; all adjustable widgets connect "
10593"signal handlers to their adjustment's <literal>value_changed</literal> "
10594"signal, as can your program."
5255msgstr ""10595msgstr ""
nn10596"Som nämnts tidigare kan <classname>Gtk::Adjustment</classname> sända ut "
10597"signaler. Detta är förstås hur uppdateringar sker automatiskt när du delar "
10598"ett <classname>Adjustment</classname>-objekt mellan en <classname>Scrollbar</"
10599"classname> och en annan justerbar komponent; alla justerbara komponenter "
10600"ansluter signalhanterare till sin justerings <literal>value_changed</"
10601"literal>-signal, och det kan även ditt program."
525610602
5257#. (itstool) path: section/para10603#. (itstool) path: section/para
5258#: C/index-in.docbook:441510604#: C/index-in.docbook:4415
n5259msgid "So, for example, if you have a <classname>Scale</classname> widget, and yn10605#, fuzzy
>ou want to change the rotation of a picture whenever its value changes, you woul 
>d create a signal handler like this:" 
10606msgid ""
10607"So, for example, if you have a <classname>Scale</classname> widget, and you "
10608"want to change the rotation of a picture whenever its value changes, you "
10609"would create a signal handler like this:"
5260msgstr ""10610msgstr ""
nn10611"Så om du exempelvis har en <classname>Scale</classname>-komponent och vill "
10612"ändra rotationen för en bild närhelst dess värde ändras så skulle du skapa "
10613"en signalhanterare så här:"
526110614
5262#. (itstool) path: section/programlisting10615#. (itstool) path: section/programlisting
5263#: C/index-in.docbook:442010616#: C/index-in.docbook:4420
n5264#, no-wrapn10617#, fuzzy, no-wrap
5265msgid ""10618msgid ""
5266"<code>void cb_rotate_picture(MyPicture* picture)\n"10619"<code>void cb_rotate_picture(MyPicture* picture)\n"
5267"{\n"10620"{\n"
5268"  picture-&gt;set_rotation(adj-&gt;get_value());\n"10621"  picture-&gt;set_rotation(adj-&gt;get_value());\n"
5269"...</code>"10622"...</code>"
5270msgstr ""10623msgstr ""
nn10624"void cb_rotate_picture(MyPicture* picture)\n"
10625"{\n"
10626"  picture-&gt;set_rotation(adj-&gt;get_value());\n"
10627"..."
527110628
5272#. (itstool) path: section/para10629#. (itstool) path: section/para
5273#: C/index-in.docbook:442410630#: C/index-in.docbook:4424
nn10631#, fuzzy
5274msgid "and connect it to the scale widget's adjustment like this:"10632msgid "and connect it to the scale widget's adjustment like this:"
n5275msgstr ""n10633msgstr "och ansluta den till skalkomponentens justering så här:"
527610634
5277#. (itstool) path: section/programlisting10635#. (itstool) path: section/programlisting
5278#: C/index-in.docbook:442710636#: C/index-in.docbook:4427
n5279#, no-wrapn10637#, fuzzy, no-wrap
5280msgid ""10638msgid ""
5281"<code>adj-&gt;signal_value_changed().connect(sigc::bind&lt;MyPicture*&gt;(sigc:10639"<code>adj-&gt;signal_value_changed().connect(sigc::bind&lt;MyPicture*&gt;(sigc:
>:mem_fun(*this,\n">:mem_fun(*this,\n"
5282"    &amp;cb_rotate_picture), picture));</code>"10640"    &amp;cb_rotate_picture), picture));</code>"
5283msgstr ""10641msgstr ""
nn10642"adj-&gt;signal_value_changed().connect(sigc::bind&lt;MyPicture*&gt;(sigc::mem_f
 >un(*this,\n"
10643"    &amp;cb_rotate_picture), picture));"
528410644
5285#. (itstool) path: section/para10645#. (itstool) path: section/para
5286#: C/index-in.docbook:443010646#: C/index-in.docbook:4430
n5287msgid "What if a widget reconfigures the <parameter>upper</parameter> or <paramen10647#, fuzzy
>ter>lower</parameter> fields of its <classname>Adjustment</classname>, such as w 
>hen a user adds more text to a text widget? In this case, it emits the <literal> 
>changed</literal> signal." 
10648msgid ""
10649"What if a widget reconfigures the <parameter>upper</parameter> or "
10650"<parameter>lower</parameter> fields of its <classname>Adjustment</"
10651"classname>, such as when a user adds more text to a text widget? In this "
10652"case, it emits the <literal>changed</literal> signal."
5288msgstr ""10653msgstr ""
nn10654"Men om en komponent konfigurerar om fälten <parameter>upper</parameter> "
10655"eller <parameter>lower</parameter> för sin <classname>Adjustment</"
10656"classname>, som när en användare lägger till mer text till en textkomponent? "
10657"I detta fall sänder den ut signalen <literal>changed</literal>."
528910658
5290#. (itstool) path: section/para10659#. (itstool) path: section/para
5291#: C/index-in.docbook:443710660#: C/index-in.docbook:4437
n5292msgid "<classname>Range</classname> widgets typically connect a handler to this n10661#, fuzzy
>signal, which changes their appearance to reflect the change - for example, the  
>size of the slider in a scrollbar will grow or shrink in inverse proportion to t 
>he difference between the <parameter>lower</parameter> and <parameter>upper</par 
>ameter> values of its <classname>Adjustment</classname>." 
10662msgid ""
10663"<classname>Range</classname> widgets typically connect a handler to this "
10664"signal, which changes their appearance to reflect the change - for example, "
10665"the size of the slider in a scrollbar will grow or shrink in inverse "
10666"proportion to the difference between the <parameter>lower</parameter> and "
10667"<parameter>upper</parameter> values of its <classname>Adjustment</classname>."
5293msgstr ""10668msgstr ""
nn10669"<classname>Range</classname>-komponenter ansluter typiskt en hanterare till "
10670"denna signal, vilket ändrar deras utseende för att reflektera ändringen - "
10671"exempelvis kommer storleken på skjutreglaget i en rullningslist växa eller "
10672"krympa i invers proportion till skillnaden mellan <parameter>lower</"
10673"parameter>- och <parameter>upper</parameter>-värdena för dess "
10674"<classname>Adjustment</classname>."
529410675
5295#. (itstool) path: section/para10676#. (itstool) path: section/para
5296#: C/index-in.docbook:444610677#: C/index-in.docbook:4446
nn10678#, fuzzy
10679msgid ""
5297msgid "You probably won't ever need to attach a handler to this signal, unless y10680"You probably won't ever need to attach a handler to this signal, unless "
>ou're writing a new type of range widget." 
10681"you're writing a new type of range widget."
5298msgstr ""10682msgstr ""
nn10683"Du kommer troligen aldrig behöva fästa en hanterare till denna signal, om du "
10684"inte skriver en ny typ av intervallkomponent."
529910685
5300#. (itstool) path: section/programlisting10686#. (itstool) path: section/programlisting
5301#: C/index-in.docbook:445010687#: C/index-in.docbook:4450
n5302#, no-wrapn10688#, fuzzy, no-wrap
5303msgid ""
5304"<code>adjustment-&gt;signal_changed();</code>"10689msgid "<code>adjustment-&gt;signal_changed();</code>"
5305msgstr ""10690msgstr "adjustment-&gt;signal_changed();"
530610691
5307#. (itstool) path: chapter/title10692#. (itstool) path: chapter/title
5308#: C/index-in.docbook:445710693#: C/index-in.docbook:4457
5309msgid "Dialogs"10694msgid "Dialogs"
n5310msgstr ""n10695msgstr "Dialogrutor"
531110696
5312#. (itstool) path: note/para10697#. (itstool) path: note/para
5313#: C/index-in.docbook:445910698#: C/index-in.docbook:4459
n5314msgid "<classname>Gtk::Dialog</classname> and the classes derived from it, are dn10699msgid ""
>eprecated since <application>gtkmm</application> 4.10. They can still be used in 
> <application>gtkmm</application>4 applications, provided GTKMM_DISABLE_DEPRECAT 
>ED and GDKMM_DISABLE_DEPRECATED are not defined. Some of the dialog classes are  
>replaced by classes that are available since <application>gtkmm</application> 4. 
>10." 
10700"<classname>Gtk::Dialog</classname> and the classes derived from it, are "
10701"deprecated since <application>gtkmm</application> 4.10. They can still be "
10702"used in <application>gtkmm</application>4 applications, provided "
10703"GTKMM_DISABLE_DEPRECATED and GDKMM_DISABLE_DEPRECATED are not defined. Some "
10704"of the dialog classes are replaced by classes that are available since "
10705"<application>gtkmm</application> 4.10."
5315msgstr ""10706msgstr ""
nn10707"<classname>Gtk::Dialog</classname> och klasserna som härleds från den är "
10708"föråldrade sedan <application>gtkmm</application> 4.10. De kan fortfarande "
10709"användas i <application>gtkmm</application>4-program, förutsatt att "
10710"GTKMM_DISABLE_DEPRECATED och GDKMM_DISABLE_DEPRECATED inte har definierats. "
10711"Några av dialogklasserna ersätts av klasser som finns tillgängliga sedan "
10712"<application>gtkmm</application> 4.10."
531610713
5317#. (itstool) path: note/para10714#. (itstool) path: note/para
5318#: C/index-in.docbook:446410715#: C/index-in.docbook:4464
n5319msgid "The examples in this chapter use classes that are available since <applicn10716msgid ""
>ation>gtkmm</application> 4.10. Similar examples with the deprecated classes are 
> available in the <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-docume 
>ntation/tree/gtkmm-4-0/examples/book/dialogs/\"> gtkmm-4-0 branch</link> in the  
>git repository." 
10717"The examples in this chapter use classes that are available since "
10718"<application>gtkmm</application> 4.10. Similar examples with the deprecated "
10719"classes are available in the <link xlink:href=\"https://gitlab.gnome.org/"
10720"GNOME/gtkmm-documentation/tree/gtkmm-4-0/examples/book/dialogs/\"> gtkmm-4-0 "
10721"branch</link> in the git repository."
5320msgstr ""10722msgstr ""
nn10723"Exemplen i detta kapitel använder klasser som finns tillgängliga sedan "
10724"<application>gtkmm</application> 4.10. Liknande exempel med de föråldrade "
10725"klasserna finns tillgängliga i <link xlink:href=\"https://gitlab.gnome.org/"
10726"GNOME/gtkmm-documentation/tree/gtkmm-4-0/examples/book/dialogs/\"> grenen "
10727"gtkmm-4-0</link> i git-arkivet."
532110728
5322#. (itstool) path: chapter/para10729#. (itstool) path: chapter/para
5323#: C/index-in.docbook:447010730#: C/index-in.docbook:4470
n5324msgid "Dialogs are used as secondary windows, to provide specific information orn10731#, fuzzy
> to ask questions. <classname>Gtk::Dialog</classname> windows contain a few pre- 
>packed widgets to ensure consistency, and a <literal>response</literal> signal w 
>hich is emitted when the user dismisses the dialog." 
10732msgid ""
10733"Dialogs are used as secondary windows, to provide specific information or to "
10734"ask questions. <classname>Gtk::Dialog</classname> windows contain a few pre-"
10735"packed widgets to ensure consistency, and a <literal>response</literal> "
10736"signal which is emitted when the user dismisses the dialog."
5325msgstr ""10737msgstr ""
nn10738"Dialogrutor används som sekundära fönster för att tillhandahålla specifik "
10739"information eller ställa frågor. <classname>Gtk::Dialog</classname>-fönster "
10740"innehåller några i förväg packade komponenter för att säkerställa "
10741"konsekvens, och en <literal>response</literal>-signal som sänds ut när "
10742"användaren klickar bort dialogrutan."
532610743
5327#. (itstool) path: chapter/para10744#. (itstool) path: chapter/para
5328#: C/index-in.docbook:447710745#: C/index-in.docbook:4477
n5329msgid "There are several derived <classname>Dialog</classname> classes which youn10746msgid ""
> might find useful. <classname>Gtk::MessageDialog</classname> is used for most s 
>imple notifications. But at other times you might need to derive your own dialog 
> class to provide more complex functionality." 
10747"There are several derived <classname>Dialog</classname> classes which you "
10748"might find useful. <classname>Gtk::MessageDialog</classname> is used for "
10749"most simple notifications. But at other times you might need to derive your "
10750"own dialog class to provide more complex functionality."
5330msgstr ""10751msgstr ""
nn10752"Det finns flera härledda <classname>Dialog</classname>-klasser som du kan "
10753"finna användbara. <classname>Gtk::MessageDialog</classname> används för de "
10754"enklaste aviseringarna. Men andra gånger kan du behöva härleda din egen "
10755"dialogklass för att tillhandahålla mer komplex funktionalitet."
533110756
5332#. (itstool) path: chapter/para10757#. (itstool) path: chapter/para
5333#: C/index-in.docbook:448410758#: C/index-in.docbook:4484
n5334msgid "To pack widgets into a custom dialog, you should pack them into the <clasn10759#, fuzzy
>sname>Gtk::Box</classname>, available via <methodname>get_content_area()</method 
>name>. To just add a <classname>Button</classname> to the bottom of the <classna 
>me>Dialog</classname>, you could use the <methodname>add_button()</methodname> m 
>ethod." 
10760msgid ""
10761"To pack widgets into a custom dialog, you should pack them into the "
10762"<classname>Gtk::Box</classname>, available via "
10763"<methodname>get_content_area()</methodname>. To just add a "
10764"<classname>Button</classname> to the bottom of the <classname>Dialog</"
10765"classname>, you could use the <methodname>add_button()</methodname> method."
5335msgstr ""10766msgstr ""
nn10767"För att packa komponenter i en anpassad dialogruta bör du packa dem i "
10768"<classname>Gtk::Box</classname>en, tillgänglig via "
10769"<methodname>get_content_area()</methodname>. För att bara lägga till en "
10770"<classname>Button</classname> längst ner i <classname>Dialog</classname>en "
10771"kan du använda metoden <methodname>add_button()</methodname>."
533610772
5337#. (itstool) path: chapter/para10773#. (itstool) path: chapter/para
5338#: C/index-in.docbook:449210774#: C/index-in.docbook:4492
n5339msgid "The <literal>response</literal> signal handler receives an <literal>int</n10775#, fuzzy
>literal>. This may be a value from the <type>Gtk::ResponseType</type> if the use 
>r closed the dialog by clicking a standard button, or it could be the custom res 
>ponse value that you specified when using <methodname>add_button()</methodname>. 
>" 
10776msgid ""
10777"The <literal>response</literal> signal handler receives an <literal>int</"
10778"literal>. This may be a value from the <type>Gtk::ResponseType</type> if the "
10779"user closed the dialog by clicking a standard button, or it could be the "
10780"custom response value that you specified when using "
10781"<methodname>add_button()</methodname>."
5340msgstr ""10782msgstr ""
nn10783"<literal>response</literal>-signalhanteraren tar emot en <literal>int</"
10784"literal>. Detta kan vara ett värde från <type>Gtk::ResponseType</type> om "
10785"användaren stängt dialogrutan genom att klicka på en standardknapp, eller så "
10786"kunde det vara det anpassade svarsvärdet som du angivit när du använt "
10787"<methodname>add_button()</methodname>."
534110788
5342#. (itstool) path: chapter/para10789#. (itstool) path: chapter/para
5343#: C/index-in.docbook:449910790#: C/index-in.docbook:4499
n5344msgid "To show the dialog, call <methodname>set_visible(true)</methodname>. If tn10791msgid ""
>he same dialog instance will be shown several times, you must also call <methodn 
>ame>set_hide_on_close()</methodname>, or else the dialog will be destroyed when  
>it's closed. Connect to the <literal>response</literal> signal, if you want to k 
>now which button was pressed. The <literal>response</literal> signal handler is  
>also where you should hide the dialog." 
10792"To show the dialog, call <methodname>set_visible(true)</methodname>. If the "
10793"same dialog instance will be shown several times, you must also call "
10794"<methodname>set_hide_on_close()</methodname>, or else the dialog will be "
10795"destroyed when it's closed. Connect to the <literal>response</literal> "
10796"signal, if you want to know which button was pressed. The <literal>response</"
10797"literal> signal handler is also where you should hide the dialog."
5345msgstr ""10798msgstr ""
nn10799"För att visa dialogrutan, anropa <methodname>set_visible(true)</methodname>. "
10800"Om samma dialoginstans kommer visas flera gånger måste du också anropa "
10801"<methodname>set_hide_on_close()</methodname>, annars kommer dialogrutan "
10802"förstöras då den stängs. Anslut till <literal>response</literal>-signalen om "
10803"du vill veta vilken knapp som trycktes på. <literal>response</literal>-"
10804"signalhanteraren är också var du ska dölja dialogrutan."
534610805
5347#. (itstool) path: chapter/para10806#. (itstool) path: chapter/para
5348#: C/index-in.docbook:450810807#: C/index-in.docbook:4508
n5349msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n10808msgid ""
>1Dialog.html\">Reference</link>" 
10809"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10810"classGtk_1_1Dialog.html\">Reference</link>"
5350msgstr ""10811msgstr ""
nn10812"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10813"classGtk_1_1Dialog.html\">Referens</link>"
535110814
5352#. (itstool) path: section/title10815#. (itstool) path: section/title
5353#: C/index-in.docbook:451110816#: C/index-in.docbook:4511
5354msgid "AlertDialog and MessageDialog"10817msgid "AlertDialog and MessageDialog"
n5355msgstr ""n10818msgstr "AlertDialog och MessageDialog"
535610819
5357#. (itstool) path: section/para10820#. (itstool) path: section/para
5358#: C/index-in.docbook:451210821#: C/index-in.docbook:4512
n5359msgid "<classname>MessageDialog</classname> (deprecated since <application>gtkmmn10822msgid ""
></application> 4.10) and <classname>AlertDialog</classname> (available since <ap 
>plication>gtkmm</application> 4.10) are convenience classes, used to create simp 
>le, standard message dialogs, with a message and buttons for user response." 
10823"<classname>MessageDialog</classname> (deprecated since <application>gtkmm</"
10824"application> 4.10) and <classname>AlertDialog</classname> (available since "
10825"<application>gtkmm</application> 4.10) are convenience classes, used to "
10826"create simple, standard message dialogs, with a message and buttons for user "
10827"response."
5360msgstr ""10828msgstr ""
nn10829"<classname>MessageDialog</classname> (föråldrad sedan <application>gtkmm</"
10830"application> 4.10) och <classname>AlertDialog</classname> (tillgänglig sedan "
10831"<application>gtkmm</application> 4.10) är bekvämlighetsklasser som används "
10832"för att skapa enkla standardmeddelandedialoger, med ett meddelande och "
10833"knappar för användarsvar."
536110834
5362#. (itstool) path: section/para10835#. (itstool) path: section/para
5363#: C/index-in.docbook:451910836#: C/index-in.docbook:4519
n5364msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n10837msgid ""
>1AlertDialog.html\">AlertDialog Reference</link>" 
10838"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10839"classGtk_1_1AlertDialog.html\">AlertDialog Reference</link>"
5365msgstr ""10840msgstr ""
nn10841"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10842"classGtk_1_1AlertDialog.html\">AlertDialog-referens</link>"
536610843
5367#. (itstool) path: section/para10844#. (itstool) path: section/para
5368#: C/index-in.docbook:452010845#: C/index-in.docbook:4520
n5369msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n10846msgid ""
>1MessageDialog.html\">MessageDialog Reference</link>" 
10847"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10848"classGtk_1_1MessageDialog.html\">MessageDialog Reference</link>"
5370msgstr ""10849msgstr ""
nn10850"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10851"classGtk_1_1MessageDialog.html\">MessageDialog-referens</link>"
537110852
5372#. (itstool) path: figure/title10853#. (itstool) path: figure/title
5373#: C/index-in.docbook:452610854#: C/index-in.docbook:4526
5374msgid "AlertDialog"10855msgid "AlertDialog"
n5375msgstr ""n10856msgstr "AlertDialog"
537610857
5377#. (itstool) path: imageobject/imagedata10858#. (itstool) path: imageobject/imagedata
5378#. This is a reference to an external file such as an image or video. When10859#. This is a reference to an external file such as an image or video. When
5379#. the file changes, the md5 hash will change to let you know you need to10860#. the file changes, the md5 hash will change to let you know you need to
5380#. update your localized copy. The msgstr is not used at all. Set it to10861#. update your localized copy. The msgstr is not used at all. Set it to
5381#. whatever you like once you have updated your copy of the file.10862#. whatever you like once you have updated your copy of the file.
5382#: C/index-in.docbook:452810863#: C/index-in.docbook:4528
nn10864#, fuzzy
5383msgctxt "_"10865msgctxt "_"
n5384msgid "external ref='figures/dialogs_alertdialog.png' md5='88fa2103ad6d842eeebc6n10866msgid ""
>8cc8cfd94ef'" 
10867"external ref='figures/dialogs_alertdialog.png' "
10868"md5='88fa2103ad6d842eeebc68cc8cfd94ef'"
5385msgstr ""10869msgstr ""
nn10870"external ref='figures/dialogs_alertdialog.png' "
10871"md5='88fa2103ad6d842eeebc68cc8cfd94ef'"
538610872
5387#. (itstool) path: section/para10873#. (itstool) path: section/para
5388#: C/index-in.docbook:453210874#: C/index-in.docbook:4532
n5389msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren10875msgid ""
>e/master/examples/book/dialogs/alertdialog\">Source Code</link>" 
10876"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10877"master/examples/book/dialogs/alertdialog\">Source Code</link>"
5390msgstr ""10878msgstr ""
nn10879"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10880"master/examples/book/dialogs/alertdialog\">Källkod</link>"
539110881
5392#. (itstool) path: section/title10882#. (itstool) path: section/title
5393#: C/index-in.docbook:453710883#: C/index-in.docbook:4537
5394msgid "FileDialog and FileChooserDialog"10884msgid "FileDialog and FileChooserDialog"
n5395msgstr ""n10885msgstr "FileDialog och FileChooserDialog"
539610886
5397#. (itstool) path: section/para10887#. (itstool) path: section/para
5398#: C/index-in.docbook:453810888#: C/index-in.docbook:4538
n5399msgid "The <classname>FileChooserDialog</classname> (deprecated since <applicatin10889msgid ""
>on>gtkmm</application> 4.10) and <classname>FileDialog</classname> (available si 
>nce <application>gtkmm</application> 4.10) are suitable for use with \"Open\" or 
> \"Save\" menu items." 
10890"The <classname>FileChooserDialog</classname> (deprecated since "
10891"<application>gtkmm</application> 4.10) and <classname>FileDialog</classname> "
10892"(available since <application>gtkmm</application> 4.10) are suitable for use "
10893"with \"Open\" or \"Save\" menu items."
5400msgstr ""10894msgstr ""
nn10895"<classname>FileChooserDialog</classname> (föråldrad sedan "
10896"<application>gtkmm</application> 4.10) och <classname>FileDialog</classname> "
10897"(tillgänglig sedan <application>gtkmm</application> 4.10) är lämpliga för "
10898"användning med menyobjekten ”Öppna” eller ”Spara”."
540110899
5402#. (itstool) path: section/para10900#. (itstool) path: section/para
5403#: C/index-in.docbook:454310901#: C/index-in.docbook:4543
n5404msgid "Most of the useful member methods for <classname>FileChooserDialog</classn10902msgid ""
>name> are actually in the <classname>Gtk::FileChooser</classname> base class." 
10903"Most of the useful member methods for <classname>FileChooserDialog</"
10904"classname> are actually in the <classname>Gtk::FileChooser</classname> base "
10905"class."
5405msgstr ""10906msgstr ""
nn10907"De flesta av de användbara medlemsmetoderna för "
10908"<classname>FileChooserDialog</classname> finns faktiskt i basklassen "
10909"<classname>Gtk::FileChooser</classname>."
540610910
5407#. (itstool) path: section/para10911#. (itstool) path: section/para
5408#: C/index-in.docbook:454810912#: C/index-in.docbook:4548
n5409msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n10913msgid ""
>1FileDialog.html\">FileDialog Reference</link>" 
10914"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10915"classGtk_1_1FileDialog.html\">FileDialog Reference</link>"
5410msgstr ""10916msgstr ""
nn10917"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10918"classGtk_1_1FileDialog.html\">FileDialog-referens</link>"
541110919
nn10920# TODO: FileChooseDialog Reference
5412#. (itstool) path: section/para10921#. (itstool) path: section/para
5413#: C/index-in.docbook:454910922#: C/index-in.docbook:4549
n5414msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n10923#, fuzzy
>1FileChooserDialog.html\">FileChooserDialog Reference</link>" 
10924#| msgid ""
10925#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10926#| "classGtk_1_1FileChooserDialog.html\">FileChooserDialogReference</link>"
10927msgid ""
10928"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10929"classGtk_1_1FileChooserDialog.html\">FileChooserDialog Reference</link>"
5415msgstr ""10930msgstr ""
nn10931"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10932"classGtk_1_1FileChooserDialog.html\">FileChooserDialog-referens</link>"
541610933
5417#. (itstool) path: figure/title10934#. (itstool) path: figure/title
5418#: C/index-in.docbook:455510935#: C/index-in.docbook:4555
5419msgid "FileDialog"10936msgid "FileDialog"
n5420msgstr ""n10937msgstr "FileDialog"
542110938
5422#. (itstool) path: imageobject/imagedata10939#. (itstool) path: imageobject/imagedata
5423#. This is a reference to an external file such as an image or video. When10940#. This is a reference to an external file such as an image or video. When
5424#. the file changes, the md5 hash will change to let you know you need to10941#. the file changes, the md5 hash will change to let you know you need to
5425#. update your localized copy. The msgstr is not used at all. Set it to10942#. update your localized copy. The msgstr is not used at all. Set it to
5426#. whatever you like once you have updated your copy of the file.10943#. whatever you like once you have updated your copy of the file.
5427#: C/index-in.docbook:455710944#: C/index-in.docbook:4557
nn10945#, fuzzy
5428msgctxt "_"10946msgctxt "_"
n5429msgid "external ref='figures/dialogs_filedialog.png' md5='15ecc452482112428259d0n10947msgid ""
>dcd8d0394a'" 
10948"external ref='figures/dialogs_filedialog.png' "
10949"md5='15ecc452482112428259d0dcd8d0394a'"
5430msgstr ""10950msgstr ""
nn10951"external ref='figures/dialogs_filedialog.png' "
10952"md5='15ecc452482112428259d0dcd8d0394a'"
543110953
5432#. (itstool) path: section/para10954#. (itstool) path: section/para
5433#: C/index-in.docbook:456110955#: C/index-in.docbook:4561
n5434msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren10956msgid ""
>e/master/examples/book/dialogs/filedialog\">Source Code</link>" 
10957"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10958"master/examples/book/dialogs/filedialog\">Source Code</link>"
5435msgstr ""10959msgstr ""
nn10960"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
10961"master/examples/book/dialogs/filedialog\">Källkod</link>"
543610962
5437#. (itstool) path: section/title10963#. (itstool) path: section/title
5438#: C/index-in.docbook:456610964#: C/index-in.docbook:4566
5439msgid "ColorDialog and ColorChooserDialog"10965msgid "ColorDialog and ColorChooserDialog"
n5440msgstr ""n10966msgstr "ColorDialog och ColorChooserDialog"
544110967
5442#. (itstool) path: section/para10968#. (itstool) path: section/para
5443#: C/index-in.docbook:456710969#: C/index-in.docbook:4567
n5444msgid "The <classname>ColorChooserDialog</classname> (deprecated since <applicatn10970msgid ""
>ion>gtkmm</application> 4.10) and <classname>ColorDialog</classname> (available  
>since <application>gtkmm</application> 4.10) allow the user to choose a color. T 
>he <classname>ColorButton</classname> (deprecated since <application>gtkmm</appl 
>ication> 4.10) and <classname>ColorDialogButton</classname> (available since <ap 
>plication>gtkmm</application> 4.10) open a color selection dialog when it is cli 
>cked." 
10971"The <classname>ColorChooserDialog</classname> (deprecated since "
10972"<application>gtkmm</application> 4.10) and <classname>ColorDialog</"
10973"classname> (available since <application>gtkmm</application> 4.10) allow the "
10974"user to choose a color. The <classname>ColorButton</classname> (deprecated "
10975"since <application>gtkmm</application> 4.10) and "
10976"<classname>ColorDialogButton</classname> (available since "
10977"<application>gtkmm</application> 4.10) open a color selection dialog when it "
10978"is clicked."
5445msgstr ""10979msgstr ""
nn10980"<classname>ColorChooserDialog</classname> (föråldrad sedan "
10981"<application>gtkmm</application> 4.10) och <classname>ColorDialog</"
10982"classname> (tillgänglig sedan <application>gtkmm</application> 4.10) låter "
10983"användaren välja en färg. <classname>ColorButton</classname> (föråldrad "
10984"sedan <application>gtkmm</application> 4.10) och "
10985"<classname>ColorDialogButton</classname> (tillgänglig sedan "
10986"<application>gtkmm</application> 4.10) öppnar en färgvalsdialog när de "
10987"klickas på."
544610988
5447#. (itstool) path: section/para10989#. (itstool) path: section/para
5448#: C/index-in.docbook:457510990#: C/index-in.docbook:4575
n5449msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n10991msgid ""
>1ColorDialog.html\">ColorDialog Reference</link>" 
10992"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10993"classGtk_1_1ColorDialog.html\">ColorDialog Reference</link>"
5450msgstr ""10994msgstr ""
nn10995"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
10996"classGtk_1_1ColorDialog.html\">ColorDialog-referens</link>"
545110997
5452#. (itstool) path: section/para10998#. (itstool) path: section/para
5453#: C/index-in.docbook:457610999#: C/index-in.docbook:4576
n5454msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n11000msgid ""
>1ColorChooserDialog.html\">ColorChooserDialog Reference</link>" 
11001"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11002"classGtk_1_1ColorChooserDialog.html\">ColorChooserDialog Reference</link>"
5455msgstr ""11003msgstr ""
nn11004"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11005"classGtk_1_1ColorChooserDialog.html\">ColorChooserDialog-referens</link>"
545611006
5457#. (itstool) path: figure/title11007#. (itstool) path: figure/title
5458#: C/index-in.docbook:458211008#: C/index-in.docbook:4582
5459msgid "ColorDialog"11009msgid "ColorDialog"
n5460msgstr ""n11010msgstr "ColorDialog"
546111011
5462#. (itstool) path: imageobject/imagedata11012#. (itstool) path: imageobject/imagedata
5463#. This is a reference to an external file such as an image or video. When11013#. This is a reference to an external file such as an image or video. When
5464#. the file changes, the md5 hash will change to let you know you need to11014#. the file changes, the md5 hash will change to let you know you need to
5465#. update your localized copy. The msgstr is not used at all. Set it to11015#. update your localized copy. The msgstr is not used at all. Set it to
5466#. whatever you like once you have updated your copy of the file.11016#. whatever you like once you have updated your copy of the file.
5467#: C/index-in.docbook:458411017#: C/index-in.docbook:4584
nn11018#, fuzzy
5468msgctxt "_"11019msgctxt "_"
n5469msgid "external ref='figures/dialogs_colordialog.png' md5='029761e82cf06d3cbeaacn11020msgid ""
>2b7ccd70e57'" 
11021"external ref='figures/dialogs_colordialog.png' "
11022"md5='029761e82cf06d3cbeaac2b7ccd70e57'"
5470msgstr ""11023msgstr ""
nn11024"external ref='figures/dialogs_colordialog.png' "
11025"md5='029761e82cf06d3cbeaac2b7ccd70e57'"
547111026
5472#. (itstool) path: section/para11027#. (itstool) path: section/para
5473#: C/index-in.docbook:458811028#: C/index-in.docbook:4588
n5474msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11029msgid ""
>e/master/examples/book/dialogs/colordialog\">Source Code</link>" 
11030"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11031"master/examples/book/dialogs/colordialog\">Source Code</link>"
5475msgstr ""11032msgstr ""
nn11033"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11034"master/examples/book/dialogs/colordialog\">Källkod</link>"
547611035
5477#. (itstool) path: section/title11036#. (itstool) path: section/title
5478#: C/index-in.docbook:459311037#: C/index-in.docbook:4593
5479msgid "FontDialog and FontChooserDialog"11038msgid "FontDialog and FontChooserDialog"
n5480msgstr ""n11039msgstr "FontDialog och FontChooserDialog"
548111040
5482#. (itstool) path: section/para11041#. (itstool) path: section/para
5483#: C/index-in.docbook:459411042#: C/index-in.docbook:4594
n5484msgid "The <classname>FontChooserDialog</classname> (deprecated since <applicatin11043msgid ""
>on>gtkmm</application> 4.10) and <classname>FontDialog</classname> (available si 
>nce <application>gtkmm</application> 4.10) allow the user to choose a font. The  
><classname>FontButton</classname> (deprecated since <application>gtkmm</applicat 
>ion> 4.10) and <classname>FontDialogButton</classname> (available since <applica 
>tion>gtkmm</application> 4.10) open a font chooser dialog when it is clicked." 
11044"The <classname>FontChooserDialog</classname> (deprecated since "
11045"<application>gtkmm</application> 4.10) and <classname>FontDialog</classname> "
11046"(available since <application>gtkmm</application> 4.10) allow the user to "
11047"choose a font. The <classname>FontButton</classname> (deprecated since "
11048"<application>gtkmm</application> 4.10) and <classname>FontDialogButton</"
11049"classname> (available since <application>gtkmm</application> 4.10) open a "
11050"font chooser dialog when it is clicked."
5485msgstr ""11051msgstr ""
nn11052"<classname>FontChooserDialog</classname> (föråldrad sedan "
11053"<application>gtkmm</application> 4.10) och <classname>FontDialog</classname> "
11054"(tillgänglig sedan <application>gtkmm</application> 4.10) låter användaren "
11055"välja ett typsnitt. <classname>FontButton</classname> (föråldrad sedan "
11056"<application>gtkmm</application> 4.10) och <classname>FontDialogButton</"
11057"classname> (tillgänglig sedan <application>gtkmm</application> 4.10) öppnar "
11058"en typsnittvalsdialog när de klickas på."
548611059
5487#. (itstool) path: section/para11060#. (itstool) path: section/para
5488#: C/index-in.docbook:460211061#: C/index-in.docbook:4602
n5489msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n11062msgid ""
>1FontDialog.html\">FontDialog Reference</link>" 
11063"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11064"classGtk_1_1FontDialog.html\">FontDialog Reference</link>"
5490msgstr ""11065msgstr ""
nn11066"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11067"classGtk_1_1FontDialog.html\">FontDialog-referens</link>"
549111068
5492#. (itstool) path: section/para11069#. (itstool) path: section/para
5493#: C/index-in.docbook:460311070#: C/index-in.docbook:4603
n5494msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n11071msgid ""
>1FontChooserDialog.html\">FontChooserDialog Reference</link>" 
11072"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11073"classGtk_1_1FontChooserDialog.html\">FontChooserDialog Reference</link>"
5495msgstr ""11074msgstr ""
nn11075"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11076"classGtk_1_1FontChooserDialog.html\">FontChooserDialog-referens</link>"
549611077
5497#. (itstool) path: figure/title11078#. (itstool) path: figure/title
5498#: C/index-in.docbook:460911079#: C/index-in.docbook:4609
5499msgid "FontDialog"11080msgid "FontDialog"
n5500msgstr ""n11081msgstr "FontDialog"
550111082
5502#. (itstool) path: imageobject/imagedata11083#. (itstool) path: imageobject/imagedata
5503#. This is a reference to an external file such as an image or video. When11084#. This is a reference to an external file such as an image or video. When
5504#. the file changes, the md5 hash will change to let you know you need to11085#. the file changes, the md5 hash will change to let you know you need to
5505#. update your localized copy. The msgstr is not used at all. Set it to11086#. update your localized copy. The msgstr is not used at all. Set it to
5506#. whatever you like once you have updated your copy of the file.11087#. whatever you like once you have updated your copy of the file.
5507#: C/index-in.docbook:461111088#: C/index-in.docbook:4611
nn11089#, fuzzy
5508msgctxt "_"11090msgctxt "_"
n5509msgid "external ref='figures/dialogs_fontdialog.png' md5='e35e05429468fa8823416bn11091msgid ""
>8a0deff342'" 
11092"external ref='figures/dialogs_fontdialog.png' "
11093"md5='e35e05429468fa8823416b8a0deff342'"
5510msgstr ""11094msgstr ""
nn11095"external ref='figures/dialogs_fontdialog.png' "
11096"md5='e35e05429468fa8823416b8a0deff342'"
551111097
5512#. (itstool) path: section/para11098#. (itstool) path: section/para
5513#: C/index-in.docbook:461511099#: C/index-in.docbook:4615
n5514msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11100msgid ""
>e/master/examples/book/dialogs/fontdialog\">Source Code</link>" 
11101"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11102"master/examples/book/dialogs/fontdialog\">Source Code</link>"
5515msgstr ""11103msgstr ""
nn11104"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11105"master/examples/book/dialogs/fontdialog\">Källkod</link>"
551611106
5517#. (itstool) path: section/title11107#. (itstool) path: section/title
5518#: C/index-in.docbook:462011108#: C/index-in.docbook:4620
nn11109#, fuzzy
5519msgid "Non-modal AboutDialog"11110msgid "Non-modal AboutDialog"
n5520msgstr ""n11111msgstr "Ej modal AboutDialog"
552111112
5522#. (itstool) path: section/para11113#. (itstool) path: section/para
5523#: C/index-in.docbook:462111114#: C/index-in.docbook:4621
n5524msgid "The <classname>AboutDialog</classname> offers a simple way to display infn11115msgid ""
>ormation about a program, like its logo, name, copyright, website and license." 
11116"The <classname>AboutDialog</classname> offers a simple way to display "
11117"information about a program, like its logo, name, copyright, website and "
11118"license."
5525msgstr ""11119msgstr ""
nn11120"<classname>AboutDialog</classname> erbjuder ett lätt sätt att visa "
11121"information om ett program, som dess logotyp, namn, upphovsrätt, webbplats "
11122"och licens."
552611123
5527#. (itstool) path: section/para11124#. (itstool) path: section/para
5528#: C/index-in.docbook:462511125#: C/index-in.docbook:4625
n5529msgid "Most dialogs in this chapter are modal, that is, they freeze the rest of n11126#, fuzzy
>the application while they are shown. It's also possible to create a non-modal d 
>ialog, which does not freeze other windows in the application. The following exa 
>mple shows a non-modal <classname>AboutDialog</classname>. This is perhaps not t 
>he kind of dialog you would normally make non-modal, but non-modal dialogs can b 
>e useful in other cases. E.g. <application>gedit</application>'s search-and-repl 
>ace dialog is non-modal." 
11127msgid ""
11128"Most dialogs in this chapter are modal, that is, they freeze the rest of the "
11129"application while they are shown. It's also possible to create a non-modal "
11130"dialog, which does not freeze other windows in the application. The "
11131"following example shows a non-modal <classname>AboutDialog</classname>. This "
11132"is perhaps not the kind of dialog you would normally make non-modal, but non-"
11133"modal dialogs can be useful in other cases. E.g. <application>gedit</"
11134"application>'s search-and-replace dialog is non-modal."
5530msgstr ""11135msgstr ""
nn11136"De flesta dialogrutorna i detta kapitel är modala, det vill säga att de "
11137"fryser resten av programmet medan de visas. Det är också möjligt att skapa "
11138"en icke-modal dialogruta som inte fryser andra fönster i programmet. "
11139"Följande exempel visar en <classname>AboutDialog</classname> som inte är "
11140"modal. Detta är kanske inte dialogsorten som du skulle göra icke-modal, men "
11141"icke-modala dialogrutor kan vara användbara i andra fall. Exempelvis är "
11142"<application>gedit</application>s sök-och-ersättdialog icke-modal."
553111143
5532#. (itstool) path: section/para11144#. (itstool) path: section/para
5533#: C/index-in.docbook:463511145#: C/index-in.docbook:4635
n5534msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n11146msgid ""
>1AboutDialog.html\">Reference</link>" 
11147"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11148"classGtk_1_1AboutDialog.html\">Reference</link>"
5535msgstr ""11149msgstr ""
nn11150"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11151"classGtk_1_1AboutDialog.html\">Referens</link>"
553611152
5537#. (itstool) path: figure/title11153#. (itstool) path: figure/title
5538#: C/index-in.docbook:464111154#: C/index-in.docbook:4641
5539msgid "AboutDialog"11155msgid "AboutDialog"
n5540msgstr ""n11156msgstr "AboutDialog"
554111157
5542#. (itstool) path: imageobject/imagedata11158#. (itstool) path: imageobject/imagedata
5543#. This is a reference to an external file such as an image or video. When11159#. This is a reference to an external file such as an image or video. When
5544#. the file changes, the md5 hash will change to let you know you need to11160#. the file changes, the md5 hash will change to let you know you need to
5545#. update your localized copy. The msgstr is not used at all. Set it to11161#. update your localized copy. The msgstr is not used at all. Set it to
5546#. whatever you like once you have updated your copy of the file.11162#. whatever you like once you have updated your copy of the file.
5547#: C/index-in.docbook:464311163#: C/index-in.docbook:4643
nn11164#, fuzzy
5548msgctxt "_"11165msgctxt "_"
n5549msgid "external ref='figures/dialogs_about.png' md5='1b70a95ad73fce53bb5a2fbd3dfn11166msgid ""
>69c5c'" 
11167"external ref='figures/dialogs_about.png' "
11168"md5='1b70a95ad73fce53bb5a2fbd3df69c5c'"
5550msgstr ""11169msgstr ""
nn11170"external ref='figures/dialogs_about.png' "
11171"md5='1b70a95ad73fce53bb5a2fbd3df69c5c'"
555111172
5552#. (itstool) path: section/para11173#. (itstool) path: section/para
5553#: C/index-in.docbook:464711174#: C/index-in.docbook:4647
n5554msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11175msgid ""
>e/master/examples/book/dialogs/aboutdialog\">Source Code</link>" 
11176"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11177"master/examples/book/dialogs/aboutdialog\">Source Code</link>"
5555msgstr ""11178msgstr ""
nn11179"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11180"master/examples/book/dialogs/aboutdialog\">Källkod</link>"
555611181
5557#. (itstool) path: section/title11182#. (itstool) path: section/title
5558#: C/index-in.docbook:465211183#: C/index-in.docbook:4652
nn11184#, fuzzy
5559msgid "Custom Dialog"11185msgid "Custom Dialog"
n5560msgstr ""n11186msgstr "Anpassad dialogruta"
556111187
5562#. (itstool) path: section/para11188#. (itstool) path: section/para
5563#: C/index-in.docbook:465311189#: C/index-in.docbook:4653
n5564msgid "When none of the predefined dialog classes suit your needs, you can make n11190#, fuzzy
>your own dialog by deriving a class from <classname>Window</classname> and fill  
>it with the widgets you need." 
11191msgid ""
11192"When none of the predefined dialog classes suit your needs, you can make "
11193"your own dialog by deriving a class from <classname>Window</classname> and "
11194"fill it with the widgets you need."
5565msgstr ""11195msgstr ""
nn11196"Om ingen av de fördefinierade dialogklasserna passar för dina behov kan du "
11197"skapa din egen dialogruta genom att härleda en klass från <classname>Window</"
11198"classname> och fylla den med komponenterna som du behöver."
556611199
5567#. (itstool) path: section/para11200#. (itstool) path: section/para
5568#: C/index-in.docbook:465911201#: C/index-in.docbook:4659
n5569msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n11202msgid ""
>1Window.html\">Window Reference</link>" 
11203"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11204"classGtk_1_1Window.html\">Window Reference</link>"
5570msgstr ""11205msgstr ""
nn11206"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
11207"classGtk_1_1Window.html\">Window-referens</link>"
557111208
5572#. (itstool) path: figure/title11209#. (itstool) path: figure/title
5573#: C/index-in.docbook:466511210#: C/index-in.docbook:4665
nn11211#, fuzzy
5574msgid "Window Dialog"11212msgid "Window Dialog"
n5575msgstr ""n11213msgstr "Fönsterdialog"
557611214
5577#. (itstool) path: imageobject/imagedata11215#. (itstool) path: imageobject/imagedata
5578#. This is a reference to an external file such as an image or video. When11216#. This is a reference to an external file such as an image or video. When
5579#. the file changes, the md5 hash will change to let you know you need to11217#. the file changes, the md5 hash will change to let you know you need to
5580#. update your localized copy. The msgstr is not used at all. Set it to11218#. update your localized copy. The msgstr is not used at all. Set it to
5581#. whatever you like once you have updated your copy of the file.11219#. whatever you like once you have updated your copy of the file.
5582#: C/index-in.docbook:466711220#: C/index-in.docbook:4667
nn11221#, fuzzy
5583msgctxt "_"11222msgctxt "_"
n5584msgid "external ref='figures/dialogs_windowdialog.png' md5='53deb18153f6903fe45dn11223msgid ""
>015fc06ccef3'" 
11224"external ref='figures/dialogs_windowdialog.png' "
11225"md5='53deb18153f6903fe45d015fc06ccef3'"
5585msgstr ""11226msgstr ""
nn11227"external ref='figures/dialogs_windowdialog.png' "
11228"md5='53deb18153f6903fe45d015fc06ccef3'"
558611229
5587#. (itstool) path: section/para11230#. (itstool) path: section/para
5588#: C/index-in.docbook:467111231#: C/index-in.docbook:4671
n5589msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11232msgid ""
>e/master/examples/book/dialogs/windowdialog\">Source Code</link>" 
11233"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11234"master/examples/book/dialogs/windowdialog\">Source Code</link>"
5590msgstr ""11235msgstr ""
nn11236"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11237"master/examples/book/dialogs/windowdialog\">Källkod</link>"
559111238
5592#. (itstool) path: chapter/title11239#. (itstool) path: chapter/title
5593#: C/index-in.docbook:467811240#: C/index-in.docbook:4678
5594msgid "The DrawingArea Widget"11241msgid "The DrawingArea Widget"
n5595msgstr ""n11242msgstr "DrawingArea-komponenten"
559611243
5597#. (itstool) path: chapter/para11244#. (itstool) path: chapter/para
5598#: C/index-in.docbook:467911245#: C/index-in.docbook:4679
n5599msgid "The <classname>DrawingArea</classname> widget is a blank window that given11246#, fuzzy
>s you the freedom to create any graphic you desire. Along with that freedom come 
>s the responsibility to draw on the widget. When a widget is first shown, or whe 
>n it is covered and then uncovered again it needs to redraw itself. Most widgets 
> have code to do this, but the <classname>DrawingArea</classname> does not, allo 
>wing you to write your own draw function to determine how the contents of the wi 
>dget will be drawn. This is done by setting a draw function with a call to the < 
>methodname>set_draw_func()</methodname> member function." 
11247msgid ""
11248"The <classname>DrawingArea</classname> widget is a blank window that gives "
11249"you the freedom to create any graphic you desire. Along with that freedom "
11250"comes the responsibility to draw on the widget. When a widget is first "
11251"shown, or when it is covered and then uncovered again it needs to redraw "
11252"itself. Most widgets have code to do this, but the <classname>DrawingArea</"
11253"classname> does not, allowing you to write your own draw function to "
11254"determine how the contents of the widget will be drawn. This is done by "
11255"setting a draw function with a call to the <methodname>set_draw_func()</"
11256"methodname> member function."
5600msgstr ""11257msgstr ""
nn11258"<classname>DrawingArea</classname>-komponenten är ett blankt fönster som ger "
11259"dig friheten att skapa vilken grafik du vill. Tillsammans med den friheten "
11260"kommer ansvaret för att rita på komponenten. När en komponent först visas, "
11261"eller när den täcks och sedan tas fram igen behöver den rita om sig själv. "
11262"De flesta komponenter har kod för att göra detta, men "
11263"<classname>DrawingArea</classname> har inte det, vilket låter skriva din "
11264"egen ritfunktion för att bestämma hur innehållet i komponenten ska ritas. "
11265"Detta görs genom att ställa in en ritfunktion med ett anrop till "
11266"medlemsfunktionen <methodname>set_draw_func()</methodname>."
560111267
5602#. (itstool) path: chapter/para11268#. (itstool) path: chapter/para
5603#: C/index-in.docbook:469111269#: C/index-in.docbook:4691
n5604msgid "GTK uses the <link xlink:href=\"http://cairographics.org\">Cairo</link> dn11270#, fuzzy
>rawing API. With <application>gtkmm</application>, you may use the <link xlink:h 
>ref=\"http://www.cairographics.org/cairomm/\">cairomm</link> <phrase role=\"nowr 
>ap\">C++</phrase> API for cairo." 
11271#| msgid ""
11272#| "GTK uses the <link xlink:href=\"http://cairographics.org\">Cairo</link> "
11273#| "drawing API. With <application>gtkmm</application>, you may use the <link "
11274#| "xlink:href=\"http://www.cairographics.org/cairomm/\">cairomm</link> C++ "
11275#| "API for cairo."
11276msgid ""
11277"GTK uses the <link xlink:href=\"http://cairographics.org\">Cairo</link> "
11278"drawing API. With <application>gtkmm</application>, you may use the <link "
11279"xlink:href=\"http://www.cairographics.org/cairomm/\">cairomm</link> <phrase "
11280"role=\"nowrap\">C++</phrase> API for cairo."
5605msgstr ""11281msgstr ""
nn11282"GTK använder <link xlink:href=\"http://cairographics.org\">Cairo</link>s rit-"
11283"API. Med <application>gtkmm</application> kan du använda C++-API:t <link "
11284"xlink:href=\"http://www.cairographics.org/cairomm/\">cairomm</link> för "
11285"cairo."
560611286
5607#. (itstool) path: chapter/para11287#. (itstool) path: chapter/para
5608#: C/index-in.docbook:469611288#: C/index-in.docbook:4696
n5609msgid "You can draw very sophisticated shapes using Cairo, but the methods to don11289#, fuzzy
> so are quite basic. Cairo provides methods for drawing straight lines, curved l 
>ines, and arcs (including circles). These basic shapes can be combined to create 
> more complex shapes and paths which can be filled with solid colors, gradients, 
> patterns, and other things. In addition, Cairo can perform complex transformati 
>ons, do compositing of images, and render antialiased text." 
11290msgid ""
11291"You can draw very sophisticated shapes using Cairo, but the methods to do so "
11292"are quite basic. Cairo provides methods for drawing straight lines, curved "
11293"lines, and arcs (including circles). These basic shapes can be combined to "
11294"create more complex shapes and paths which can be filled with solid colors, "
11295"gradients, patterns, and other things. In addition, Cairo can perform "
11296"complex transformations, do compositing of images, and render antialiased "
11297"text."
5610msgstr ""11298msgstr ""
nn11299"Du kan rita väldigt sofistikerade former med Cairo, men metoderna för att "
11300"göra det är ganska rudimentära. Cairo tillhandahåller metoder för att rita "
11301"raka linjer, krökta linjer och bågar (inkluderande cirklar). Dessa "
11302"grundläggande former kan kombineras för att skapa mer komplexa former och "
11303"banor som kan fyllas enfärgat eller med gradienter och många andra saker. "
11304"Dessutom kan Cairo utföra komplexa transformationer och sammansättning av "
11305"bilder, samt rendera kantutjämnad text."
561111306
5612#. (itstool) path: note/title11307#. (itstool) path: note/title
5613#: C/index-in.docbook:470611308#: C/index-in.docbook:4706
5614msgid "Cairo and Pango"11309msgid "Cairo and Pango"
n5615msgstr ""n11310msgstr "Cairo och Pango"
561611311
5617#. (itstool) path: note/para11312#. (itstool) path: note/para
5618#: C/index-in.docbook:470711313#: C/index-in.docbook:4707
n5619msgid "Although Cairo can render text, it's not meant to be a replacement for Pan11314msgid ""
>ngo. Pango is a better choice if you need to perform more advanced text renderin 
>g such as wrapping or ellipsizing text. Drawing text with Cairo should only be d 
>one if the text is part of a graphic." 
11315"Although Cairo can render text, it's not meant to be a replacement for "
11316"Pango. Pango is a better choice if you need to perform more advanced text "
11317"rendering such as wrapping or ellipsizing text. Drawing text with Cairo "
11318"should only be done if the text is part of a graphic."
5620msgstr ""11319msgstr ""
nn11320"Även om Cairo kan rendera text så är det inte tänkt som en ersättning för "
11321"Pango. Pango är ett bättre val om du behöver utföra mer avancerad "
11322"textrendering som att radbryta eller elliptisera text. Att rita text med "
11323"Cairo bör bara göras om texten är del av en grafik."
562111324
5622#. (itstool) path: chapter/para11325#. (itstool) path: chapter/para
5623#: C/index-in.docbook:471211326#: C/index-in.docbook:4712
n5624msgid "In this section of the tutorial, we'll cover the basic Cairo drawing moden11327#, fuzzy
>l, describe each of the basic drawing elements in some detail (with examples), a 
>nd then present a simple application that uses Cairo to draw a custom clock widg 
>et." 
11328msgid ""
11329"In this section of the tutorial, we'll cover the basic Cairo drawing model, "
11330"describe each of the basic drawing elements in some detail (with examples), "
11331"and then present a simple application that uses Cairo to draw a custom clock "
11332"widget."
5625msgstr ""11333msgstr ""
nn11334"I detta avsnitt av handledningen kommer vi täcka den grundläggande Cairo-"
11335"ritmodellen, beskriva vart och ett av de grundläggande ritelementet "
11336"någorlunda detaljerat (med exempel), och sedan presentera ett enkelt program "
11337"som använder Cairo för att rita en anpassad klockkomponent."
562611338
5627#. (itstool) path: section/title11339#. (itstool) path: section/title
5628#: C/index-in.docbook:472011340#: C/index-in.docbook:4720
5629msgid "The Cairo Drawing Model"11341msgid "The Cairo Drawing Model"
n5630msgstr ""n11342msgstr "Cairo-ritmodellen"
563111343
5632#. (itstool) path: section/para11344#. (itstool) path: section/para
5633#: C/index-in.docbook:472111345#: C/index-in.docbook:4721
n5634msgid "The basic concept of drawing in Cairo involves defining 'invisible' pathsn11346#, fuzzy
> and then stroking or filling them to make them visible." 
11347msgid ""
11348"The basic concept of drawing in Cairo involves defining 'invisible' paths "
11349"and then stroking or filling them to make them visible."
5635msgstr ""11350msgstr ""
nn11351"Det grundläggande konceptet för att rita i Cairo involverar att definiera "
11352"”osynliga” banor och sedan strecka eller fylla dem för att göra dem synliga."
563611353
5637#. (itstool) path: section/para11354#. (itstool) path: section/para
5638#: C/index-in.docbook:472511355#: C/index-in.docbook:4725
n5639msgid "To do any drawing in <application>gtkmm</application> with Cairo, you musn11356#, fuzzy
>t first get a <classname>Cairo::Context</classname> object. This class holds all 
> of the graphics state parameters that describe how drawing is to be done. This  
>includes information such as line width, color, the surface to draw to, and many 
> other things. This allows the actual drawing functions to take fewer arguments  
>to simplify the interface. Usually, you use the <classname>Cairo::Context</class 
>name> that you get as input data to the draw function that you set with the call 
> to <methodname>set_draw_func()</methodname>. It's also possible to create a <cl 
>assname>Cairo::Context</classname> by calling the <methodname>Gdk::Surface::crea 
>te_cairo_context()</methodname> and <methodname>Gdk::CairoContext::cairo_create( 
>)</methodname> functions. Since Cairo contexts are reference-counted objects, <m 
>ethodname>cairo_create()</methodname> returns a <classname>Cairo::RefPtr&lt;Cair 
>o::Context&gt;</classname> object. (Note the difference between <classname>Gdk:: 
>CairoContext</classname> and <classname>Cairo::Context</classname>.)" 
11357msgid ""
11358"To do any drawing in <application>gtkmm</application> with Cairo, you must "
11359"first get a <classname>Cairo::Context</classname> object. This class holds "
11360"all of the graphics state parameters that describe how drawing is to be "
11361"done. This includes information such as line width, color, the surface to "
11362"draw to, and many other things. This allows the actual drawing functions to "
11363"take fewer arguments to simplify the interface. Usually, you use the "
11364"<classname>Cairo::Context</classname> that you get as input data to the draw "
11365"function that you set with the call to <methodname>set_draw_func()</"
11366"methodname>. It's also possible to create a <classname>Cairo::Context</"
11367"classname> by calling the <methodname>Gdk::Surface::create_cairo_context()</"
11368"methodname> and <methodname>Gdk::CairoContext::cairo_create()</methodname> "
11369"functions. Since Cairo contexts are reference-counted objects, "
11370"<methodname>cairo_create()</methodname> returns a <classname>Cairo::"
11371"RefPtr&lt;Cairo::Context&gt;</classname> object. (Note the difference "
11372"between <classname>Gdk::CairoContext</classname> and <classname>Cairo::"
11373"Context</classname>.)"
5640msgstr ""11374msgstr ""
nn11375"För att rita i <application>gtkmm</application> med Cairo måste du först få "
11376"ett <classname>Cairo::Context</classname>-objekt. Denna klass innehåller "
11377"alla grafiktillståndsparametrar som beskriver hur utritning görs. Detta "
11378"inkluderar information som linjebredd, färg, ytan att rita till och mycket "
11379"annat. Detta låter de faktiska ritfunktionerna att ta färre argument för att "
11380"förenkla gränssnittet. Vanligen använder du den <classname>Cairo::Context</"
11381"classname> som du får som indata till ritfunktionen som du ställer in med "
11382"anropen till <methodname>set_draw_func()</methodname>. Det är också möjligt "
11383"att skapa en <classname>Cairo::Context</classname> genom att anropa "
11384"funktionerna <methodname>Gdk::Surface::create_cairo_context()</methodname> "
11385"och <methodname>Gdk::CairoContext::cairo_create()</methodname>. Eftersom "
11386"Cairo-kontexter är referensräknade objekt returnerar "
11387"<methodname>cairo_create()</methodname> ett <classname>Cairo::RefPtr&lt;"
11388"Cairo::Context&gt;</classname>-objekt. (Observera skillnaden mellan "
11389"<classname>Gdk::CairoContext</classname> och <classname>Cairo::Context</"
11390"classname>.)"
564111391
5642#. (itstool) path: section/para11392#. (itstool) path: section/para
5643#: C/index-in.docbook:474211393#: C/index-in.docbook:4742
n5644msgid "The following example shows how to set up a Cairo context with a foregroun11394msgid ""
>nd color of red and a width of 2. Any drawing functions that use this context wi 
>ll use these settings." 
11395"The following example shows how to set up a Cairo context with a foreground "
11396"color of red and a width of 2. Any drawing functions that use this context "
11397"will use these settings."
5645msgstr ""11398msgstr ""
nn11399"Följande exempel visar hur du konfigurerar en Cairo-kontext med "
11400"förgrundsfärgen röd och bredden 2. Alla ritfunktioner som använder denna "
11401"kontext kommer använda dessa inställningar."
564611402
5647#. (itstool) path: section/programlisting11403#. (itstool) path: section/programlisting
5648#: C/index-in.docbook:474711404#: C/index-in.docbook:4747
n5649#, no-wrapn11405#, fuzzy, no-wrap
11406#| msgid ""
11407#| "\n"
11408#| "Gtk::DrawingArea myArea;\n"
11409#| "auto gdkCairoContext = myArea.get_surface()-&gt;create_cairo_context();\n"
11410#| "auto myContext = gdkCairoContext-&gt;cairo_create();\n"
11411#| "myContext-&gt;set_source_rgb(1.0, 0.0, 0.0);\n"
11412#| "myContext-&gt;set_line_width(2.0);\n"
11413#| "    "
5650msgid ""11414msgid ""
5651"<code>Gtk::DrawingArea myArea;\n"11415"<code>Gtk::DrawingArea myArea;\n"
5652"auto gdkCairoContext = myArea.get_surface()-&gt;create_cairo_context();\n"11416"auto gdkCairoContext = myArea.get_surface()-&gt;create_cairo_context();\n"
5653"auto myContext = gdkCairoContext-&gt;cairo_create();\n"11417"auto myContext = gdkCairoContext-&gt;cairo_create();\n"
5654"myContext-&gt;set_source_rgb(1.0, 0.0, 0.0);\n"11418"myContext-&gt;set_source_rgb(1.0, 0.0, 0.0);\n"
5655"myContext-&gt;set_line_width(2.0);\n"11419"myContext-&gt;set_line_width(2.0);\n"
5656"    </code>"11420"    </code>"
5657msgstr ""11421msgstr ""
nn11422"\n"
11423"Gtk::DrawingArea myArea;\n"
11424"auto gdkCairoContext = myArea.get_surface()-&gt;create_cairo_context();\n"
11425"auto myContext = gdkCairoContext-&gt;cairo_create();\n"
11426"myContext-&gt;set_source_rgb(1.0, 0.0, 0.0);\n"
11427"myContext-&gt;set_line_width(2.0);\n"
11428"    "
565811429
5659#. (itstool) path: section/para11430#. (itstool) path: section/para
5660#: C/index-in.docbook:475311431#: C/index-in.docbook:4753
n5661msgid "Each <classname>Cairo::Context</classname> is associated with a particulan11432#, fuzzy
>r <classname>Gdk::Surface</classname>, so the first line of the above example cr 
>eates a <classname>Gtk::DrawingArea</classname> widget and the next two lines us 
>e its associated <classname>Gdk::Surface</classname> to create a <classname>Cair 
>o::Context</classname> object. The final two lines change the graphics state of  
>the context." 
11433msgid ""
11434"Each <classname>Cairo::Context</classname> is associated with a particular "
11435"<classname>Gdk::Surface</classname>, so the first line of the above example "
11436"creates a <classname>Gtk::DrawingArea</classname> widget and the next two "
11437"lines use its associated <classname>Gdk::Surface</classname> to create a "
11438"<classname>Cairo::Context</classname> object. The final two lines change the "
11439"graphics state of the context."
5662msgstr ""11440msgstr ""
nn11441"Varje <classname>Cairo::Context</classname> associeras med en viss "
11442"<classname>Gdk::Surface</classname>, så den första raden i exemplet ovan "
11443"skapar en <classname>Gtk::DrawingArea</classname>-komponent och de två "
11444"raderna efter använder dess associerade <classname>Gdk::Surface</classname> "
11445"för att skapa ett <classname>Cairo::Context</classname>-objekt. De sista två "
11446"radera ändrar kontextens grafiktillstånd."
566311447
5664#. (itstool) path: section/para11448#. (itstool) path: section/para
5665#: C/index-in.docbook:476111449#: C/index-in.docbook:4761
n5666msgid "There are a number of graphics state variables that can be set for a Cairn11450msgid ""
>o context. The most common context attributes are color (using <methodname>set_s 
>ource_rgb()</methodname> or <methodname>set_source_rgba()</methodname> for trans 
>lucent colors), line width (using <methodname>set_line_width()</methodname>), li 
>ne dash pattern (using <methodname>set_dash()</methodname>), line cap style (usi 
>ng <methodname>set_line_cap()</methodname>), and line join style (using <methodn 
>ame>set_line_join()</methodname>), and font styles (using <methodname>set_font_s 
>ize()</methodname>, <methodname>set_font_face()</methodname> and others). There  
>are many other settings as well, such as transformation matrices, fill rules, wh 
>ether to perform antialiasing, and others. For further information, see the <lin 
>k xlink:href=\"http://www.cairographics.org/cairomm/\">cairomm</link> API docume 
>ntation." 
11451"There are a number of graphics state variables that can be set for a Cairo "
11452"context. The most common context attributes are color (using "
11453"<methodname>set_source_rgb()</methodname> or <methodname>set_source_rgba()</"
11454"methodname> for translucent colors), line width (using "
11455"<methodname>set_line_width()</methodname>), line dash pattern (using "
11456"<methodname>set_dash()</methodname>), line cap style (using "
11457"<methodname>set_line_cap()</methodname>), and line join style (using "
11458"<methodname>set_line_join()</methodname>), and font styles (using "
11459"<methodname>set_font_size()</methodname>, <methodname>set_font_face()</"
11460"methodname> and others). There are many other settings as well, such as "
11461"transformation matrices, fill rules, whether to perform antialiasing, and "
11462"others. For further information, see the <link xlink:href=\"http://www."
11463"cairographics.org/cairomm/\">cairomm</link> API documentation."
5667msgstr ""11464msgstr ""
nn11465"Det finns ett antal grafiktillståndsvariabler som kan ställas in för en "
11466"Cairo-kontext. De vanligaste kontextattributen är färg (med "
11467"<methodname>set_source_rgb()</methodname> eller "
11468"<methodname>set_source_rgba()</methodname> för genomskinliga färger), "
11469"linjebredd (med <methodname>set_line_width()</methodname>), "
11470"linjestreckningsmönster (med <methodname>set_dash()</methodname>), stil på "
11471"linjeände (med <methodname>set_line_cap()</methodname>), "
11472"linjesammankopplingsstil (med <methodname>set_line_join()</methodname>) och "
11473"typsnittsstilar (med <methodname>set_font_size()</methodname>, "
11474"<methodname>set_font_face()</methodname> med flera). Det finns även många "
11475"andra inställningar, såsom transformationsmatriser, fyllnadsregler, huruvida "
11476"kantutjämning ska utföras med mera. För vidare information kan du se API-"
11477"dokumentationen för <link xlink:href=\"http://www.cairographics.org/cairomm/"
11478"\">cairomm</link>."
566811479
5669#. (itstool) path: tip/para11480#. (itstool) path: tip/para
5670#: C/index-in.docbook:479311481#: C/index-in.docbook:4793
n5671msgid "It is good practice to put all modifications to the graphics state between11482msgid ""
>n <methodname>save()</methodname>/<methodname>restore()</methodname> function ca 
>lls. For example, if you have a function that takes a <classname>Cairo::Context< 
>/classname> reference as an argument, you might implement it as follows:" 
11483"It is good practice to put all modifications to the graphics state between "
11484"<methodname>save()</methodname>/<methodname>restore()</methodname> function "
11485"calls. For example, if you have a function that takes a <classname>Cairo::"
11486"Context</classname> reference as an argument, you might implement it as "
11487"follows:"
5672msgstr ""11488msgstr ""
nn11489"Det är god sed att stoppa alla ändringar till grafiktillståndet mellan "
11490"<methodname>save()</methodname>/<methodname>restore()</methodname>-"
11491"funktionsanrop. Om du exempelvis har en funktion som tar en "
11492"<classname>Cairo::Context</classname>-referens som ett argument kanske du "
11493"implementerar den enligt följande:"
567311494
5674#. (itstool) path: tip/programlisting11495#. (itstool) path: tip/programlisting
5675#: C/index-in.docbook:479911496#: C/index-in.docbook:4799
n5676#, no-wrapn11497#, fuzzy, no-wrap
11498#| msgid ""
11499#| "void doSomething(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; context, int
 > x)\n"
11500#| "{\n"
11501#| "    context-&gt;save();\n"
11502#| "    // change graphics state\n"
11503#| "    // perform drawing operations\n"
11504#| "    context-&gt;restore();\n"
11505#| "}"
5677msgid ""11506msgid ""
5678"<code>void doSomething(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; context, 11507"<code>void doSomething(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; context, 
>int x)\n">int x)\n"
5679"{\n"11508"{\n"
5680"    context-&gt;save();\n"11509"    context-&gt;save();\n"
5681"    // change graphics state\n"11510"    // change graphics state\n"
5682"    // perform drawing operations\n"11511"    // perform drawing operations\n"
5683"    context-&gt;restore();\n"11512"    context-&gt;restore();\n"
5684"}</code>"11513"}</code>"
5685msgstr ""11514msgstr ""
nn11515"void doSomething(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; context, int x)
 >\n"
11516"{\n"
11517"    context-&gt;save();\n"
11518"    // ändra grafiktillstånd\n"
11519"    // utför ritoperationer\n"
11520"    context-&gt;restore();\n"
11521"}"
568611522
5687#. (itstool) path: section/para11523#. (itstool) path: section/para
5688#: C/index-in.docbook:477611524#: C/index-in.docbook:4776
n5689msgid "The current state of a <classname>Cairo::Context</classname> can be savedn11525#, fuzzy
> to an internal stack of saved states and later be restored to the state it was  
>in when you saved it. To do this, use the <methodname>save()</methodname> method 
> and the <methodname>restore()</methodname> method. This can be useful if you ne 
>ed to temporarily change the line width and color (or any other graphics setting 
>) in order to draw something and then return to the previous settings. In this s 
>ituation, you could call <methodname>Cairo::Context::save()</methodname>, change 
> the graphics settings, draw the lines, and then call <methodname>Cairo::Context 
>::restore()</methodname> to restore the original graphics state. Multiple calls  
>to <methodname>save()</methodname> and <methodname>restore()</methodname> can be 
> nested; each call to <methodname>restore()</methodname> restores the state from 
> the matching paired <methodname>save()</methodname>. <_:tip-1/>" 
11526msgid ""
11527"The current state of a <classname>Cairo::Context</classname> can be saved to "
11528"an internal stack of saved states and later be restored to the state it was "
11529"in when you saved it. To do this, use the <methodname>save()</methodname> "
11530"method and the <methodname>restore()</methodname> method. This can be useful "
11531"if you need to temporarily change the line width and color (or any other "
11532"graphics setting) in order to draw something and then return to the previous "
11533"settings. In this situation, you could call <methodname>Cairo::Context::"
11534"save()</methodname>, change the graphics settings, draw the lines, and then "
11535"call <methodname>Cairo::Context::restore()</methodname> to restore the "
11536"original graphics state. Multiple calls to <methodname>save()</methodname> "
11537"and <methodname>restore()</methodname> can be nested; each call to "
11538"<methodname>restore()</methodname> restores the state from the matching "
11539"paired <methodname>save()</methodname>. <_:tip-1/>"
5690msgstr ""11540msgstr ""
nn11541"Aktuellt tillstånd för en <classname>Cairo::Context</classname> kan sparas "
11542"till en intern stack med sparade tillstånd och sedan återställas till "
11543"tillståndet den var i när du sparade den. För att göra detta använder du "
11544"metoderna <methodname>save()</methodname> och <methodname>restore()</"
11545"methodname>. Detta kan vara användbart om du tillfälligt behöver ändra "
11546"linjebredden och färgen (eller någon annan grafikinställning) för att rita "
11547"något och sedan återgå till de tidigare inställningarna. I denna situation "
11548"bör du anropa <methodname>Cairo::Context::save()</methodname>, ändra "
11549"grafikinställningarna, rita linjerna, och sedan anropa <methodname>Cairo::"
11550"Context::restore()</methodname> för att återställa det ursprungliga "
11551"grafiktillståndet. Flera anrop till <methodname>save()</methodname> och "
11552"<methodname>restore()</methodname> kan nästas; varje anrop till "
11553"<methodname>restore()</methodname> återställer tillståndet från den "
11554"matchande <methodname>save()</methodname> i paret. <_:tip-1/>"
569111555
5692#. (itstool) path: section/para11556#. (itstool) path: section/para
5693#: C/index-in.docbook:480811557#: C/index-in.docbook:4808
n5694msgid "The draw function that you set with a call to <methodname>set_draw_func()n11558msgid ""
></methodname> is called with a Cairo context that you shall use for drawing in t 
>he <classname>Gtk::DrawingArea</classname> widget. It is not necessary to save a 
>nd restore this Cairo context in the draw function." 
11559"The draw function that you set with a call to <methodname>set_draw_func()</"
11560"methodname> is called with a Cairo context that you shall use for drawing in "
11561"the <classname>Gtk::DrawingArea</classname> widget. It is not necessary to "
11562"save and restore this Cairo context in the draw function."
5695msgstr ""11563msgstr ""
nn11564"Ritfunktionen som du ställer in med ett anrop till "
11565"<methodname>set_draw_func()</methodname> anropas med en Cairo-kontext som du "
11566"ska använda för att rita i <classname>Gtk::DrawingArea</classname>-"
11567"komponenten. Det är inte nödvändigt att spara och återställa denna Cairo-"
11568"kontext i ritfunktionen."
569611569
5697#. (itstool) path: section/title11570#. (itstool) path: section/title
5698#: C/index-in.docbook:481611571#: C/index-in.docbook:4816
5699msgid "Drawing Straight Lines"11572msgid "Drawing Straight Lines"
n5700msgstr ""n11573msgstr "Rita raka linjer"
570111574
5702#. (itstool) path: tip/para11575#. (itstool) path: tip/para
5703#: C/index-in.docbook:482511576#: C/index-in.docbook:4825
n5704msgid "Since the Cairo graphics library was written with support for multiple oun11577#, fuzzy
>tput targets (the X window system, PNG images, OpenGL, etc), there is a distinct 
>ion between user-space and device-space coordinates. The mapping between these t 
>wo coordinate systems defaults to one-to-one so that integer values map roughly  
>to pixels on the screen, but this setting can be adjusted if desired. Sometimes  
>it may be useful to scale the coordinates so that the full width and height of a 
> window both range from 0 to 1 (the 'unit square') or some other mapping that wo 
>rks for your application. This can be done with the <methodname>Cairo::Context:: 
>scale()</methodname> function." 
11578msgid ""
11579"Since the Cairo graphics library was written with support for multiple "
11580"output targets (the X window system, PNG images, OpenGL, etc), there is a "
11581"distinction between user-space and device-space coordinates. The mapping "
11582"between these two coordinate systems defaults to one-to-one so that integer "
11583"values map roughly to pixels on the screen, but this setting can be adjusted "
11584"if desired. Sometimes it may be useful to scale the coordinates so that the "
11585"full width and height of a window both range from 0 to 1 (the 'unit square') "
11586"or some other mapping that works for your application. This can be done with "
11587"the <methodname>Cairo::Context::scale()</methodname> function."
5705msgstr ""11588msgstr ""
nn11589"Eftersom Cairo-grafikbiblioteket skrivits med stöd för flera utmatningsmål "
11590"(X-fönstersystemet, PNG-bilder, OpenGL o.s.v.), så görs skillnad mellan "
11591"koordinater i användar- och enhetsrymden. Mappningen mellan dessa två "
11592"koordinatsystem är som standard ett-till-ett så att heltalsvärden grovt "
11593"motsvarar bildpunkter på skärmen, men denna inställning kan justeras om så "
11594"önskas. Ibland kan det vara användbart att skala koordinaterna så att hela "
11595"bredden och höjden för ett fönster båda har intervallet 0 till 1 "
11596"(”enhetskvadraten”) eller någon annan mappning som fungerar för ditt "
11597"program. Detta kan göras med funktionen <methodname>Cairo::Context::scale()</"
11598"methodname>."
570611599
5707#. (itstool) path: section/para11600#. (itstool) path: section/para
5708#: C/index-in.docbook:481711601#: C/index-in.docbook:4817
n5709msgid "Now that we understand the basics of the Cairo graphics library, we're aln11602msgid ""
>most ready to start drawing. We'll start with the simplest of drawing elements:  
>the straight line. But first you need to know a little bit about Cairo's coordin 
>ate system. The origin of the Cairo coordinate system is located in the upper-le 
>ft corner of the window with positive x values to the right and positive y value 
>s going down. <_:tip-1/>" 
11603"Now that we understand the basics of the Cairo graphics library, we're "
11604"almost ready to start drawing. We'll start with the simplest of drawing "
11605"elements: the straight line. But first you need to know a little bit about "
11606"Cairo's coordinate system. The origin of the Cairo coordinate system is "
11607"located in the upper-left corner of the window with positive x values to the "
11608"right and positive y values going down. <_:tip-1/>"
5710msgstr ""11609msgstr ""
nn11610"Nu då vi förstå grunderna hos Cairo-grafikbiblioteket är vi nästan klara att "
11611"börja rita. Vi börjar med det enklaste av ritelement: den raka linjen. Men "
11612"först behöver du känna till lite om Cairos koordinatsystem. Origo för Cairos "
11613"koordinatsystem finns i fönstrets övre vänstra hörn med positiva x-värden "
11614"till höger och positiva y-värden nedåt. <_:tip-1/>"
571111615
5712#. (itstool) path: section/para11616#. (itstool) path: section/para
5713#: C/index-in.docbook:484111617#: C/index-in.docbook:4841
n5714msgid "In this example, we'll construct a small but fully functional <application11618#, fuzzy
>n>gtkmm</application> program and draw some lines into the window. The lines are 
> drawn by creating a path and then stroking it. A path is created using the func 
>tions <methodname>Cairo::Context::move_to()</methodname> and <methodname>Cairo:: 
>Context::line_to()</methodname>. The function <methodname>move_to()</methodname> 
> is similar to the act of lifting your pen off of the paper and placing it somew 
>here else -- no line is drawn between the point you were at and the point you mo 
>ved to. To draw a line between two points, use the <methodname>line_to()</method 
>name> function." 
11619msgid ""
11620"In this example, we'll construct a small but fully functional "
11621"<application>gtkmm</application> program and draw some lines into the "
11622"window. The lines are drawn by creating a path and then stroking it. A path "
11623"is created using the functions <methodname>Cairo::Context::move_to()</"
11624"methodname> and <methodname>Cairo::Context::line_to()</methodname>. The "
11625"function <methodname>move_to()</methodname> is similar to the act of lifting "
11626"your pen off of the paper and placing it somewhere else -- no line is drawn "
11627"between the point you were at and the point you moved to. To draw a line "
11628"between two points, use the <methodname>line_to()</methodname> function."
5715msgstr ""11629msgstr ""
nn11630"I detta exempel kommer vi konstruera ett litet men fullt fungerande "
11631"<application>gtkmm</application>-program och rita några linjer i fönstret. "
11632"Linjerna ritas genom att skapa en bana och sedan stryka längs den. En bana "
11633"skapas med funktionerna <methodname>Cairo::Context::move_to()</methodname> "
11634"och <methodname>Cairo::Context::line_to()</methodname>. Funktionen "
11635"<methodname>move_to()</methodname> liknar att lyfta din penna från papperet "
11636"och placera den någon annanstans -- ingen linje ritas mellan punkten du var "
11637"på och punkten du flyttade till. För att rita en linje mellan två punkter "
11638"använder du funktionen <methodname>line_to()</methodname>."
571611639
5717#. (itstool) path: section/para11640#. (itstool) path: section/para
5718#: C/index-in.docbook:485311641#: C/index-in.docbook:4853
n5719msgid "After you've finished creating your path, you still haven't drawn anythinn11642#, fuzzy
>g visible yet. To make the path visible, you must use the function <methodname>s 
>troke()</methodname> which will stroke the current path with the line width and  
>style specified in your <classname>Cairo::Context</classname> object. After stro 
>king, the current path will be cleared so that you can start on your next path." 
11643msgid ""
11644"After you've finished creating your path, you still haven't drawn anything "
11645"visible yet. To make the path visible, you must use the function "
11646"<methodname>stroke()</methodname> which will stroke the current path with "
11647"the line width and style specified in your <classname>Cairo::Context</"
11648"classname> object. After stroking, the current path will be cleared so that "
11649"you can start on your next path."
5720msgstr ""11650msgstr ""
nn11651"Efter att du slutat skapa din bana har du fortfarande inte ritat något som "
11652"är synligt. För att göra banan synlig måste du använda funktionen "
11653"<methodname>stroke()</methodname> som kommer stryka den aktuella banan med "
11654"linjebredden och stilen som angivits i ditt <classname>Cairo::Context</"
11655"classname>-objekt. Efter att hu strukit kommer den aktuella banan rensas så "
11656"du kan börja på din nästa bana."
572111657
5722#. (itstool) path: tip/para11658#. (itstool) path: tip/para
5723#: C/index-in.docbook:486211659#: C/index-in.docbook:4862
n5724msgid "Many Cairo drawing functions have a <methodname>_preserve()</methodname> n11660#, fuzzy
>variant. Normally drawing functions such as <methodname>clip()</methodname>, <me 
>thodname>fill()</methodname>, or <methodname>stroke()</methodname> will clear th 
>e current path. If you use the <methodname>_preserve()</methodname> variant, the 
> current path will be retained so that you can use the same path with the next d 
>rawing function." 
11661msgid ""
11662"Many Cairo drawing functions have a <methodname>_preserve()</methodname> "
11663"variant. Normally drawing functions such as <methodname>clip()</methodname>, "
11664"<methodname>fill()</methodname>, or <methodname>stroke()</methodname> will "
11665"clear the current path. If you use the <methodname>_preserve()</methodname> "
11666"variant, the current path will be retained so that you can use the same path "
11667"with the next drawing function."
5725msgstr ""11668msgstr ""
nn11669"Många Cairo-ritfunktioner har en <methodname>_preserve()</methodname>-"
11670"variant. Vanligen kommer ritfunktioner som <methodname>clip()</methodname>, "
11671"<methodname>fill()</methodname> eller <methodname>stroke()</methodname> "
11672"rensa den aktuella banan. Om du använder <methodname>_preserve()</"
11673"methodname>-varianten kommer den aktuella banan bevaras så du kan använda "
11674"samma bana med nästa ritfunktion."
572611675
5727#. (itstool) path: figure/title11676#. (itstool) path: figure/title
5728#: C/index-in.docbook:487211677#: C/index-in.docbook:4872
5729msgid "Drawing Area - Lines"11678msgid "Drawing Area - Lines"
n5730msgstr ""n11679msgstr "Rityta - Linjer"
573111680
5732#. (itstool) path: imageobject/imagedata11681#. (itstool) path: imageobject/imagedata
5733#. This is a reference to an external file such as an image or video. When11682#. This is a reference to an external file such as an image or video. When
5734#. the file changes, the md5 hash will change to let you know you need to11683#. the file changes, the md5 hash will change to let you know you need to
5735#. update your localized copy. The msgstr is not used at all. Set it to11684#. update your localized copy. The msgstr is not used at all. Set it to
5736#. whatever you like once you have updated your copy of the file.11685#. whatever you like once you have updated your copy of the file.
5737#: C/index-in.docbook:487411686#: C/index-in.docbook:4874
5738msgctxt "_"11687msgctxt "_"
n5739msgid "external ref='figures/drawingarea_lines.png' md5='3e205f8303890e4eb2ea884n11688msgid ""
>87e8633e7'" 
11689"external ref='figures/drawingarea_lines.png' "
11690"md5='3e205f8303890e4eb2ea88487e8633e7'"
5740msgstr ""11691msgstr ""
nn11692"external ref='figures/drawingarea_lines.png' "
11693"md5='3e205f8303890e4eb2ea88487e8633e7'"
574111694
5742#. (itstool) path: section/para11695#. (itstool) path: section/para
5743#: C/index-in.docbook:487811696#: C/index-in.docbook:4878
n5744msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11697msgid ""
>e/master/examples/book/drawingarea/simple\">Source Code</link>" 
11698"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11699"master/examples/book/drawingarea/simple\">Source Code</link>"
5745msgstr ""11700msgstr ""
nn11701"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11702"master/examples/book/drawingarea/simple\">Källkod</link>"
574611703
5747#. (itstool) path: section/para11704#. (itstool) path: section/para
5748#: C/index-in.docbook:488011705#: C/index-in.docbook:4880
n5749msgid "This program contains a single class, <classname>MyArea</classname>, whicn11706#, fuzzy
>h is a subclass of <classname>Gtk::DrawingArea</classname> and contains an <meth 
>odname>on_draw()</methodname> member function. This function becomes the draw fu 
>nction by a call to <methodname>set_draw_func()</methodname> in <classname>MyAre 
>a</classname>'s constructor. <methodname>on_draw()</methodname> is then called w 
>henever the image in the drawing area needs to be redrawn. It is passed a <class 
>name>Cairo::RefPtr</classname> pointer to a <classname>Cairo::Context</classname 
>> that we use for the drawing. The actual drawing code sets the color we want to 
> use for drawing by using <methodname>set_source_rgb()</methodname> which takes  
>arguments defining the Red, Green, and Blue components of the desired color (val 
>id values are between 0 and 1). After setting the color, we created a new path u 
>sing the functions <methodname>move_to()</methodname> and <methodname>line_to()< 
>/methodname>, and then stroked this path with <methodname>stroke()</methodname>. 
>" 
11707msgid ""
11708"This program contains a single class, <classname>MyArea</classname>, which "
11709"is a subclass of <classname>Gtk::DrawingArea</classname> and contains an "
11710"<methodname>on_draw()</methodname> member function. This function becomes "
11711"the draw function by a call to <methodname>set_draw_func()</methodname> in "
11712"<classname>MyArea</classname>'s constructor. <methodname>on_draw()</"
11713"methodname> is then called whenever the image in the drawing area needs to "
11714"be redrawn. It is passed a <classname>Cairo::RefPtr</classname> pointer to a "
11715"<classname>Cairo::Context</classname> that we use for the drawing. The "
11716"actual drawing code sets the color we want to use for drawing by using "
11717"<methodname>set_source_rgb()</methodname> which takes arguments defining the "
11718"Red, Green, and Blue components of the desired color (valid values are "
11719"between 0 and 1). After setting the color, we created a new path using the "
11720"functions <methodname>move_to()</methodname> and <methodname>line_to()</"
11721"methodname>, and then stroked this path with <methodname>stroke()</"
11722"methodname>."
5750msgstr ""11723msgstr ""
nn11724"Detta program innehåller en ensam klass, <classname>MyArea</classname>, som "
11725"är en underklass till <classname>Gtk::DrawingArea</classname> och innehåller "
11726"en <methodname>on_draw()</methodname>-medlemsfunktion. Denna funktion blir "
11727"ritfunktionen av ett anrop till <methodname>set_draw_func()</methodname> i "
11728"<classname>MyArea</classname>s konstruktor. <methodname>on_draw()</"
11729"methodname> anropas sedan närhelst bilden i ritytan behöver ritas om. Den "
11730"skickas en <classname>Cairo::RefPtr</classname>-pekare till en "
11731"<classname>Cairo::Context</classname> som vi använder för ritandet. Koden "
11732"som faktiskt ritar ställer in färgen vi vill använda för ritandet genom att "
11733"använda <methodname>set_source_rgb()</methodname> vilken tar argument som "
11734"definierar komponenterna Red, Green och Blue för den önskade färgen (giltiga "
11735"värden är mellan 0 och 1). Efter att färgen ställts in skapade vi en ny bana "
11736"med funktionerna <methodname>move_to()</methodname> och "
11737"<methodname>line_to()</methodname>, och strök sedan denna bana med "
11738"<methodname>stroke()</methodname>."
575111739
5752#. (itstool) path: tip/title11740#. (itstool) path: tip/title
5753#: C/index-in.docbook:489911741#: C/index-in.docbook:4899
5754msgid "Drawing with relative coordinates"11742msgid "Drawing with relative coordinates"
n5755msgstr ""n11743msgstr "Rita med relativa koordinater"
575611744
5757#. (itstool) path: tip/para11745#. (itstool) path: tip/para
5758#: C/index-in.docbook:490011746#: C/index-in.docbook:4900
n5759msgid "In the example above we drew everything using absolute coordinates. You cn11747msgid ""
>an also draw using relative coordinates. For a straight line, this is done with  
>the function <methodname>Cairo::Context::rel_line_to()</methodname>." 
11748"In the example above we drew everything using absolute coordinates. You can "
11749"also draw using relative coordinates. For a straight line, this is done with "
11750"the function <methodname>Cairo::Context::rel_line_to()</methodname>."
5760msgstr ""11751msgstr ""
nn11752"I exemplet ovan ritade vi allt med absoluta koordinater. Du kan också rita "
11753"med relativa koordinater. För en rak linje görs detta med funktionen "
11754"<methodname>Cairo::Context::rel_line_to()</methodname>."
576111755
5762#. (itstool) path: section/title11756#. (itstool) path: section/title
5763#: C/index-in.docbook:490711757#: C/index-in.docbook:4907
5764msgid "Line styles"11758msgid "Line styles"
n5765msgstr ""n11759msgstr "Linjestilar"
576611760
5767#. (itstool) path: section/para11761#. (itstool) path: section/para
5768#: C/index-in.docbook:490811762#: C/index-in.docbook:4908
n5769msgid "In addition to drawing basic straight lines, there are a number of thingsn11763msgid ""
> that you can customize about a line. You've already seen examples of setting a  
>line's color and width, but there are others as well." 
11764"In addition to drawing basic straight lines, there are a number of things "
11765"that you can customize about a line. You've already seen examples of setting "
11766"a line's color and width, but there are others as well."
5770msgstr ""11767msgstr ""
nn11768"Utöver att rita enkla raka linjer så finns det ett antal saker som du kan "
11769"anpassa med en linje. Du har redan sett exempel på att ställa in en linjes "
11770"färg och bredd, men det finns även annat."
577111771
nn11772# TODO: are show*n*
5772#. (itstool) path: section/para11773#. (itstool) path: section/para
5773#: C/index-in.docbook:491411774#: C/index-in.docbook:4914
n5774msgid "If you've drawn a series of lines that form a path, you may want them to n11775#, fuzzy
>join together in a certain way. Cairo offers three different ways to join lines  
>together: Miter, Bevel, and Round. These are show below:" 
11776msgid ""
11777"If you've drawn a series of lines that form a path, you may want them to "
11778"join together in a certain way. Cairo offers three different ways to join "
11779"lines together: Miter, Bevel, and Round. These are show below:"
5775msgstr ""11780msgstr ""
nn11781"Om du ritar en serie linjer som formar en bana så kan du vilja koppla samman "
11782"dem på ett visst sätt. Cairo erbjuder tre olika sätt att koppla samman "
11783"linjer: Miter, Bevel, och Round. Dessa visas nedan:"
577611784
5777#. (itstool) path: figure/title11785#. (itstool) path: figure/title
5778#: C/index-in.docbook:492111786#: C/index-in.docbook:4921
5779msgid "Different join types in Cairo"11787msgid "Different join types in Cairo"
n5780msgstr ""n11788msgstr "Olika sammankopplingstyper i Cairo"
578111789
5782#. (itstool) path: imageobject/imagedata11790#. (itstool) path: imageobject/imagedata
5783#. This is a reference to an external file such as an image or video. When11791#. This is a reference to an external file such as an image or video. When
5784#. the file changes, the md5 hash will change to let you know you need to11792#. the file changes, the md5 hash will change to let you know you need to
5785#. update your localized copy. The msgstr is not used at all. Set it to11793#. update your localized copy. The msgstr is not used at all. Set it to
5786#. whatever you like once you have updated your copy of the file.11794#. whatever you like once you have updated your copy of the file.
5787#: C/index-in.docbook:492311795#: C/index-in.docbook:4923
5788msgctxt "_"11796msgctxt "_"
nn11797msgid ""
5789msgid "external ref='figures/cairo_joins.png' md5='1b1e2a28e976039f1e4a0aa523ac411798"external ref='figures/cairo_joins.png' md5='1b1e2a28e976039f1e4a0aa523ac40fb'"
>0fb'" 
5790msgstr ""11799msgstr ""
nn11800"external ref='figures/cairo_joins.png' md5='1b1e2a28e976039f1e4a0aa523ac40fb'"
579111801
5792#. (itstool) path: section/para11802#. (itstool) path: section/para
5793#: C/index-in.docbook:492611803#: C/index-in.docbook:4926
nn11804msgid ""
5794msgid "The line join style is set using the function <methodname>Cairo::Context:11805"The line join style is set using the function <methodname>Cairo::Context::"
>:set_line_join()</methodname>." 
11806"set_line_join()</methodname>."
5795msgstr ""11807msgstr ""
nn11808"Linjesammankopplingsstilen ställs in med funktionen <methodname>Cairo::"
11809"Context::set_line_join()</methodname>."
579611810
5797#. (itstool) path: section/para11811#. (itstool) path: section/para
5798#: C/index-in.docbook:493011812#: C/index-in.docbook:4930
n5799msgid "Line ends can have different styles as well. The default style is for then11813#, fuzzy
> line to start and stop exactly at the destination points of the line. This is c 
>alled a Butt cap. The other options are Round (uses a round ending, with the cen 
>ter of the circle at the end point) or Square (uses a squared ending, with the c 
>enter of the square at the end point). This setting is set using the function <m 
>ethodname>Cairo::Context::set_line_cap()</methodname>." 
11814msgid ""
11815"Line ends can have different styles as well. The default style is for the "
11816"line to start and stop exactly at the destination points of the line. This "
11817"is called a Butt cap. The other options are Round (uses a round ending, with "
11818"the center of the circle at the end point) or Square (uses a squared ending, "
11819"with the center of the square at the end point). This setting is set using "
11820"the function <methodname>Cairo::Context::set_line_cap()</methodname>."
5800msgstr ""11821msgstr ""
nn11822"Linjeslut kan också ha olika stilar. Standardstilen är att linjen börjar och "
11823"slutar exakt på linjens målpunkter. Detta kallas en Butt cap. De andra "
11824"alternativen är Round (använder en rund ände, med cirkelns centrum på "
11825"ändpunkten) eller Square (använder en kvadratisk ände, med kvadratens "
11826"centrum på ändpunkten). Denna inställning sätts med funktionen "
11827"<methodname>Cairo::Context::set_line_cap()</methodname>."
580111828
5802#. (itstool) path: section/para11829#. (itstool) path: section/para
5803#: C/index-in.docbook:494011830#: C/index-in.docbook:4940
n5804msgid "There are other things you can customize as well, including creating dashn11831#, fuzzy
>ed lines and other things. For more information, see the Cairo API documentation 
>. Dashed lines are shown in the example in the <link linkend=\"cairo-example-cur 
>ves\">Drawing Curved Lines</link> section." 
11832msgid ""
11833"There are other things you can customize as well, including creating dashed "
11834"lines and other things. For more information, see the Cairo API "
11835"documentation. Dashed lines are shown in the example in the <link "
11836"linkend=\"cairo-example-curves\">Drawing Curved Lines</link> section."
5805msgstr ""11837msgstr ""
nn11838"Det finns även andra saker du kan anpassa, som att skapa och andra saker. Se "
11839"Cairos API-dokumentation för mer information."
580611840
5807#. (itstool) path: section/title11841#. (itstool) path: section/title
5808#: C/index-in.docbook:495011842#: C/index-in.docbook:4950
5809msgid "Drawing thin lines"11843msgid "Drawing thin lines"
n5810msgstr ""n11844msgstr "Rita tunna linjer"
581111845
5812#. (itstool) path: section/para11846#. (itstool) path: section/para
5813#: C/index-in.docbook:495111847#: C/index-in.docbook:4951
n5814msgid "If you try to draw one pixel wide lines, you may notice that the line somn11848#, fuzzy
>etimes comes up blurred and wider than it ought to be. This happens because Cair 
>o will try to draw from the selected position, to both sides (half to each), so  
>if you're positioned right on the intersection of the pixels, and want a one pix 
>el wide line, Cairo will try to use half of each adjacent pixel, which isn't pos 
>sible (a pixel is the smallest unit possible). This happens when the width of th 
>e line is an odd number of pixels (not just one pixel)." 
11849msgid ""
11850"If you try to draw one pixel wide lines, you may notice that the line "
11851"sometimes comes up blurred and wider than it ought to be. This happens "
11852"because Cairo will try to draw from the selected position, to both sides "
11853"(half to each), so if you're positioned right on the intersection of the "
11854"pixels, and want a one pixel wide line, Cairo will try to use half of each "
11855"adjacent pixel, which isn't possible (a pixel is the smallest unit "
11856"possible). This happens when the width of the line is an odd number of "
11857"pixels (not just one pixel)."
5815msgstr ""11858msgstr ""
nn11859"Om du försöker rita en bildpunkt breda linjer kan du upptäcka att linjen "
11860"ibland blir suddig och bredare än den borde vara. Detta inträffar för att "
11861"Cairo kommer försöka rita från den valda positionen, till båda sidor "
11862"(hälften till båda), så om du är positionerad till höger om bildpunkternas "
11863"mötespunkt, och vill ha en en bildpunkt bred linje, så kommer Cairo försöka "
11864"använda hälften av varje angränsande bildpunkt, vilket inte är möjligt (en "
11865"bildpunkt är den minsta möjliga enheten). Detta händer när bredden på linjen "
11866"är ett udda antal bildpunkter (inte bara vid en bildpunkt)."
581611867
5817#. (itstool) path: section/para11868#. (itstool) path: section/para
5818#: C/index-in.docbook:496111869#: C/index-in.docbook:4961
n5819msgid "The trick is to position in the middle of the pixel where you want the lin11870#, fuzzy
>ne to be drawn, and thus guaranteeing you get the desired results. See <link xli 
>nk:href=\"http://cairographics.org/FAQ/#sharp_lines\">Cairo FAQ</link>." 
11871msgid ""
11872"The trick is to position in the middle of the pixel where you want the line "
11873"to be drawn, and thus guaranteeing you get the desired results. See <link "
11874"xlink:href=\"http://cairographics.org/FAQ/#sharp_lines\">Cairo FAQ</link>."
5820msgstr ""11875msgstr ""
nn11876"Tricket är att positionera dig i mitten av bildpunkten där du vill att "
11877"linjen ska dras, och därmed garantera att du får de önskade resultaten. Se "
11878"<link xlink:href=\"http://cairographics.org/FAQ/#sharp_lines\">frågor och "
11879"svar om Cairo</link>."
582111880
5822#. (itstool) path: figure/title11881#. (itstool) path: figure/title
5823#: C/index-in.docbook:496811882#: C/index-in.docbook:4968
5824msgid "Drawing Area - Thin Lines"11883msgid "Drawing Area - Thin Lines"
n5825msgstr ""n11884msgstr "Rityta - Tunna linjer"
582611885
5827#. (itstool) path: imageobject/imagedata11886#. (itstool) path: imageobject/imagedata
5828#. This is a reference to an external file such as an image or video. When11887#. This is a reference to an external file such as an image or video. When
5829#. the file changes, the md5 hash will change to let you know you need to11888#. the file changes, the md5 hash will change to let you know you need to
5830#. update your localized copy. The msgstr is not used at all. Set it to11889#. update your localized copy. The msgstr is not used at all. Set it to
5831#. whatever you like once you have updated your copy of the file.11890#. whatever you like once you have updated your copy of the file.
5832#: C/index-in.docbook:497011891#: C/index-in.docbook:4970
nn11892#, fuzzy
5833msgctxt "_"11893msgctxt "_"
n5834msgid "external ref='figures/drawingarea_thin_lines.png' md5='589cbad88ee60c4650n11894msgid ""
>3e89c4318822a1'" 
11895"external ref='figures/drawingarea_thin_lines.png' "
11896"md5='589cbad88ee60c46503e89c4318822a1'"
5835msgstr ""11897msgstr ""
nn11898"external ref='figures/drawingarea_thin_lines.png' "
11899"md5='589cbad88ee60c46503e89c4318822a1'"
583611900
5837#. (itstool) path: section/para11901#. (itstool) path: section/para
5838#: C/index-in.docbook:497411902#: C/index-in.docbook:4974
n5839msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11903msgid ""
>e/master/examples/book/drawingarea/thin_lines\">Source Code</link>" 
11904"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11905"master/examples/book/drawingarea/thin_lines\">Source Code</link>"
5840msgstr ""11906msgstr ""
nn11907"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11908"master/examples/book/drawingarea/thin_lines\">Källkod</link>"
584111909
5842#. (itstool) path: section/title11910#. (itstool) path: section/title
5843#: C/index-in.docbook:497911911#: C/index-in.docbook:4979
nn11912#, fuzzy
5844msgid "Drawing Curved Lines"11913msgid "Drawing Curved Lines"
n5845msgstr ""n11914msgstr "Rita krökta linjer"
584611915
5847#. (itstool) path: section/para11916#. (itstool) path: section/para
5848#: C/index-in.docbook:498011917#: C/index-in.docbook:4980
n5849msgid "In addition to drawing straight lines Cairo allows you to easily draw curn11918#, fuzzy
>ved lines (technically a cubic Bézier spline) using the <methodname>Cairo::Conte 
>xt::curve_to()</methodname> and <methodname>Cairo::Context::rel_curve_to()</meth 
>odname> functions. These functions take coordinates for a destination point as w 
>ell as coordinates for two 'control' points. This is best explained using an exa 
>mple, so let's dive in." 
11919msgid ""
11920"In addition to drawing straight lines Cairo allows you to easily draw curved "
11921"lines (technically a cubic Bézier spline) using the <methodname>Cairo::"
11922"Context::curve_to()</methodname> and <methodname>Cairo::Context::"
11923"rel_curve_to()</methodname> functions. These functions take coordinates for "
11924"a destination point as well as coordinates for two 'control' points. This is "
11925"best explained using an example, so let's dive in."
5850msgstr ""11926msgstr ""
nn11927"Utöver att rita raka linjer låter Cairo dig lätt rita krökta linjer "
11928"(tekniskt sett en kubisk Bézier-spline) med funktionerna <methodname>Cairo::"
11929"Context::curve_to()</methodname> och <methodname>Cairo::Context::"
11930"rel_curve_to()</methodname>. Dessa funktioner tar koordinater för en "
11931"målpunkt såväl som koordinater för två ”kontroll”-punkter. Detta förklaras "
11932"bäst med ett exempel, så nu kör vi."
585111933
5852#. (itstool) path: section/para11934#. (itstool) path: section/para
5853#: C/index-in.docbook:499211935#: C/index-in.docbook:4992
nn11936#, fuzzy
11937msgid ""
5854msgid "This simple application draws a curve with Cairo and displays the control11938"This simple application draws a curve with Cairo and displays the control "
> points for each end of the curve." 
11939"points for each end of the curve."
5855msgstr ""11940msgstr ""
nn11941"Detta enkla program ritar en kurva med Cairo och visar kontrollpunkterna för "
11942"varje ände av kurvan."
585611943
5857#. (itstool) path: figure/title11944#. (itstool) path: figure/title
5858#: C/index-in.docbook:499711945#: C/index-in.docbook:4997
nn11946#, fuzzy
11947#| msgid "Drawing Area - Arcs"
5859msgid "Drawing Area - Curve"11948msgid "Drawing Area - Curve"
n5860msgstr ""n11949msgstr "Rityta - Bågar"
586111950
5862#. (itstool) path: imageobject/imagedata11951#. (itstool) path: imageobject/imagedata
5863#. This is a reference to an external file such as an image or video. When11952#. This is a reference to an external file such as an image or video. When
5864#. the file changes, the md5 hash will change to let you know you need to11953#. the file changes, the md5 hash will change to let you know you need to
5865#. update your localized copy. The msgstr is not used at all. Set it to11954#. update your localized copy. The msgstr is not used at all. Set it to
5866#. whatever you like once you have updated your copy of the file.11955#. whatever you like once you have updated your copy of the file.
5867#: C/index-in.docbook:499911956#: C/index-in.docbook:4999
nn11957#, fuzzy
11958#| msgctxt "_"
11959#| msgid ""
11960#| "external ref='figures/drawingarea_curve.png' "
11961#| "md5='1a9cdaaad2b17b89d8450f949c1ddef5'"
5868msgctxt "_"11962msgctxt "_"
n5869msgid "external ref='figures/drawingarea_curve.png' md5='3f6b8ea94450c93678545afn11963msgid ""
>3ab6b7e6d'" 
11964"external ref='figures/drawingarea_curve.png' "
11965"md5='3f6b8ea94450c93678545af3ab6b7e6d'"
5870msgstr ""11966msgstr ""
nn11967"external ref='figures/drawingarea_curve.png' "
11968"md5='1a9cdaaad2b17b89d8450f949c1ddef5'"
587111969
5872#. (itstool) path: section/para11970#. (itstool) path: section/para
5873#: C/index-in.docbook:500311971#: C/index-in.docbook:5003
n5874msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren11972msgid ""
>e/master/examples/book/drawingarea/curve\">Source Code</link>" 
11973"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11974"master/examples/book/drawingarea/curve\">Source Code</link>"
5875msgstr ""11975msgstr ""
nn11976"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
11977"master/examples/book/drawingarea/curve\">Källkod</link>"
587611978
5877#. (itstool) path: section/para11979#. (itstool) path: section/para
5878#: C/index-in.docbook:500411980#: C/index-in.docbook:5004
n5879msgid "The only difference between this example and the straight line example isn11981msgid ""
> in the <methodname>on_draw()</methodname> function, but there are a few new con 
>cepts and functions introduced here, so let's examine them briefly." 
11982"The only difference between this example and the straight line example is in "
11983"the <methodname>on_draw()</methodname> function, but there are a few new "
11984"concepts and functions introduced here, so let's examine them briefly."
5880msgstr ""11985msgstr ""
nn11986"Den enda skillnaden mellan detta exempel och exemplet för raka linjer är i "
11987"funktionen <methodname>on_draw()</methodname>, men några nya koncept och "
11988"funktioner introduceras här, så låt oss kort ta en titt på dem."
588111989
5882#. (itstool) path: section/para11990#. (itstool) path: section/para
5883#: C/index-in.docbook:501011991#: C/index-in.docbook:5010
n5884msgid "We make a call to <methodname>Cairo::Context::scale()</methodname>, passin11992#, fuzzy
>ng in the width and height of the drawing area. This scales the user-space coord 
>inate system such that the width and height of the widget are both equal to 1.0  
>'units'. There's no particular reason to scale the coordinate system in this cas 
>e, but sometimes it can make drawing operations easier." 
11993msgid ""
11994"We make a call to <methodname>Cairo::Context::scale()</methodname>, passing "
11995"in the width and height of the drawing area. This scales the user-space "
11996"coordinate system such that the width and height of the widget are both "
11997"equal to 1.0 'units'. There's no particular reason to scale the coordinate "
11998"system in this case, but sometimes it can make drawing operations easier."
5885msgstr ""11999msgstr ""
nn12000"Vi gör ett anrop till <methodname>Cairo::Context::scale()</methodname>, och "
12001"skickar med bredden och höjden för ritytan. Detta skalar användarrymdens "
12002"koordinatsystem så att bredden och höjden för komponenten båda motsvarar 1.0 "
12003"”enheter”. Det finns ingen specifik orsak att skala koordinatsystemet i "
12004"detta fall, men ibland kan det göra ritoperationer lättare."
588612005
5887#. (itstool) path: section/para12006#. (itstool) path: section/para
5888#: C/index-in.docbook:501912007#: C/index-in.docbook:5019
n5889msgid "The call to <methodname>Cairo::Context::curve_to()</methodname> should ben12008#, fuzzy
> fairly self-explanatory. The first pair of coordinates define the control point 
> for the beginning of the curve. The second set of coordinates define the contro 
>l point for the end of the curve, and the last set of coordinates define the des 
>tination point. To make the concept of control points a bit easier to visualize, 
> a line has been drawn from each control point to the end-point on the curve tha 
>t it is associated with. Note that these control point lines are both translucen 
>t. This is achieved with a variant of <methodname>set_source_rgb()</methodname>  
>called <methodname>set_source_rgba()</methodname>. This function takes a fourth  
>argument specifying the alpha value of the color (valid values are between 0 and 
> 1)." 
12009msgid ""
12010"The call to <methodname>Cairo::Context::curve_to()</methodname> should be "
12011"fairly self-explanatory. The first pair of coordinates define the control "
12012"point for the beginning of the curve. The second set of coordinates define "
12013"the control point for the end of the curve, and the last set of coordinates "
12014"define the destination point. To make the concept of control points a bit "
12015"easier to visualize, a line has been drawn from each control point to the "
12016"end-point on the curve that it is associated with. Note that these control "
12017"point lines are both translucent. This is achieved with a variant of "
12018"<methodname>set_source_rgb()</methodname> called "
12019"<methodname>set_source_rgba()</methodname>. This function takes a fourth "
12020"argument specifying the alpha value of the color (valid values are between 0 "
12021"and 1)."
5890msgstr ""12022msgstr ""
nn12023"Anropet till <methodname>Cairo::Context::curve_to()</methodname> bör vara "
12024"rätt självförklarande. Det första paret koordinater definierar "
12025"kontrollpunkten för början på kurvan. Den andra uppsättningen koordinater "
12026"definierar kontrollpunkten för slutet på kurvan, och den sista uppsättningen "
12027"koordinater definierar målpunkten. För att göra konceptet med "
12028"kontrollpunkter lite lättare att visualisera har en linje ritats från varje "
12029"kontrollpunkt till slutpunkten på kurvan som den är associerad med. "
12030"Observera att dess kontrollpunktslinjer båda är genomskinliga. Detta "
12031"åstadkoms med en variant av <methodname>set_source_rgb()</methodname> som "
12032"kallas <methodname>set_source_rgba()</methodname>. Denna funktion tar ett "
12033"fjärde argument som ange alfavärdet för färgen (giltiga värden är mellan 0 "
12034"och 1)."
589112035
5892#. (itstool) path: section/para12036#. (itstool) path: section/para
5893#: C/index-in.docbook:503412037#: C/index-in.docbook:5034
n5894msgid "The control point lines are dashed lines. These are just two possible varn12038msgid ""
>iations. Dashed lines can be more complicated. For instance the dashes can have  
>different lengths like in dash-dotted lines." 
12039"The control point lines are dashed lines. These are just two possible "
12040"variations. Dashed lines can be more complicated. For instance the dashes "
12041"can have different lengths like in dash-dotted lines."
5895msgstr ""12042msgstr ""
589612043
5897#. (itstool) path: section/title12044#. (itstool) path: section/title
5898#: C/index-in.docbook:504312045#: C/index-in.docbook:5043
5899msgid "Drawing Arcs and Circles"12046msgid "Drawing Arcs and Circles"
n5900msgstr ""n12047msgstr "Rita bågar och cirklar"
590112048
5902#. (itstool) path: section/para12049#. (itstool) path: section/para
5903#: C/index-in.docbook:504412050#: C/index-in.docbook:5044
n5904msgid "With Cairo, the same function is used to draw arcs, circles, or ellipses:n12051#, fuzzy
> <methodname>Cairo::Context::arc()</methodname>. This function takes five argume 
>nts. The first two are the coordinates of the center point of the arc, the third 
> argument is the radius of the arc, and the final two arguments define the start 
> and end angle of the arc. All angles are defined in radians, so drawing a circl 
>e is the same as drawing an arc from 0 to 2 * M_PI radians. An angle of 0 is in  
>the direction of the positive X axis (in user-space). An angle of M_PI/2 radians 
> (90 degrees) is in the direction of the positive Y axis (in user-space). Angles 
> increase in the direction from the positive X axis toward the positive Y axis.  
>So with the default transformation matrix, angles increase in a clockwise direct 
>ion. (Remember that the positive Y axis points downwards.)" 
12052msgid ""
12053"With Cairo, the same function is used to draw arcs, circles, or ellipses: "
12054"<methodname>Cairo::Context::arc()</methodname>. This function takes five "
12055"arguments. The first two are the coordinates of the center point of the arc, "
12056"the third argument is the radius of the arc, and the final two arguments "
12057"define the start and end angle of the arc. All angles are defined in "
12058"radians, so drawing a circle is the same as drawing an arc from 0 to 2 * "
12059"M_PI radians. An angle of 0 is in the direction of the positive X axis (in "
12060"user-space). An angle of M_PI/2 radians (90 degrees) is in the direction of "
12061"the positive Y axis (in user-space). Angles increase in the direction from "
12062"the positive X axis toward the positive Y axis. So with the default "
12063"transformation matrix, angles increase in a clockwise direction. (Remember "
12064"that the positive Y axis points downwards.)"
5905msgstr ""12065msgstr ""
nn12066"Med Cairo används samma funktion för att rita bågar, cirklar eller ellipser: "
12067"<methodname>Cairo::Context::arc()</methodname>. Denna funktion tar fem "
12068"argument. De första två är koordinaterna för bågen centrum, det tredje "
12069"argumentet är bågens radie, och de sista två argumenten definierar bågens "
12070"start- och slutvinkel. Alla vinklar definieras i radianer, så att rita en "
12071"cirkel är det samma som att rita en båge från 0 till 2 * M_PI radianer. En "
12072"vinkel på 0 är i den positive X-axelns riktning (i användarrymden). En "
12073"vinkel på M_PI/2 radianer (90 grader) är i den positive Y-axelns riktning (i "
12074"användarrymden). Vinklar ökar i riktningen från den positive X-axeln till "
12075"den positive Y-axeln. Så med standardtransformationsmatrisen ökar vinklar i "
12076"medurs riktning. (Kom ihåg att den positiva Y-axeln pekare nedåt.)"
590612077
5907#. (itstool) path: section/para12078#. (itstool) path: section/para
5908#: C/index-in.docbook:505912079#: C/index-in.docbook:5059
n5909msgid "To draw an ellipse, you can scale the current transformation matrix by din12080#, fuzzy
>fferent amounts in the X and Y directions. For example, to draw an ellipse with  
>center at <varname>x</varname>, <varname>y</varname> and size <varname>width</va 
>rname>, <varname>height</varname>:" 
12081msgid ""
12082"To draw an ellipse, you can scale the current transformation matrix by "
12083"different amounts in the X and Y directions. For example, to draw an ellipse "
12084"with center at <varname>x</varname>, <varname>y</varname> and size "
12085"<varname>width</varname>, <varname>height</varname>:"
5910msgstr ""12086msgstr ""
nn12087"För att rita en ellips kan du skala den aktuella transformationsmatrisen med "
12088"olika mängder i X- och Y-riktningarna. För att exempelvis rita en ellips med "
12089"centrum i <varname>x</varname>, <varname>y</varname> och storleken "
12090"<varname>width</varname>, <varname>height</varname>:"
591112091
5912#. (itstool) path: section/programlisting12092#. (itstool) path: section/programlisting
5913#: C/index-in.docbook:506512093#: C/index-in.docbook:5065
n5914#, no-wrapn12094#, fuzzy, no-wrap
5915msgid ""12095msgid ""
5916"<code>context-&gt;save();\n"12096"<code>context-&gt;save();\n"
5917"context-&gt;translate(x, y);\n"12097"context-&gt;translate(x, y);\n"
5918"context-&gt;scale(width / 2.0, height / 2.0);\n"12098"context-&gt;scale(width / 2.0, height / 2.0);\n"
5919"context-&gt;arc(0.0, 0.0, 1.0, 0.0, 2 * M_PI);\n"12099"context-&gt;arc(0.0, 0.0, 1.0, 0.0, 2 * M_PI);\n"
5920"context-&gt;restore();</code>"12100"context-&gt;restore();</code>"
5921msgstr ""12101msgstr ""
nn12102"context-&gt;save();\n"
12103"context-&gt;translate(x, y);\n"
12104"context-&gt;scale(width / 2.0, height / 2.0);\n"
12105"context-&gt;arc(0.0, 0.0, 1.0, 0.0, 2 * M_PI);\n"
12106"context-&gt;restore();"
592212107
5923#. (itstool) path: section/para12108#. (itstool) path: section/para
5924#: C/index-in.docbook:507312109#: C/index-in.docbook:5073
nn12110msgid ""
5925msgid "Here's an example of a simple program that draws an arc, a circle and an 12111"Here's an example of a simple program that draws an arc, a circle and an "
>ellipse into a drawing area." 
12112"ellipse into a drawing area."
5926msgstr ""12113msgstr ""
nn12114"Här är ett exempel på ett enkelt program som ritar en båge, en cirkel och en "
12115"ellips på en rityta."
592712116
5928#. (itstool) path: figure/title12117#. (itstool) path: figure/title
5929#: C/index-in.docbook:507812118#: C/index-in.docbook:5078
5930msgid "Drawing Area - Arcs"12119msgid "Drawing Area - Arcs"
n5931msgstr ""n12120msgstr "Rityta - Bågar"
593212121
5933#. (itstool) path: imageobject/imagedata12122#. (itstool) path: imageobject/imagedata
5934#. This is a reference to an external file such as an image or video. When12123#. This is a reference to an external file such as an image or video. When
5935#. the file changes, the md5 hash will change to let you know you need to12124#. the file changes, the md5 hash will change to let you know you need to
5936#. update your localized copy. The msgstr is not used at all. Set it to12125#. update your localized copy. The msgstr is not used at all. Set it to
5937#. whatever you like once you have updated your copy of the file.12126#. whatever you like once you have updated your copy of the file.
5938#: C/index-in.docbook:508012127#: C/index-in.docbook:5080
5939msgctxt "_"12128msgctxt "_"
n5940msgid "external ref='figures/drawingarea_arcs.png' md5='d94b40e33b9fab7ea9e2c870n12129msgid ""
>b97fcf0c'" 
12130"external ref='figures/drawingarea_arcs.png' "
12131"md5='d94b40e33b9fab7ea9e2c870b97fcf0c'"
5941msgstr ""12132msgstr ""
nn12133"external ref='figures/drawingarea_arcs.png' "
12134"md5='d94b40e33b9fab7ea9e2c870b97fcf0c'"
594212135
5943#. (itstool) path: section/para12136#. (itstool) path: section/para
5944#: C/index-in.docbook:508412137#: C/index-in.docbook:5084
n5945msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren12138msgid ""
>e/master/examples/book/drawingarea/arcs\">Source Code</link>" 
12139"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12140"master/examples/book/drawingarea/arcs\">Source Code</link>"
5946msgstr ""12141msgstr ""
nn12142"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12143"master/examples/book/drawingarea/arcs\">Källkod</link>"
594712144
5948#. (itstool) path: section/para12145#. (itstool) path: section/para
5949#: C/index-in.docbook:508612146#: C/index-in.docbook:5086
n5950msgid "There are a couple of things to note about this example code. Again, the n12147#, fuzzy
>only real difference between this example and the previous ones is the <methodna 
>me>on_draw()</methodname> function, so we'll limit our focus to that function. I 
>n addition, the first part of the function is nearly identical to the previous e 
>xamples, so we'll skip that portion." 
12148msgid ""
12149"There are a couple of things to note about this example code. Again, the "
12150"only real difference between this example and the previous ones is the "
12151"<methodname>on_draw()</methodname> function, so we'll limit our focus to "
12152"that function. In addition, the first part of the function is nearly "
12153"identical to the previous examples, so we'll skip that portion."
5951msgstr ""12154msgstr ""
nn12155"Det finns några saker att observera om denna exempelkod. Den enda riktiga "
12156"skillnaden mellan detta exempel och det föregående är återigen "
12157"<methodname>on_draw()</methodname>-funktionen, så vi kommer begränsa vårt "
12158"fokus till den funktionen. Vidare är funktionens första del nästan identisk "
12159"med de tidigare exemplen, så vi hoppar över den delen."
595212160
5953#. (itstool) path: section/para12161#. (itstool) path: section/para
5954#: C/index-in.docbook:509412162#: C/index-in.docbook:5094
n5955msgid "Note that in this case, we've expressed nearly everything in terms of then12163#, fuzzy
> height and width of the window, including the width of the lines. Because of th 
>is, when you resize the window, everything scales with the window. Also note tha 
>t there are three drawing sections in the function and each is wrapped with a <m 
>ethodname>save()</methodname>/<methodname>restore()</methodname> pair so that we 
>'re back at a known state after each drawing." 
12164msgid ""
12165"Note that in this case, we've expressed nearly everything in terms of the "
12166"height and width of the window, including the width of the lines. Because of "
12167"this, when you resize the window, everything scales with the window. Also "
12168"note that there are three drawing sections in the function and each is "
12169"wrapped with a <methodname>save()</methodname>/<methodname>restore()</"
12170"methodname> pair so that we're back at a known state after each drawing."
5956msgstr ""12171msgstr ""
nn12172"Observera att vi i detta fall uttryckt nästan allt i termer av fönstrets "
12173"höjd och bredd, inklusive linjebredden. På grund av detta så skalas allt med "
12174"fönstret då du ändrar storlek på det. Se också att det finns tre "
12175"ritfunktioner, och var och en omsluts av ett par <methodname>save()</"
12176"methodname>/<methodname>restore()</methodname> så att vi är tillbaka i ett "
12177"känt tillstånd efter varje utritning."
595712178
5958#. (itstool) path: section/para12179#. (itstool) path: section/para
5959#: C/index-in.docbook:510312180#: C/index-in.docbook:5103
n5960msgid "The section for drawing an arc introduces one new function, <methodname>cn12181#, fuzzy
>lose_path()</methodname>. This function will in effect draw a straight line from 
> the current point back to the first point in the path. There is a significant d 
>ifference between calling <methodname>close_path()</methodname> and manually dra 
>wing a line back to the starting point, however. If you use <methodname>close_pa 
>th()</methodname>, the lines will be nicely joined together. If you use <methodn 
>ame>line_to()</methodname> instead, the lines will end at the same point, but Ca 
>iro won't do any special joining." 
12182msgid ""
12183"The section for drawing an arc introduces one new function, "
12184"<methodname>close_path()</methodname>. This function will in effect draw a "
12185"straight line from the current point back to the first point in the path. "
12186"There is a significant difference between calling <methodname>close_path()</"
12187"methodname> and manually drawing a line back to the starting point, however. "
12188"If you use <methodname>close_path()</methodname>, the lines will be nicely "
12189"joined together. If you use <methodname>line_to()</methodname> instead, the "
12190"lines will end at the same point, but Cairo won't do any special joining."
5961msgstr ""12191msgstr ""
nn12192"Avsnittet för att rita en båge introducerar en ny funktion, "
12193"<methodname>close_path()</methodname>. Denna funktion kommer praktiskt sett "
12194"rita en rak linje från den aktuella punkten tillbaka till banans först "
12195"punkt. Det finns dock en betydande skillnad mellan att anropa "
12196"<methodname>close_path()</methodname> och att manuellt rita en linje "
12197"tillbaka till startpunkten. Om du använder <methodname>close_path()</"
12198"methodname> kommer linjerna vara fint ihopkopplade. Om du i stället använder "
12199"<methodname>line_to()</methodname> kommer linjerna sluta på samma punkt, men "
12200"Cairo kommer inte koppla ihop dem på något speciellt sätt."
596212201
5963#. (itstool) path: note/title12202#. (itstool) path: note/title
5964#: C/index-in.docbook:511612203#: C/index-in.docbook:5116
5965msgid "Drawing counter-clockwise"12204msgid "Drawing counter-clockwise"
n5966msgstr ""n12205msgstr "Rita moturs"
596712206
5968#. (itstool) path: note/para12207#. (itstool) path: note/para
5969#: C/index-in.docbook:511712208#: C/index-in.docbook:5117
n5970msgid "The function <methodname>Cairo::Context::arc_negative()</methodname> is en12209msgid ""
>xactly the same as <methodname>Cairo::Context::arc()</methodname> but the angles 
> go the opposite direction." 
12210"The function <methodname>Cairo::Context::arc_negative()</methodname> is "
12211"exactly the same as <methodname>Cairo::Context::arc()</methodname> but the "
12212"angles go the opposite direction."
5971msgstr ""12213msgstr ""
nn12214"Funktionen <methodname>Cairo::Context::arc_negative()</methodname> är exakt "
12215"densamma som <methodname>Cairo::Context::arc()</methodname> men vinklarna "
12216"går i motsatt riktning."
597212217
5973#. (itstool) path: section/title12218#. (itstool) path: section/title
5974#: C/index-in.docbook:512912219#: C/index-in.docbook:5129
5975msgid "Drawing Text"12220msgid "Drawing Text"
n5976msgstr ""n12221msgstr "Rita text"
597712222
5978#. (itstool) path: section/title12223#. (itstool) path: section/title
5979#: C/index-in.docbook:513212224#: C/index-in.docbook:5132
5980msgid "Drawing Text with Pango"12225msgid "Drawing Text with Pango"
n5981msgstr ""n12226msgstr "Rita text med Pango"
598212227
5983#. (itstool) path: section/para12228#. (itstool) path: section/para
5984#: C/index-in.docbook:513312229#: C/index-in.docbook:5133
n5985msgid "Text is drawn via Pango Layouts. The easiest way to create a <classname>Pn12230#, fuzzy
>ango::Layout</classname> is to use <methodname>Gtk::Widget::create_pango_layout( 
>)</methodname>. Once created, the layout can be manipulated in various ways, inc 
>luding changing the text, font, etc. Finally, the layout can be rendered using t 
>he <methodname>Pango::Layout::show_in_cairo_context()</methodname> method." 
12231msgid ""
12232"Text is drawn via Pango Layouts. The easiest way to create a "
12233"<classname>Pango::Layout</classname> is to use <methodname>Gtk::Widget::"
12234"create_pango_layout()</methodname>. Once created, the layout can be "
12235"manipulated in various ways, including changing the text, font, etc. "
12236"Finally, the layout can be rendered using the <methodname>Pango::Layout::"
12237"show_in_cairo_context()</methodname> method."
5986msgstr ""12238msgstr ""
nn12239"Texten ritas via Pango-layouter. Det lättaste sättet att skapa en "
12240"<classname>Pango::Layout</classname> är att använda <methodname>Gtk::Widget::"
12241"create_pango_layout()</methodname>. När den skapats kan layouten manipuleras "
12242"på olika sätt, inklusive att ändra texten, typsnittet o.s.v. Slutligen kan "
12243"layouten renderas med metoden <methodname>Pango::Layout::"
12244"show_in_cairo_context()</methodname>."
598712245
5988#. (itstool) path: section/para12246#. (itstool) path: section/para
5989#: C/index-in.docbook:514612247#: C/index-in.docbook:5146
n5990msgid "Here is an example of a program that draws some text, some of it upside-dn12248#, fuzzy
>own. The Printing chapter contains another <link linkend=\"sec-printing-examples 
>\">example</link> of drawing text." 
12249msgid ""
12250"Here is an example of a program that draws some text, some of it upside-"
12251"down. The Printing chapter contains another <link linkend=\"sec-printing-"
12252"examples\">example</link> of drawing text."
5991msgstr ""12253msgstr ""
nn12254"Här kommer ett exempel på ett program som ritar lite text, delar av den upp "
12255"och ner. Utskriftskapitlet innehåller ett annat <link linkend=\"sec-printing-"
12256"example\">exempel</link> på att rita text."
599212257
5993#. (itstool) path: figure/title12258#. (itstool) path: figure/title
5994#: C/index-in.docbook:515212259#: C/index-in.docbook:5152
5995msgid "Drawing Area - Text"12260msgid "Drawing Area - Text"
n5996msgstr ""n12261msgstr "Rityta - Text"
599712262
5998#. (itstool) path: imageobject/imagedata12263#. (itstool) path: imageobject/imagedata
5999#. This is a reference to an external file such as an image or video. When12264#. This is a reference to an external file such as an image or video. When
6000#. the file changes, the md5 hash will change to let you know you need to12265#. the file changes, the md5 hash will change to let you know you need to
6001#. update your localized copy. The msgstr is not used at all. Set it to12266#. update your localized copy. The msgstr is not used at all. Set it to
6002#. whatever you like once you have updated your copy of the file.12267#. whatever you like once you have updated your copy of the file.
6003#: C/index-in.docbook:515412268#: C/index-in.docbook:5154
nn12269#, fuzzy
6004msgctxt "_"12270msgctxt "_"
n6005msgid "external ref='figures/drawingarea_pango_text.png' md5='07c39668c9dda2ac1fn12271msgid ""
>9455caf6e4d16a'" 
12272"external ref='figures/drawingarea_pango_text.png' "
12273"md5='07c39668c9dda2ac1f9455caf6e4d16a'"
6006msgstr ""12274msgstr ""
nn12275"external ref='figures/drawingarea_pango_text.png' "
12276"md5='07c39668c9dda2ac1f9455caf6e4d16a'"
600712277
6008#. (itstool) path: section/para12278#. (itstool) path: section/para
6009#: C/index-in.docbook:515812279#: C/index-in.docbook:5158
n6010msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren12280msgid ""
>e/master/examples/book/drawingarea/pango_text\">Source Code</link>" 
12281"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12282"master/examples/book/drawingarea/pango_text\">Source Code</link>"
6011msgstr ""12283msgstr ""
nn12284"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12285"master/examples/book/drawingarea/pango_text\">Källkod</link>"
601212286
6013#. (itstool) path: section/title12287#. (itstool) path: section/title
6014#: C/index-in.docbook:517012288#: C/index-in.docbook:5170
6015msgid "Drawing Images"12289msgid "Drawing Images"
n6016msgstr ""n12290msgstr "Rita bilder"
601712291
6018#. (itstool) path: section/para12292#. (itstool) path: section/para
6019#: C/index-in.docbook:517112293#: C/index-in.docbook:5171
n6020msgid "There is a method for drawing from a <classname>Gdk::Pixbuf</classname> tn12294#, fuzzy
>o a <classname>Cairo::Context</classname>. A <classname>Gdk::Pixbuf</classname>  
>buffer is a useful wrapper around a collection of pixels, which can be read from 
> files, and manipulated in various ways." 
12295msgid ""
12296"There is a method for drawing from a <classname>Gdk::Pixbuf</classname> to a "
12297"<classname>Cairo::Context</classname>. A <classname>Gdk::Pixbuf</classname> "
12298"buffer is a useful wrapper around a collection of pixels, which can be read "
12299"from files, and manipulated in various ways."
6021msgstr ""12300msgstr ""
nn12301"Det finns en metod för att rita från en <classname>Gdk::Pixbuf</classname> "
12302"till en <classname>Cairo::Context</classname>. En <classname>Gdk::Pixbuf</"
12303"classname>-buffert är ett användbart omslag runt en samling bildpunkter, "
12304"vilka kan läsas in från filer och manipuleras på olika sätt."
602212305
6023#. (itstool) path: section/para12306#. (itstool) path: section/para
6024#: C/index-in.docbook:517812307#: C/index-in.docbook:5178
n6025msgid "Probably the most common way of creating <classname>Gdk::Pixbuf</classnamn12308#, fuzzy
>e>s is to use <methodname>Gdk::Pixbuf::create_from_file()</methodname> or <metho 
>dname>Gdk::Pixbuf::create_from_resource()</methodname>, which can read an image  
>file, such as a png file into a pixbuf ready for rendering." 
12309msgid ""
12310"Probably the most common way of creating <classname>Gdk::Pixbuf</classname>s "
12311"is to use <methodname>Gdk::Pixbuf::create_from_file()</methodname> or "
12312"<methodname>Gdk::Pixbuf::create_from_resource()</methodname>, which can read "
12313"an image file, such as a png file into a pixbuf ready for rendering."
6026msgstr ""12314msgstr ""
nn12315"Det vanligaste sättet att skapa <classname>Gdk::Pixbuf</classname>-buffertar "
12316"är troligen att använda <methodname>Gdk::Pixbuf::create_from_file()</"
12317"methodname> eller <methodname>Gdk::Pixbuf::create_from_resource()</"
12318"methodname>, vilka kan läsa en bildfil, som en png-fil in i en pixbuf som är "
12319"klar för rendering."
602712320
6028#. (itstool) path: section/para12321#. (itstool) path: section/para
6029#: C/index-in.docbook:518612322#: C/index-in.docbook:5186
n6030msgid "The <classname>Gdk::Pixbuf</classname> can be rendered by setting it as tn12323#, fuzzy
>he source pattern of the Cairo context with <methodname>Gdk::Cairo::set_source_p 
>ixbuf()</methodname>. Then draw the image with either <methodname>Cairo::Context 
>::paint()</methodname> (to draw the whole image), or <methodname>Cairo::Context: 
>:rectangle()</methodname> and <methodname>Cairo::Context::fill()</methodname> (t 
>o fill the specified rectangle). <methodname>set_source_pixbuf()</methodname> is 
> not a member of <classname>Cairo::Context</classname>. It takes a <classname>Ca 
>iro::Context</classname> as its first parameter." 
12324msgid ""
12325"The <classname>Gdk::Pixbuf</classname> can be rendered by setting it as the "
12326"source pattern of the Cairo context with <methodname>Gdk::Cairo::"
12327"set_source_pixbuf()</methodname>. Then draw the image with either "
12328"<methodname>Cairo::Context::paint()</methodname> (to draw the whole image), "
12329"or <methodname>Cairo::Context::rectangle()</methodname> and "
12330"<methodname>Cairo::Context::fill()</methodname> (to fill the specified "
12331"rectangle). <methodname>set_source_pixbuf()</methodname> is not a member of "
12332"<classname>Cairo::Context</classname>. It takes a <classname>Cairo::Context</"
12333"classname> as its first parameter."
6031msgstr ""12334msgstr ""
nn12335"<classname>Gdk::Pixbuf</classname>-bufferten kan renderas genom att ställa "
12336"in den som källmönstret för Cairo-kontexten med <methodname>Gdk::Cairo::"
12337"set_source_pixbuf()</methodname>. Rita sedan bilden med antingen "
12338"<methodname>Cairo::Context::paint()</methodname> (för att rita hela bilden), "
12339"eller <methodname>Cairo::Context::rectangle()</methodname> och "
12340"<methodname>Cairo::Context::fill()</methodname> (för att fylla den angivna "
12341"rektangeln). <methodname>set_source_pixbuf()</methodname> är inte en medlem "
12342"av <classname>Cairo::Context</classname>. Den tar en <classname>Cairo::"
12343"Context</classname> som sin första parameter."
603212344
6033#. (itstool) path: section/para12345#. (itstool) path: section/para
6034#: C/index-in.docbook:519712346#: C/index-in.docbook:5197
n6035msgid "Here is a small bit of code to tie it all together: (Note that usually yon12347#, fuzzy
>u wouldn't load the image every time in the draw signal handler! It's just shown 
> here to keep it all together.)" 
12348msgid ""
12349"Here is a small bit of code to tie it all together: (Note that usually you "
12350"wouldn't load the image every time in the draw signal handler! It's just "
12351"shown here to keep it all together.)"
6036msgstr ""12352msgstr ""
nn12353"Här är lite kod som knyter ihop alltsamman: (Observera att vanligen skulle "
12354"du inte läsa in bilden varje gång i ritsignalhanteraren! Det visas bara här "
12355"för att ha allt på samma ställe.)"
603712356
6038#. (itstool) path: section/programlisting12357#. (itstool) path: section/programlisting
6039#: C/index-in.docbook:520212358#: C/index-in.docbook:5202
n6040#, no-wrapn12359#, fuzzy, no-wrap
6041msgid ""12360msgid ""
6042"<code>void MyArea::on_draw(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; cr, i12361"<code>void MyArea::on_draw(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; cr, i
>nt width, int height)\n">nt width, int height)\n"
6043"{\n"12362"{\n"
6044"  auto image = Gdk::Pixbuf::create_from_file(\"myimage.png\");\n"12363"  auto image = Gdk::Pixbuf::create_from_file(\"myimage.png\");\n"
6045"  // Draw the image at 110, 90, except for the outermost 10 pixels.\n"12364"  // Draw the image at 110, 90, except for the outermost 10 pixels.\n"
6046"  Gdk::Cairo::set_source_pixbuf(cr, image, 100, 80);\n"12365"  Gdk::Cairo::set_source_pixbuf(cr, image, 100, 80);\n"
6047"  cr-&gt;rectangle(110, 90, image-&gt;get_width()-20, image-&gt;get_height()-2012366"  cr-&gt;rectangle(110, 90, image-&gt;get_width()-20, image-&gt;get_height()-20
>);\n">);\n"
6048"  cr-&gt;fill();\n"12367"  cr-&gt;fill();\n"
6049"}</code>"12368"}</code>"
6050msgstr ""12369msgstr ""
nn12370"void MyArea::on_draw(const Cairo::RefPtr&lt;Cairo::Context&gt;&amp; cr, int wid
 >th, int height)\n"
12371"{\n"
12372"  auto image = Gdk::Pixbuf::create_from_file(\"myimage.png\");\n"
12373"  // Rita bilden på 110, 90, förutom de yttersta 10 bildpunkterna.\n"
12374"  Gdk::Cairo::set_source_pixbuf(cr, image, 100, 80);\n"
12375"  cr-&gt;rectangle(110, 90, image-&gt;get_width()-20, image-&gt;get_height()-20
 >);\n"
12376"  cr-&gt;fill();\n"
12377"}"
605112378
6052#. (itstool) path: para/screen12379#. (itstool) path: para/screen
6053#: C/index-in.docbook:521912380#: C/index-in.docbook:5219
6054#, no-wrap12381#, no-wrap
n6055msgid ""n
6056"$ glib-compile-resources --target=resources.c --generate-source image.gresource12382msgid "$ glib-compile-resources --target=resources.c --generate-source image.gre
>.xml">source.xml"
6057msgstr ""12383msgstr "$ glib-compile-resources --target=resources.c --generate-source image.gr
 >esource.xml"
605812384
6059#. (itstool) path: section/para12385#. (itstool) path: section/para
6060#: C/index-in.docbook:521312386#: C/index-in.docbook:5213
n6061msgid "Here is an example of a simple program that draws an image. The program ln12387#, fuzzy
>oads the image from a resource file. See the <link linkend=\"sec-gio-resource\"> 
>Gio::Resource and glib-compile-resources</link> section. Use <application>glib-c 
>ompile-resources</application> to compile the resources into a C source file tha 
>t can be compiled and linked with the <phrase role=\"nowrap\">C++</phrase> code. 
> E.g. <_:screen-1/>" 
12388msgid ""
12389"Here is an example of a simple program that draws an image. The program "
12390"loads the image from a resource file. See the <link linkend=\"sec-gio-"
12391"resource\">Gio::Resource and glib-compile-resources</link> section. Use "
12392"<application>glib-compile-resources</application> to compile the resources "
12393"into a C source file that can be compiled and linked with the <phrase "
12394"role=\"nowrap\">C++</phrase> code. E.g. <_:screen-1/>"
6062msgstr ""12395msgstr ""
nn12396"Här är ett exempel på ett enkelt program som ritar en bild. Programmet läser "
12397"in bilden från en resursfil. Se avsnittet <link linkend=\"sec-gio-"
12398"resource\">Gio::Resource och glib-compile-resources</link>. Använd "
12399"<application>glib-compile-resources</application> för att kompilera "
12400"resurserna till en C-källfil som kan kompileras och länkas med C++-koden. "
12401"Exempelvis <_:screen-1/>"
606312402
6064#. (itstool) path: figure/title12403#. (itstool) path: figure/title
6065#: C/index-in.docbook:522212404#: C/index-in.docbook:5222
6066msgid "Drawing Area - Image"12405msgid "Drawing Area - Image"
n6067msgstr ""n12406msgstr "Rityta - Bild"
606812407
6069#. (itstool) path: imageobject/imagedata12408#. (itstool) path: imageobject/imagedata
6070#. This is a reference to an external file such as an image or video. When12409#. This is a reference to an external file such as an image or video. When
6071#. the file changes, the md5 hash will change to let you know you need to12410#. the file changes, the md5 hash will change to let you know you need to
6072#. update your localized copy. The msgstr is not used at all. Set it to12411#. update your localized copy. The msgstr is not used at all. Set it to
6073#. whatever you like once you have updated your copy of the file.12412#. whatever you like once you have updated your copy of the file.
6074#: C/index-in.docbook:522412413#: C/index-in.docbook:5224
6075msgctxt "_"12414msgctxt "_"
n6076msgid "external ref='figures/drawingarea_image.png' md5='4fbb9f465b7b8b209f295c4n12415msgid ""
>4dd664d5a'" 
12416"external ref='figures/drawingarea_image.png' "
12417"md5='4fbb9f465b7b8b209f295c44dd664d5a'"
6077msgstr ""12418msgstr ""
nn12419"external ref='figures/drawingarea_image.png' "
12420"md5='4fbb9f465b7b8b209f295c44dd664d5a'"
607812421
6079#. (itstool) path: section/para12422#. (itstool) path: section/para
6080#: C/index-in.docbook:522812423#: C/index-in.docbook:5228
n6081msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren12424msgid ""
>e/master/examples/book/drawingarea/image\">Source Code</link>" 
12425"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12426"master/examples/book/drawingarea/image\">Source Code</link>"
6082msgstr ""12427msgstr ""
nn12428"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12429"master/examples/book/drawingarea/image\">Källkod</link>"
608312430
6084#. (itstool) path: section/title12431#. (itstool) path: section/title
6085#: C/index-in.docbook:524212432#: C/index-in.docbook:5242
6086msgid "Example Application: Creating a Clock with Cairo"12433msgid "Example Application: Creating a Clock with Cairo"
n6087msgstr ""n12434msgstr "Exempelprogram: Skapa en klocka med Cairo"
608812435
6089#. (itstool) path: section/para12436#. (itstool) path: section/para
6090#: C/index-in.docbook:524412437#: C/index-in.docbook:5244
n6091msgid "Now that we've covered the basics of drawing with Cairo, let's try to putn12438msgid ""
> it all together and create a simple application that actually does something. T 
>he following example uses Cairo to create a custom <classname>Clock</classname>  
>widget. The clock has a second hand, a minute hand, and an hour hand, and update 
>s itself every second." 
12439"Now that we've covered the basics of drawing with Cairo, let's try to put it "
12440"all together and create a simple application that actually does something. "
12441"The following example uses Cairo to create a custom <classname>Clock</"
12442"classname> widget. The clock has a second hand, a minute hand, and an hour "
12443"hand, and updates itself every second."
6092msgstr ""12444msgstr ""
nn12445"Nu då vi täckt grunderna med att rita i Cairo kan vi försöka sätta ihop "
12446"allting och skapa ett enkelt program som faktiskt gör något. Följande "
12447"exempel använder Cairo för att skapa en anpassad komponent <classname>Clock</"
12448"classname>. Klockan har en sekundvisare, en minutvisare och en timvisare, "
12449"och uppdaterar sig själv varje sekund."
609312450
6094#. (itstool) path: imageobject/imagedata12451#. (itstool) path: imageobject/imagedata
6095#. This is a reference to an external file such as an image or video. When12452#. This is a reference to an external file such as an image or video. When
6096#. the file changes, the md5 hash will change to let you know you need to12453#. the file changes, the md5 hash will change to let you know you need to
6097#. update your localized copy. The msgstr is not used at all. Set it to12454#. update your localized copy. The msgstr is not used at all. Set it to
6098#. whatever you like once you have updated your copy of the file.12455#. whatever you like once you have updated your copy of the file.
6099#: C/index-in.docbook:525212456#: C/index-in.docbook:5252
nn12457#, fuzzy
6100msgctxt "_"12458msgctxt "_"
nn12459msgid ""
6101msgid "external ref='figures/cairo_clock.png' md5='fceab985fd70bec94b273f78dd48112460"external ref='figures/cairo_clock.png' md5='fceab985fd70bec94b273f78dd481d31'"
>d31'" 
6102msgstr ""12461msgstr ""
nn12462"external ref='figures/cairo_clock.png' md5='fceab985fd70bec94b273f78dd481d31'"
610312463
6104#. (itstool) path: section/para12464#. (itstool) path: section/para
6105#: C/index-in.docbook:525412465#: C/index-in.docbook:5254
n6106msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren12466msgid ""
>e/master/examples/book/drawingarea/clock\">Source Code</link>" 
12467"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12468"master/examples/book/drawingarea/clock\">Source Code</link>"
6107msgstr ""12469msgstr ""
nn12470"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12471"master/examples/book/drawingarea/clock\">Källkod</link>"
610812472
6109#. (itstool) path: section/para12473#. (itstool) path: section/para
6110#: C/index-in.docbook:525512474#: C/index-in.docbook:5255
n6111msgid "As before, almost all of the interesting stuff is done in the draw functin12475#, fuzzy
>on <methodname>on_draw()</methodname>. Before we dig into the draw function, not 
>ice that the constructor for the <classname>Clock</classname> widget connects a  
>handler function <methodname>on_timeout()</methodname> to a timer with a timeout 
> period of 1000 milliseconds (1 second). This means that <methodname>on_timeout( 
>)</methodname> will get called once per second. The sole responsibility of this  
>function is to invalidate the window so that <application>gtkmm</application> wi 
>ll be forced to redraw it." 
12476msgid ""
12477"As before, almost all of the interesting stuff is done in the draw function "
12478"<methodname>on_draw()</methodname>. Before we dig into the draw function, "
12479"notice that the constructor for the <classname>Clock</classname> widget "
12480"connects a handler function <methodname>on_timeout()</methodname> to a timer "
12481"with a timeout period of 1000 milliseconds (1 second). This means that "
12482"<methodname>on_timeout()</methodname> will get called once per second. The "
12483"sole responsibility of this function is to invalidate the window so that "
12484"<application>gtkmm</application> will be forced to redraw it."
6112msgstr ""12485msgstr ""
nn12486"Som tidigare görs nästan allting intressant i ritfunktionen "
12487"<methodname>on_draw()</methodname>. Innan vi sätter tänderna i ritfunktionen "
12488"kan vi se att konstruktorn för <classname>Clock</classname>-komponenten "
12489"ansluter en hanterarfunktion <methodname>on_timeout()</methodname> till en "
12490"tidtagare med timeoutperioden 1000 millisekunder (1 sekund). Detta betyder "
12491"att <methodname>on_timeout()</methodname> kommer anropas en gång per sekund. "
12492"Denna funktions enda ansvar är att invalidera fönstret så att "
12493"<application>gtkmm</application> kommer tvingas rita om det."
611312494
6114#. (itstool) path: section/para12495#. (itstool) path: section/para
6115#: C/index-in.docbook:526612496#: C/index-in.docbook:5266
n6116msgid "Now let's take a look at the code that performs the actual drawing. The fn12497msgid ""
>irst section of <methodname>on_draw()</methodname> should be pretty familiar by  
>now. This example again scales the coordinate system to be a unit square so that 
> it's easier to draw the clock as a percentage of window size so that it will au 
>tomatically scale when the window size is adjusted. Furthermore, the coordinate  
>system is scaled over and down so that the (0, 0) coordinate is in the very cent 
>er of the window." 
12498"Now let's take a look at the code that performs the actual drawing. The "
12499"first section of <methodname>on_draw()</methodname> should be pretty "
12500"familiar by now. This example again scales the coordinate system to be a "
12501"unit square so that it's easier to draw the clock as a percentage of window "
12502"size so that it will automatically scale when the window size is adjusted. "
12503"Furthermore, the coordinate system is scaled over and down so that the (0, "
12504"0) coordinate is in the very center of the window."
6117msgstr ""12505msgstr ""
nn12506"Låt oss nu ta en titt på koden som utför det faktiska ritandet. Den första "
12507"delen av <methodname>on_draw()</methodname> bör vara ganska bekant nu. Detta "
12508"exempel skalar igen koordinatsystemet till en enhetskvadrat så att det är "
12509"lättare att rita klockan som en procentsats av fönsterstorleken, så att den "
12510"automatiskt kommer skalas när fönsterstorleken justeras. Vidare skalas och "
12511"flyttas koordinatsystemet så att koordinaten (0, 0) är i mitten av fönstret."
611812512
6119#. (itstool) path: section/para12513#. (itstool) path: section/para
6120#: C/index-in.docbook:527612514#: C/index-in.docbook:5276
n6121msgid "The function <methodname>Cairo::Context::paint()</methodname> is used hern12515#, fuzzy
>e to set the background color of the window. This function takes no arguments an 
>d fills the current surface (or the clipped portion of the surface) with the sou 
>rce color currently active. After setting the background color of the window, we 
> draw a circle for the clock outline, fill it with white, and then stroke the ou 
>tline in black. Notice that both of these actions use the <methodname>_preserve< 
>/methodname> variant to preserve the current path, and then this same path is cl 
>ipped to make sure that our next lines don't go outside the outline of the clock 
>." 
12516msgid ""
12517"The function <methodname>Cairo::Context::paint()</methodname> is used here "
12518"to set the background color of the window. This function takes no arguments "
12519"and fills the current surface (or the clipped portion of the surface) with "
12520"the source color currently active. After setting the background color of the "
12521"window, we draw a circle for the clock outline, fill it with white, and then "
12522"stroke the outline in black. Notice that both of these actions use the "
12523"<methodname>_preserve</methodname> variant to preserve the current path, and "
12524"then this same path is clipped to make sure that our next lines don't go "
12525"outside the outline of the clock."
6122msgstr ""12526msgstr ""
nn12527"Funktionen <methodname>Cairo::Context::paint()</methodname> används här för "
12528"att ställa in fönstrets bakgrundsfärg. Denna funktion tar inga argument och "
12529"fyller den aktuella ytan (eller den klippta delen av ytan) med den aktiva "
12530"källfärgen. Efter att ha ställt in fönstrets bakgrundsfärg ritar vi en "
12531"cirkel som klockans kontur, fyller den med vitt, och stryker sedan konturen "
12532"i svart. Observera att båda dessa åtgärder använder varianten "
12533"<methodname>_preserve</methodname> för att bevara den aktuella banan, och "
12534"sedan klipps denna bana för att säkerställa att våra nästa linjer inte går "
12535"utanför klockans kontur."
612312536
6124#. (itstool) path: section/para12537#. (itstool) path: section/para
6125#: C/index-in.docbook:528812538#: C/index-in.docbook:5288
n6126msgid "After drawing the outline, we go around the clock and draw ticks for evern12539msgid ""
>y hour, with a larger tick at 12, 3, 6, and 9. Now we're finally ready to implem 
>ent the time-keeping functionality of the clock, which simply involves getting t 
>he current values for hours, minutes and seconds, and drawing the hands at the c 
>orrect angles." 
12540"After drawing the outline, we go around the clock and draw ticks for every "
12541"hour, with a larger tick at 12, 3, 6, and 9. Now we're finally ready to "
12542"implement the time-keeping functionality of the clock, which simply involves "
12543"getting the current values for hours, minutes and seconds, and drawing the "
12544"hands at the correct angles."
6127msgstr ""12545msgstr ""
nn12546"Efter att ha ritat konturen går vi runt klockan och ritar streck för varje "
12547"timme, med ett större streck vid 12, 3, 6 och 9. Slutligen är vi redo att "
12548"implementera klockans tidtagande, vilket helt enkelt innefattar att få de "
12549"aktuella värdena för timmar, minuter och sekunder, och rita visarna på rätt "
12550"vinklar."
612812551
6129#. (itstool) path: chapter/para12552#. (itstool) path: chapter/para
6130#: C/index-in.docbook:530012553#: C/index-in.docbook:5300
n6131msgid "The <classname>Gtk::DragSource</classname> and <classname>Gtk::DropTargetn12554#, fuzzy
></classname> event controllers have methods and signals which are used for Drag  
>and Drop." 
12555msgid ""
12556"The <classname>Gtk::DragSource</classname> and <classname>Gtk::DropTarget</"
12557"classname> event controllers have methods and signals which are used for "
12558"Drag and Drop."
6132msgstr ""12559msgstr ""
nn12560"Händelsekontrollerna <classname>Gtk::DragSource</classname> och "
12561"<classname>Gtk::DropTarget</classname> har metoder och signaler vilka "
12562"används för dra-och-släpp."
613312563
6134#. (itstool) path: section/title12564#. (itstool) path: section/title
6135#: C/index-in.docbook:530612565#: C/index-in.docbook:5306
6136msgid "Sources and Targets"12566msgid "Sources and Targets"
n6137msgstr ""n12567msgstr "Källor och mål"
613812568
nn12569# TODO: literal sources och targets?
6139#. (itstool) path: section/para12570#. (itstool) path: section/para
6140#: C/index-in.docbook:530712571#: C/index-in.docbook:5307
n6141msgid "Things are dragged from <literal>sources</literal> to be dropped on <liten12572#, fuzzy
>ral>targets</literal>. Each source and target has information about the data for 
>mats that it can send or receive, provided by <classname>Gdk::ContentFormats</cl 
>assname>. A drop target will only accept a dragged item if they both share a com 
>patible format. Appropriate signals will then be emitted, telling the signal han 
>dlers which format was used." 
12573msgid ""
12574"Things are dragged from <literal>sources</literal> to be dropped on "
12575"<literal>targets</literal>. Each source and target has information about the "
12576"data formats that it can send or receive, provided by <classname>Gdk::"
12577"ContentFormats</classname>. A drop target will only accept a dragged item if "
12578"they both share a compatible format. Appropriate signals will then be "
12579"emitted, telling the signal handlers which format was used."
6142msgstr ""12580msgstr ""
nn12581"Saker dras från <literal>sources</literal> för att släppas på "
12582"<literal>targets</literal>. Varje källa och mål har information om "
12583"dataformaten som det kan skicka eller ta emot, tillhandahållet av "
12584"<classname>Gdk::ContentFormats</classname>. Ett släppmål kommer endast "
12585"acceptera ett draget objekt om de båda delar ett kompatibelt format. "
12586"Lämpliga signaler kommer sedan sändas ut, som säger till signalhanterarna "
12587"vilket format som användes."
614312588
6144#. (itstool) path: section/para12589#. (itstool) path: section/para
6145#: C/index-in.docbook:531512590#: C/index-in.docbook:5315
n6146msgid "<classname>Gdk::ContentFormats</classname> objects contain information abn12591msgid ""
>out available <type>GType</type>s and mime types (media types)." 
12592"<classname>Gdk::ContentFormats</classname> objects contain information about "
12593"available <type>GType</type>s and mime types (media types)."
6147msgstr ""12594msgstr ""
nn12595"<classname>Gdk::ContentFormats</classname>-objekt innehåller information om "
12596"tillgängliga <type>GType</type>- och mime-typer (mediatyper)."
614812597
6149#. (itstool) path: section/para12598#. (itstool) path: section/para
6150#: C/index-in.docbook:532512599#: C/index-in.docbook:5325
n6151msgid "<classname>Widget</classname>s can be identified as sources or targets usn12600#, fuzzy
>ing <classname>Gtk::DragSource</classname> and <classname>Gtk::DropTarget</class 
>name> event controllers." 
12601msgid ""
12602"<classname>Widget</classname>s can be identified as sources or targets using "
12603"<classname>Gtk::DragSource</classname> and <classname>Gtk::DropTarget</"
12604"classname> event controllers."
6152msgstr ""12605msgstr ""
nn12606"<classname>Widget</classname>-komponenter kan identifieras som källor eller "
12607"mål med händelsekontrollerna <classname>Gtk::DragSource</classname> och "
12608"<classname>Gtk::DropTarget</classname>."
615312609
6154#. (itstool) path: section/programlisting12610#. (itstool) path: section/programlisting
6155#: C/index-in.docbook:533012611#: C/index-in.docbook:5330
n6156#, no-wrapn12612#, fuzzy, no-wrap
12613#| msgid ""
12614#| "auto source = Gtk::DragSource::create();\n"
12615#| "m_source_widget.add_controller(source);"
6157msgid ""12616msgid ""
6158"<code>auto source = Gtk::DragSource::create();\n"12617"<code>auto source = Gtk::DragSource::create();\n"
6159"m_source_widget.add_controller(source);</code>"12618"m_source_widget.add_controller(source);</code>"
6160msgstr ""12619msgstr ""
nn12620"auto source = Gtk::DragSource::create();\n"
12621"m_source_widget.add_controller(source);"
616112622
6162#. (itstool) path: listitem/para12623#. (itstool) path: listitem/para
6163#: C/index-in.docbook:533712624#: C/index-in.docbook:5337
n6164msgid "<literal>void set_content(const Glib::RefPtr&lt;Gdk::ContentProvider&gt;&n12625msgid ""
>amp; content)</literal>: Sets a content provider on the drag source." 
12626"<literal>void set_content(const Glib::RefPtr&lt;Gdk::ContentProvider&gt;"
12627"&amp; content)</literal>: Sets a content provider on the drag source."
6165msgstr ""12628msgstr ""
nn12629"<literal>void set_content(const Glib::RefPtr&lt;Gdk::ContentProvider&gt;"
12630"&amp; content)</literal>: Ställer in en innehållstillhandahållare på "
12631"dragkällan."
616612632
6167#. (itstool) path: listitem/para12633#. (itstool) path: listitem/para
6168#: C/index-in.docbook:534312634#: C/index-in.docbook:5343
n6169msgid "<literal>void set_actions(Gdk::DragAction actions)</literal>: Sets the acn12635msgid ""
>tions on the drag source. For instance <literal>Gdk::DragAction::COPY | Gdk::Dra 
>gAction::MOVE</literal>." 
12636"<literal>void set_actions(Gdk::DragAction actions)</literal>: Sets the "
12637"actions on the drag source. For instance <literal>Gdk::DragAction::COPY | "
12638"Gdk::DragAction::MOVE</literal>."
6170msgstr ""12639msgstr ""
nn12640"<literal>void set_actions(Gdk::DragAction actions)</literal>: Ställer in "
12641"åtgärderna på dragkällan. Till exempel <literal>Gdk::DragAction::COPY | Gdk::"
12642"DragAction::MOVE</literal>."
617112643
6172#. (itstool) path: listitem/para12644#. (itstool) path: listitem/para
6173#: C/index-in.docbook:535012645#: C/index-in.docbook:5350
n6174msgid "<literal>void set_icon(const Glib::RefPtr&lt;const Gdk::Paintable&gt;&ampn12646msgid ""
>; paintable, int hot_x, int hot_y)</literal>: Sets a paintable to use as icon du 
>ring DND operations." 
12647"<literal>void set_icon(const Glib::RefPtr&lt;const Gdk::Paintable&gt;&amp; "
12648"paintable, int hot_x, int hot_y)</literal>: Sets a paintable to use as icon "
12649"during DND operations."
6175msgstr ""12650msgstr ""
nn12651"<literal>void set_icon(const Glib::RefPtr&lt;const Gdk::Paintable&gt;&amp; "
12652"paintable, int hot_x, int hot_y)</literal>: Ställer in en rityta att använda "
12653"som ikon under dra-och-släpp-operationer."
617612654
6177#. (itstool) path: section/para12655#. (itstool) path: section/para
6178#: C/index-in.docbook:533312656#: C/index-in.docbook:5333
6179msgid "Some <classname>DragSource</classname> methods: <_:itemizedlist-1/>"12657msgid "Some <classname>DragSource</classname> methods: <_:itemizedlist-1/>"
n6180msgstr ""n12658msgstr "Några <classname>DragSource</classname>-metoder: <_:itemizedlist-1/>"
618112659
6182#. (itstool) path: section/programlisting12660#. (itstool) path: section/programlisting
6183#: C/index-in.docbook:535812661#: C/index-in.docbook:5358
n6184#, no-wrapn12662#, fuzzy, no-wrap
6185msgid ""12663msgid ""
6186"<code>auto target = Gtk::DropTarget::create(gtype, actions);\n"12664"<code>auto target = Gtk::DropTarget::create(gtype, actions);\n"
6187"m_target_widget.add_controller(target);</code>"12665"m_target_widget.add_controller(target);</code>"
6188msgstr ""12666msgstr ""
nn12667"auto target = Gtk::DropTarget::create(gtype, actions);\n"
12668"m_target_widget.add_controller(target);"
618912669
6190#. (itstool) path: listitem/para12670#. (itstool) path: listitem/para
6191#: C/index-in.docbook:536512671#: C/index-in.docbook:5365
n6192msgid "<literal>void set_gtypes(const std::vector&lt;GType&gt;&amp; types)</liten12672msgid ""
>ral>: Sets the supported types for this drop target." 
12673"<literal>void set_gtypes(const std::vector&lt;GType&gt;&amp; types)</"
12674"literal>: Sets the supported types for this drop target."
6193msgstr ""12675msgstr ""
nn12676"<literal>void set_gtypes(const std::vector&lt;GType&gt;&amp; types)</"
12677"literal>: Ställer in typerna som stöds för detta släppmål."
619412678
6195#. (itstool) path: listitem/para12679#. (itstool) path: listitem/para
6196#: C/index-in.docbook:537112680#: C/index-in.docbook:5371
nn12681msgid ""
6197msgid "<literal>void set_actions(Gdk::DragAction actions)</literal>: Sets the ac12682"<literal>void set_actions(Gdk::DragAction actions)</literal>: Sets the "
>tions that this drop target supports." 
12683"actions that this drop target supports."
6198msgstr ""12684msgstr ""
nn12685"<literal>void set_actions(Gdk::DragAction actions)</literal>: Ställer in "
12686"åtgärderna som detta släppmål stöder."
619912687
6200#. (itstool) path: listitem/para12688#. (itstool) path: listitem/para
6201#: C/index-in.docbook:537712689#: C/index-in.docbook:5377
nn12690msgid ""
6202msgid "<literal>Glib::ValueBase get_value() const</literal>: Gets the current dr12691"<literal>Glib::ValueBase get_value() const</literal>: Gets the current drop "
>op data, as a <classname>Glib::Value</classname>." 
12692"data, as a <classname>Glib::Value</classname>."
6203msgstr ""12693msgstr ""
nn12694"<literal>Glib::ValueBase get_value() const</literal>: Erhåller aktuella "
12695"släppdata, som ett <classname>Glib::Value</classname>."
620412696
6205#. (itstool) path: listitem/para12697#. (itstool) path: listitem/para
6206#: C/index-in.docbook:538312698#: C/index-in.docbook:5383
n6207msgid "<literal>void reject()</literal>: Rejects the ongoing drop operation. Thin12699msgid ""
>s function should be used when delaying the decision on whether to accept a drag 
> or not until after reading the data." 
12700"<literal>void reject()</literal>: Rejects the ongoing drop operation. This "
12701"function should be used when delaying the decision on whether to accept a "
12702"drag or not until after reading the data."
6208msgstr ""12703msgstr ""
nn12704"<literal>void reject()</literal>: Förkastar den pågående släpp-operationen. "
12705"Denna funktion bör användas vid fördröjning av beslutet huruvida en dragning "
12706"ska accepteras eller inte förrän data har lästs."
620912707
6210#. (itstool) path: section/para12708#. (itstool) path: section/para
6211#: C/index-in.docbook:536112709#: C/index-in.docbook:5361
6212msgid "Some <classname>DropTarget</classname> methods: <_:itemizedlist-1/>"12710msgid "Some <classname>DropTarget</classname> methods: <_:itemizedlist-1/>"
n6213msgstr ""n12711msgstr "Några <classname>DropTarget</classname>-metoder: <_:itemizedlist-1/>"
621412712
6215#. (itstool) path: section/para12713#. (itstool) path: section/para
6216#: C/index-in.docbook:539712714#: C/index-in.docbook:5397
n6217msgid "When a drop target has accepted a dragged item, certain signals will be en12715#, fuzzy
>mitted, depending on what action has been selected. For instance, the user might 
> have held down the <keycap>Shift</keycap> key to specify a <literal>move</liter 
>al> rather than a <literal>copy</literal>. Remember that the user can only selec 
>t the actions which you have specified in your calls to <methodname>Gtk::DragSou 
>rce::set_actions()</methodname> and <methodname>Gtk::DropTarget::set_actions()</ 
>methodname>." 
12716msgid ""
12717"When a drop target has accepted a dragged item, certain signals will be "
12718"emitted, depending on what action has been selected. For instance, the user "
12719"might have held down the <keycap>Shift</keycap> key to specify a "
12720"<literal>move</literal> rather than a <literal>copy</literal>. Remember that "
12721"the user can only select the actions which you have specified in your calls "
12722"to <methodname>Gtk::DragSource::set_actions()</methodname> and "
12723"<methodname>Gtk::DropTarget::set_actions()</methodname>."
6218msgstr ""12724msgstr ""
nn12725"När ett släppmål har accepterat ett draget objekt kommer vissa signaler "
12726"sändas ut, beroende på vilken åtgärd som har valts. Användaren kan "
12727"exempelvis ha hållit ner <keycap>Skift</keycap>-tangenten för att ange ett "
12728"<literal>move</literal> snarare än ett <literal>copy</literal>. Kom ihåg att "
12729"användaren endast kan välja åtgärderna som du har angivit i dina anrop till "
12730"<methodname>Gtk::DragSource::set_actions()</methodname> och <methodname>Gtk::"
12731"DropTarget::set_actions()</methodname>."
621912732
6220#. (itstool) path: listitem/para12733#. (itstool) path: listitem/para
6221#: C/index-in.docbook:541012734#: C/index-in.docbook:5410
nn12735msgid ""
6222msgid "<literal>drag_begin</literal>: Provides a <classname>Gdk::Drag</classname12736"<literal>drag_begin</literal>: Provides a <classname>Gdk::Drag</classname>."
>>." 
6223msgstr ""12737msgstr ""
nn12738"<literal>drag_begin</literal>: Tillhandahåller en <classname>Gdk::Drag</"
12739"classname>."
622412740
6225#. (itstool) path: listitem/para12741#. (itstool) path: listitem/para
6226#: C/index-in.docbook:541112742#: C/index-in.docbook:5411
n6227msgid "<literal>prepare</literal>: Shall return a <classname>Gdk::ContentProviden12743msgid ""
>r</classname>, with the data to use for the drag that is about to start." 
12744"<literal>prepare</literal>: Shall return a <classname>Gdk::ContentProvider</"
12745"classname>, with the data to use for the drag that is about to start."
6228msgstr ""12746msgstr ""
nn12747"<literal>prepare</literal>: Ska returnera en <classname>Gdk::"
12748"ContentProvider</classname>, med data att använda för dragningen som håller "
12749"på att börja."
622912750
6230#. (itstool) path: listitem/para12751#. (itstool) path: listitem/para
6231#: C/index-in.docbook:541312752#: C/index-in.docbook:5413
n6232msgid "<literal>drag_end</literal>: Provides a <classname>Gdk::Drag</classname>,n12753#, fuzzy
> and a <type>bool</type> that tells if the drag was performing a <literal>move</ 
>literal> and the data should be deleted." 
12754msgid ""
12755"<literal>drag_end</literal>: Provides a <classname>Gdk::Drag</classname>, "
12756"and a <type>bool</type> that tells if the drag was performing a "
12757"<literal>move</literal> and the data should be deleted."
6233msgstr ""12758msgstr ""
nn12759"<literal>drag_end</literal>: Tillhandahåller en <classname>Gdk::Drag</"
12760"classname>, och en <type>bool</type> som berättar om dragningen utförde ett "
12761"<literal>move</literal> och att data ska tas bort."
623412762
6235#. (itstool) path: listitem/para12763#. (itstool) path: listitem/para
6236#: C/index-in.docbook:541612764#: C/index-in.docbook:5416
nn12765msgid ""
6237msgid "<literal>drag_cancel</literal>: Emitted on the drag source when a drag ha12766"<literal>drag_cancel</literal>: Emitted on the drag source when a drag has "
>failed." 
12767"failed."
6238msgstr ""12768msgstr ""
nn12769"<literal>drag_cancel</literal>: Sänds ut på dragkällan när en dragning har "
12770"misslyckats."
623912771
6240#. (itstool) path: section/para12772#. (itstool) path: section/para
6241#: C/index-in.docbook:540712773#: C/index-in.docbook:5407
nn12774msgid ""
6242msgid "The source widget will emit these <classname>DragSource</classname> signa12775"The source widget will emit these <classname>DragSource</classname> signals: "
>ls: <_:itemizedlist-1/>" 
12776"<_:itemizedlist-1/>"
6243msgstr ""12777msgstr ""
nn12778"Källkomponenten kommer sända ut dessa <classname>DragSource</classname>-"
12779"signaler: <_:itemizedlist-1/>"
624412780
6245#. (itstool) path: listitem/para12781#. (itstool) path: listitem/para
6246#: C/index-in.docbook:542212782#: C/index-in.docbook:5422
nn12783msgid ""
6247msgid "<literal>enter</literal>: Provides coordinates. Shall return the preferre12784"<literal>enter</literal>: Provides coordinates. Shall return the preferred "
><type>Gdk::DragAction</type>." 
12785"<type>Gdk::DragAction</type>."
6248msgstr ""12786msgstr ""
nn12787"<literal>enter</literal>: Tillhandahåller koordinater. Ska returnera "
12788"föredragen <type>Gdk::DragAction</type>."
624912789
nn12790# TODO: Description is same as enter?
6250#. (itstool) path: listitem/para12791#. (itstool) path: listitem/para
6251#: C/index-in.docbook:542412792#: C/index-in.docbook:5424
nn12793msgid ""
6252msgid "<literal>motion</literal>: Provides coordinates. Shall return the preferr12794"<literal>motion</literal>: Provides coordinates. Shall return the preferred "
>ed <type>Gdk::DragAction</type>." 
12795"<type>Gdk::DragAction</type>."
6253msgstr ""12796msgstr ""
nn12797"<literal>motion</literal>: Tillhandahåller koordinater. Ska returnera "
12798"föredragen <type>Gdk::DragAction</type>."
625412799
6255#. (itstool) path: listitem/para12800#. (itstool) path: listitem/para
6256#: C/index-in.docbook:542612801#: C/index-in.docbook:5426
nn12802msgid ""
6257msgid "<literal>leave</literal>: Emitted on the drop site when the pointer leave12803"<literal>leave</literal>: Emitted on the drop site when the pointer leaves "
>the widget." 
12804"the widget."
6258msgstr ""12805msgstr ""
nn12806"<literal>leave</literal>: Sänds ut på släpplatsen när pekaren lämnar "
12807"komponenten."
625912808
6260#. (itstool) path: listitem/para12809#. (itstool) path: listitem/para
6261#: C/index-in.docbook:542812810#: C/index-in.docbook:5428
n6262msgid "<literal>accept</literal>: Provides a <classname>Gdk::Drop</classname>. Yn12811msgid ""
>ou can call the <methodname>status()</methodname> method of the <classname>Gdk:: 
>Drop</classname> to indicate which actions will be accepted." 
12812"<literal>accept</literal>: Provides a <classname>Gdk::Drop</classname>. You "
12813"can call the <methodname>status()</methodname> method of the <classname>Gdk::"
12814"Drop</classname> to indicate which actions will be accepted."
6263msgstr ""12815msgstr ""
nn12816"<literal>accept</literal>: Tillhandahåller en <classname>Gdk::Drop</"
12817"classname>. Du kan anropa <methodname>status()</methodname>-metoden för "
12818"denna <classname>Gdk::Drop</classname> för att indikera vilka åtgärder som "
12819"kommer accepteras."
626412820
6265#. (itstool) path: listitem/para12821#. (itstool) path: listitem/para
6266#: C/index-in.docbook:543112822#: C/index-in.docbook:5431
n6267msgid "<literal>drop</literal>: Provides the data being dropped and coordinates.n12823msgid ""
> Shall return a <type>bool</type> indicating whether the drop was accepted." 
12824"<literal>drop</literal>: Provides the data being dropped and coordinates. "
12825"Shall return a <type>bool</type> indicating whether the drop was accepted."
6268msgstr ""12826msgstr ""
nn12827"<literal>drop</literal>: Tillhandahåller de data som släpps och koordinater. "
12828"Ska returnera en <type>bool</type> som indikerar huruvida släppet "
12829"accepterades."
626912830
6270#. (itstool) path: section/para12831#. (itstool) path: section/para
6271#: C/index-in.docbook:541912832#: C/index-in.docbook:5419
nn12833msgid ""
6272msgid "The target widget will emit these <classname>DropTarget</classname> signa12834"The target widget will emit these <classname>DropTarget</classname> signals: "
>ls: <_:itemizedlist-1/>" 
12835"<_:itemizedlist-1/>"
6273msgstr ""12836msgstr ""
nn12837"Målkomponenten kommer sända ut dessa <classname>DropTarget</classname>-"
12838"signaler: <_:itemizedlist-1/>"
627412839
6275#. (itstool) path: listitem/para12840#. (itstool) path: listitem/para
6276#: C/index-in.docbook:544112841#: C/index-in.docbook:5441
6277msgid "<methodname>Gtk::DragSource::signal_prepare()</methodname>"12842msgid "<methodname>Gtk::DragSource::signal_prepare()</methodname>"
n6278msgstr ""n12843msgstr "<methodname>Gtk::DragSource::signal_prepare()</methodname>"
627912844
6280#. (itstool) path: listitem/para12845#. (itstool) path: listitem/para
6281#: C/index-in.docbook:544212846#: C/index-in.docbook:5442
6282msgid "<methodname>Gtk::DropTarget::signal_enter()</methodname>"12847msgid "<methodname>Gtk::DropTarget::signal_enter()</methodname>"
n6283msgstr ""n12848msgstr "<methodname>Gtk::DropTarget::signal_enter()</methodname>"
628412849
6285#. (itstool) path: listitem/para12850#. (itstool) path: listitem/para
6286#: C/index-in.docbook:544312851#: C/index-in.docbook:5443
6287msgid "<methodname>Gtk::DropTarget::signal_motion()</methodname>"12852msgid "<methodname>Gtk::DropTarget::signal_motion()</methodname>"
n6288msgstr ""n12853msgstr "<methodname>Gtk::DropTarget::signal_motion()</methodname>"
628912854
6290#. (itstool) path: listitem/para12855#. (itstool) path: listitem/para
6291#: C/index-in.docbook:544412856#: C/index-in.docbook:5444
6292msgid "<methodname>Gtk::DropTarget::signal_accept()</methodname>"12857msgid "<methodname>Gtk::DropTarget::signal_accept()</methodname>"
n6293msgstr ""n12858msgstr "<methodname>Gtk::DropTarget::signal_accept()</methodname>"
629412859
6295#. (itstool) path: listitem/para12860#. (itstool) path: listitem/para
6296#: C/index-in.docbook:544512861#: C/index-in.docbook:5445
6297msgid "<methodname>Gtk::DropTarget::signal_drop()</methodname>"12862msgid "<methodname>Gtk::DropTarget::signal_drop()</methodname>"
n6298msgstr ""n12863msgstr "<methodname>Gtk::DropTarget::signal_drop()</methodname>"
629912864
6300#. (itstool) path: section/para12865#. (itstool) path: section/para
6301#: C/index-in.docbook:543512866#: C/index-in.docbook:5435
n6302msgid "The following signals call only one signal handler when emitted. When youn12867msgid ""
> connect a handler to such a signal, your signal handler must be called before ( 
>instead of) the default handler, otherwise it won't be called. Set the <literal> 
>after</literal> parameter in <methodname>connect()</methodname> to <literal>fals 
>e</literal>. <_:itemizedlist-1/>" 
12868"The following signals call only one signal handler when emitted. When you "
12869"connect a handler to such a signal, your signal handler must be called "
12870"before (instead of) the default handler, otherwise it won't be called. Set "
12871"the <literal>after</literal> parameter in <methodname>connect()</methodname> "
12872"to <literal>false</literal>. <_:itemizedlist-1/>"
6303msgstr ""12873msgstr ""
nn12874"Följande signaler anropar endast en signalhanterare när de sänds ut. När du "
12875"ansluter en hanterare till en sådan signal måste din signalhanterare anropas "
12876"före (i stället för) standardhanteraren, annars kommer den inte anropas. "
12877"Ställ in parametern <literal>after</literal> i <methodname>connect()</"
12878"methodname> till <literal>false</literal>. <_:itemizedlist-1/>"
630412879
6305#. (itstool) path: section/para12880#. (itstool) path: section/para
6306#: C/index-in.docbook:545412881#: C/index-in.docbook:5454
nn12882#, fuzzy
12883msgid ""
6307msgid "Here is a very simple example, demonstrating a drag and drop <literal>Cop12884"Here is a very simple example, demonstrating a drag and drop <literal>Copy</"
>y</literal> operation:" 
12885"literal> operation:"
6308msgstr ""12886msgstr ""
nn12887"Här är ett väldigt enkelt exempel som demonstrerar en dra-och-släpp-"
12888"operation för <literal>Copy</literal>:"
630912889
6310#. (itstool) path: imageobject/imagedata12890#. (itstool) path: imageobject/imagedata
6311#. This is a reference to an external file such as an image or video. When12891#. This is a reference to an external file such as an image or video. When
6312#. the file changes, the md5 hash will change to let you know you need to12892#. the file changes, the md5 hash will change to let you know you need to
6313#. update your localized copy. The msgstr is not used at all. Set it to12893#. update your localized copy. The msgstr is not used at all. Set it to
6314#. whatever you like once you have updated your copy of the file.12894#. whatever you like once you have updated your copy of the file.
6315#: C/index-in.docbook:545912895#: C/index-in.docbook:5459
nn12896#, fuzzy
6316msgctxt "_"12897msgctxt "_"
n6317msgid "external ref='figures/drag_and_drop.png' md5='c13dd8b7faa3d523444c101e425n12898msgid ""
>72a10'" 
12899"external ref='figures/drag_and_drop.png' "
12900"md5='c13dd8b7faa3d523444c101e42572a10'"
6318msgstr ""12901msgstr ""
nn12902"external ref='figures/drag_and_drop.png' "
12903"md5='c13dd8b7faa3d523444c101e42572a10'"
631912904
6320#. (itstool) path: section/para12905#. (itstool) path: section/para
6321#: C/index-in.docbook:546312906#: C/index-in.docbook:5463
n6322msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren12907msgid ""
>e/master/examples/book/drag_and_drop\">Source Code</link>" 
12908"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12909"master/examples/book/drag_and_drop\">Source Code</link>"
6323msgstr ""12910msgstr ""
nn12911"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
12912"master/examples/book/drag_and_drop\">Källkod</link>"
632412913
6325#. (itstool) path: section/para12914#. (itstool) path: section/para
6326#: C/index-in.docbook:546512915#: C/index-in.docbook:5465
6327msgid "There is a more complex example in examples/others/dnd."12916msgid "There is a more complex example in examples/others/dnd."
n6328msgstr ""n12917msgstr "Det finns ett mer komplext exempel i examples/others/dnd."
632912918
6330#. (itstool) path: chapter/title12919#. (itstool) path: chapter/title
6331#: C/index-in.docbook:547412920#: C/index-in.docbook:5474
nn12921#, fuzzy
6332msgid "The Clipboard"12922msgid "The Clipboard"
n6333msgstr ""n12923msgstr "Urklipp"
633412924
6335#. (itstool) path: chapter/para12925#. (itstool) path: chapter/para
6336#: C/index-in.docbook:547612926#: C/index-in.docbook:5476
n6337msgid "Simple text copy-paste functionality is provided for free by widgets suchn12927msgid ""
> as <classname>Gtk::Entry</classname> and <classname>Gtk::TextView</classname>,  
>but you might need special code to deal with your own data formats. For instance 
>, a drawing program would need special code to allow copy and paste within a vie 
>w, or between documents." 
12928"Simple text copy-paste functionality is provided for free by widgets such as "
12929"<classname>Gtk::Entry</classname> and <classname>Gtk::TextView</classname>, "
12930"but you might need special code to deal with your own data formats. For "
12931"instance, a drawing program would need special code to allow copy and paste "
12932"within a view, or between documents."
6338msgstr ""12933msgstr ""
nn12934"Enkel kopiera/klistra in-funktionalitet för text tillhandahålls på köpet av "
12935"komponenter som <classname>Gtk::Entry</classname> och <classname>Gtk::"
12936"TextView</classname>, men du kan behöva specialkod för att hantera dina egna "
12937"dataformat. Exempelvis skulle ett ritprogram behöva specialkod för att "
12938"tillåta kopiering och inklistring i en vy, eller mellan dokument."
633912939
6340#. (itstool) path: chapter/para12940#. (itstool) path: chapter/para
6341#: C/index-in.docbook:548212941#: C/index-in.docbook:5482
n6342msgid "You can get a clipboard instance with <methodname>Gtk::Widget::get_clipbon12942#, fuzzy
>ard()</methodname> or <methodname>Gdk::Display::get_clipboard()</methodname>." 
12943msgid ""
12944"You can get a clipboard instance with <methodname>Gtk::Widget::"
12945"get_clipboard()</methodname> or <methodname>Gdk::Display::get_clipboard()</"
12946"methodname>."
6343msgstr ""12947msgstr ""
nn12948"Du kan få en urklippsinstans med <methodname>Gtk::Widget::get_clipboard()</"
12949"methodname> eller <methodname>Gdk::Display::get_clipboard()</methodname>."
634412950
6345#. (itstool) path: chapter/para12951#. (itstool) path: chapter/para
6346#: C/index-in.docbook:548712952#: C/index-in.docbook:5487
n6347msgid "Your application doesn't need to wait for clipboard operations, particulan12953#, fuzzy
>rly between the time when the user chooses Copy and then later chooses Paste. Ma 
>ny <classname>Gdk::Clipboard</classname> methods take <classname>sigc::slot</cla 
>ssname>s which specify callback methods. When <classname>Gdk::Clipboard</classna 
>me> is ready, it will call these methods, providing the requested data." 
12954msgid ""
12955"Your application doesn't need to wait for clipboard operations, particularly "
12956"between the time when the user chooses Copy and then later chooses Paste. "
12957"Many <classname>Gdk::Clipboard</classname> methods take <classname>sigc::"
12958"slot</classname>s which specify callback methods. When <classname>Gdk::"
12959"Clipboard</classname> is ready, it will call these methods, providing the "
12960"requested data."
6348msgstr ""12961msgstr ""
nn12962"Ditt program behöver inte vänta på urklippsoperationer, speciellt mellan "
12963"tiden när användaren väljer Kopiera och sedan senare väljer Klistra in. "
12964"Många <classname>Gdk::Clipboard</classname>-metoder tar <classname>sigc::"
12965"slot</classname> som anger återanropsmetoder. När <classname>Gdk::Clipboard</"
12966"classname> är redo kommer det anropa dessa metoder, och tillhandahålla "
12967"begärda data."
634912968
6350#. (itstool) path: chapter/para12969#. (itstool) path: chapter/para
6351#: C/index-in.docbook:549512970#: C/index-in.docbook:5495
n6352msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGdk_1_n12971msgid ""
>1Clipboard.html\">Reference</link>" 
12972"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
12973"classGdk_1_1Clipboard.html\">Reference</link>"
6353msgstr ""12974msgstr ""
nn12975"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
12976"classGdk_1_1Clipboard.html\">Referens</link>"
635412977
6355#. (itstool) path: section/title12978#. (itstool) path: section/title
6356#: C/index-in.docbook:549812979#: C/index-in.docbook:5498
6357msgid "Formats"12980msgid "Formats"
n6358msgstr ""n12981msgstr "Format"
635912982
6360#. (itstool) path: section/para12983#. (itstool) path: section/para
6361#: C/index-in.docbook:550012984#: C/index-in.docbook:5500
n6362msgid "Different applications contain different types of data, and they might man12985msgid ""
>ke that data available in a variety of formats. <application>gtkmm</application> 
> calls these data types <literal>format</literal>s." 
12986"Different applications contain different types of data, and they might make "
12987"that data available in a variety of formats. <application>gtkmm</"
12988"application> calls these data types <literal>format</literal>s."
6363msgstr ""12989msgstr ""
nn12990"Olika program innehåller olika typer av data, och de kan göra dessa data "
12991"tillgängliga i ett antal olika format. <application>gtkmm</application> "
12992"kallar dessa datatyper för <literal>format</literal>."
636412993
6365#. (itstool) path: section/para12994#. (itstool) path: section/para
6366#: C/index-in.docbook:550412995#: C/index-in.docbook:5504
n6367msgid "For instance, <application>gedit</application> can supply and receive then12996#, fuzzy
> <literal>text/plain</literal> mime type, so you can paste data into <applicatio 
>n>gedit</application> from any application that supplies that format. Or two dif 
>ferent image editing applications might supply and receive a variety of image fo 
>rmats. As long as one application can receive one of the formats that the other  
>supplies then you will be able to copy data from one to the other." 
12997msgid ""
12998"For instance, <application>gedit</application> can supply and receive the "
12999"<literal>text/plain</literal> mime type, so you can paste data into "
13000"<application>gedit</application> from any application that supplies that "
13001"format. Or two different image editing applications might supply and receive "
13002"a variety of image formats. As long as one application can receive one of "
13003"the formats that the other supplies then you will be able to copy data from "
13004"one to the other."
6368msgstr ""13005msgstr ""
nn13006"Exempelvis kan <application>gedit</application> tillhandahålla och ta emot "
13007"mime-typen <literal>text/plain</literal>, så du kan klistra in data i "
13008"<application>gedit</application> från alla program som tillhandahåller det "
13009"formatet. Eller så kan två olika bildredigeringsprogram tillhandahålla och "
13010"ta emot ett antal bildformat. Så länge som ett program kan ta emot ett av "
13011"formaten som det andra tillhandahåller så kommer du kunna kopiera data från "
13012"ett till det andra."
636913013
6370#. (itstool) path: section/para13014#. (itstool) path: section/para
6371#: C/index-in.docbook:551213015#: C/index-in.docbook:5512
n6372msgid "Clipboard data can be in a variety of binary formats. This chapter, and tn13016#, fuzzy
>he examples, assume that the data is 8-bit text. This would allow us to use an X 
>ML format for the clipboard data. However this would probably not be appropriate 
> for binary data such as images." 
13017msgid ""
13018"Clipboard data can be in a variety of binary formats. This chapter, and the "
13019"examples, assume that the data is 8-bit text. This would allow us to use an "
13020"XML format for the clipboard data. However this would probably not be "
13021"appropriate for binary data such as images."
6373msgstr ""13022msgstr ""
nn13023"Urklippsdata kan vara i ett antal binära format. Detta kapitel och exemplen "
13024"antar att data är 8-bitars text, Detta skulle låta oss använda ett XML-"
13025"format för urklippsdata. Detta skulle dock troligen inte var lämpligt för "
13026"binärdata som bilder."
637413027
6375#. (itstool) path: section/para13028#. (itstool) path: section/para
6376#: C/index-in.docbook:551913029#: C/index-in.docbook:5519
n6377msgid "The <link linkend=\"chapter-draganddrop\">Drag and Drop</link> API uses tn13030#, fuzzy
>he same mechanism. You should probably use the same data formats for both Clipbo 
>ard and Drag and Drop operations." 
13031msgid ""
13032"The <link linkend=\"chapter-draganddrop\">Drag and Drop</link> API uses the "
13033"same mechanism. You should probably use the same data formats for both "
13034"Clipboard and Drag and Drop operations."
6378msgstr ""13035msgstr ""
nn13036"<link linkend=\"chapter-draganddrop\">Dra och släpp</link>-API:t använder "
13037"samma mekanism. Du bör troligen använda samma dataformat för både urklipps- "
13038"och ”dra och släpp”-operationer."
637913039
6380#. (itstool) path: section/title13040#. (itstool) path: section/title
6381#: C/index-in.docbook:552413041#: C/index-in.docbook:5524
6382msgid "Copy"13042msgid "Copy"
n6383msgstr ""n13043msgstr "Kopiera"
638413044
6385#. (itstool) path: section/para13045#. (itstool) path: section/para
6386#: C/index-in.docbook:552613046#: C/index-in.docbook:5526
n6387msgid "When the user asks to copy some data, you should copy the data to the <cln13047#, fuzzy
>assname>Clipboard</classname>. For instance," 
13048msgid ""
13049"When the user asks to copy some data, you should copy the data to the "
13050"<classname>Clipboard</classname>. For instance,"
6388msgstr ""13051msgstr ""
nn13052"När användaren ber dig kopiera data bör du kopiera dessa data till ett "
13053"<classname>Clipboard</classname>. Till exempel,"
638913054
6390#. (itstool) path: section/programlisting13055#. (itstool) path: section/programlisting
6391#: C/index-in.docbook:553013056#: C/index-in.docbook:5530
n6392#, no-wrapn13057#, fuzzy, no-wrap
6393msgid ""13058msgid ""
6394"<code>void ExampleWindow::on_button_copy()\n"13059"<code>void ExampleWindow::on_button_copy()\n"
6395"{\n"13060"{\n"
6396"  get_clipboard()-&gt;set_text(\"example_custom_target\");\n"13061"  get_clipboard()-&gt;set_text(\"example_custom_target\");\n"
6397"}</code>"13062"}</code>"
6398msgstr ""13063msgstr ""
nn13064"void ExampleWindow::on_button_copy()\n"
13065"{\n"
13066"  get_clipboard()-&gt;set_text(\"example_custom_target\");\n"
13067"}"
639913068
6400#. (itstool) path: section/title13069#. (itstool) path: section/title
6401#: C/index-in.docbook:553813070#: C/index-in.docbook:5538
6402msgid "Paste"13071msgid "Paste"
n6403msgstr ""n13072msgstr "Klistra in"
640413073
6405#. (itstool) path: section/para13074#. (itstool) path: section/para
6406#: C/index-in.docbook:554013075#: C/index-in.docbook:5540
n6407msgid "When the user asks to paste data from the <classname>Clipboard</classnamen13076#, fuzzy
>>, you should request a specific format and provide a callback method which will 
> be called with the actual data. For instance:" 
13077msgid ""
13078"When the user asks to paste data from the <classname>Clipboard</classname>, "
13079"you should request a specific format and provide a callback method which "
13080"will be called with the actual data. For instance:"
6408msgstr ""13081msgstr ""
nn13082"När användaren ber att klistra in data från <classname>Clipboard</classname> "
13083"bör du begära ett specifikt format och tillhandahålla en återanropsmetod som "
13084"kommer anropas med faktiska data. Till exempel:"
640913085
6410#. (itstool) path: section/programlisting13086#. (itstool) path: section/programlisting
6411#: C/index-in.docbook:554513087#: C/index-in.docbook:5545
n6412#, no-wrapn13088#, fuzzy, no-wrap
13089#| msgid ""
13090#| "void ExampleWindow::on_button_paste()\n"
13091#| "{\n"
13092#| "  get_clipboard()-&gt;read_text_async(sigc::mem_fun(*this,\n"
13093#| "              &amp;ExampleWindow::on_clipboard_received));\n"
13094#| "}"
6413msgid ""13095msgid ""
6414"<code>void ExampleWindow::on_button_paste()\n"13096"<code>void ExampleWindow::on_button_paste()\n"
6415"{\n"13097"{\n"
6416"  get_clipboard()-&gt;read_text_async(sigc::mem_fun(*this,\n"13098"  get_clipboard()-&gt;read_text_async(sigc::mem_fun(*this,\n"
6417"              &amp;ExampleWindow::on_clipboard_received));\n"13099"              &amp;ExampleWindow::on_clipboard_received));\n"
6418"}</code>"13100"}</code>"
6419msgstr ""13101msgstr ""
nn13102"void ExampleWindow::on_button_paste()\n"
13103"{\n"
13104"  get_clipboard()-&gt;read_text_async(sigc::mem_fun(*this,\n"
13105"              &amp;ExampleWindow::on_clipboard_received));\n"
13106"}"
642013107
6421#. (itstool) path: section/para13108#. (itstool) path: section/para
6422#: C/index-in.docbook:555113109#: C/index-in.docbook:5551
6423msgid "Here is an example callback method:"13110msgid "Here is an example callback method:"
n6424msgstr ""n13111msgstr "Här är ett exempel på en återanropsmetod:"
642513112
6426#. (itstool) path: section/programlisting13113#. (itstool) path: section/programlisting
6427#: C/index-in.docbook:555313114#: C/index-in.docbook:5553
n6428#, no-wrapn13115#, fuzzy, no-wrap
6429msgid ""13116msgid ""
6430"<code>void ExampleWindow::on_clipboard_received(Glib::RefPtr&lt;Gio::AsyncResul13117"<code>void ExampleWindow::on_clipboard_received(Glib::RefPtr&lt;Gio::AsyncResul
>t&gt;&amp; result)\n">t&gt;&amp; result)\n"
6431"{\n"13118"{\n"
6432"  auto text = get_clipboard()-&gt;read_text_finish(result);\n"13119"  auto text = get_clipboard()-&gt;read_text_finish(result);\n"
6433"  //Do something with the pasted data.\n"13120"  //Do something with the pasted data.\n"
6434"}</code>"13121"}</code>"
6435msgstr ""13122msgstr ""
nn13123"void ExampleWindow::on_clipboard_received(Glib::RefPtr&lt;Gio::AsyncResult&gt;&
 >amp; result)\n"
13124"{\n"
13125"  auto text = get_clipboard()-&gt;read_text_finish(result);\n"
13126"  //Gör något med inklistrade data.\n"
13127"}"
643613128
6437#. (itstool) path: section/title13129#. (itstool) path: section/title
6438#: C/index-in.docbook:556013130#: C/index-in.docbook:5560
6439msgid "Discovering the available formats"13131msgid "Discovering the available formats"
n6440msgstr ""n13132msgstr "Upptäcka de tillgängliga formaten"
644113133
6442#. (itstool) path: section/para13134#. (itstool) path: section/para
6443#: C/index-in.docbook:556213135#: C/index-in.docbook:5562
n6444msgid "To find out what formats are currently available on the <classname>Clipbon13136#, fuzzy
>ard</classname> for pasting, call the <methodname>get_formats()</methodname> met 
>hod. Then call a <classname>Gdk::ContentFormats</classname> method to find out i 
>f a format that your application supports is available." 
13137msgid ""
13138"To find out what formats are currently available on the "
13139"<classname>Clipboard</classname> for pasting, call the "
13140"<methodname>get_formats()</methodname> method. Then call a <classname>Gdk::"
13141"ContentFormats</classname> method to find out if a format that your "
13142"application supports is available."
6445msgstr ""13143msgstr ""
nn13144"För att få reda på vilka format som för närvarande är tillgängliga för "
13145"inklistring i <classname>Clipboard</classname>, anropa metoden "
13146"<methodname>get_formats()</methodname>. Anropa sedan en <classname>Gdk::"
13147"ContentFormats</classname>-metod för att få reda på om ett format som ditt "
13148"program stöder finns tillgängligt."
644613149
6447#. (itstool) path: section/title13150#. (itstool) path: section/title
n6448#: C/index-in.docbook:5576n13151#: C/index-in.docbook:5576 C/index-in.docbook:5968
6449#: C/index-in.docbook:5968
6450msgid "Simple"13152msgid "Simple"
n6451msgstr ""n13153msgstr "Enkelt"
645213154
6453#. (itstool) path: section/para13155#. (itstool) path: section/para
6454#: C/index-in.docbook:557713156#: C/index-in.docbook:5577
n6455msgid "This example allows copy and pasting of application-specific data, using n13157#, fuzzy
>the standard text format. Although this is simple, it's not ideal because it doe 
>s not identify the <classname>Clipboard</classname> data as being of a particula 
>r type." 
13158msgid ""
13159"This example allows copy and pasting of application-specific data, using the "
13160"standard text format. Although this is simple, it's not ideal because it "
13161"does not identify the <classname>Clipboard</classname> data as being of a "
13162"particular type."
6456msgstr ""13163msgstr ""
nn13164"Detta exempel tillåter kopiering och inklistring av programspecifika data, "
13165"med standardtextformatet. Även om detta är enkelt är det inte idealiskt då "
13166"det inte identifierar <classname>Clipboard</classname>-data som varande av "
13167"en viss typ."
645713168
6458#. (itstool) path: figure/title13169#. (itstool) path: figure/title
6459#: C/index-in.docbook:558513170#: C/index-in.docbook:5585
6460msgid "Clipboard - Simple"13171msgid "Clipboard - Simple"
n6461msgstr ""n13172msgstr "Urklipp - Enkelt"
646213173
6463#. (itstool) path: imageobject/imagedata13174#. (itstool) path: imageobject/imagedata
6464#. This is a reference to an external file such as an image or video. When13175#. This is a reference to an external file such as an image or video. When
6465#. the file changes, the md5 hash will change to let you know you need to13176#. the file changes, the md5 hash will change to let you know you need to
6466#. update your localized copy. The msgstr is not used at all. Set it to13177#. update your localized copy. The msgstr is not used at all. Set it to
6467#. whatever you like once you have updated your copy of the file.13178#. whatever you like once you have updated your copy of the file.
6468#: C/index-in.docbook:558713179#: C/index-in.docbook:5587
nn13180#, fuzzy
6469msgctxt "_"13181msgctxt "_"
n6470msgid "external ref='figures/clipboard_simple.png' md5='9eab8350b743743e1571f1d2n13182msgid ""
>45aea35c'" 
13183"external ref='figures/clipboard_simple.png' "
13184"md5='9eab8350b743743e1571f1d245aea35c'"
6471msgstr ""13185msgstr ""
nn13186"external ref='figures/clipboard_simple.png' "
13187"md5='9eab8350b743743e1571f1d245aea35c'"
647213188
6473#. (itstool) path: section/para13189#. (itstool) path: section/para
6474#: C/index-in.docbook:559113190#: C/index-in.docbook:5591
n6475msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren13191msgid ""
>e/master/examples/book/clipboard/simple/\">Source Code</link>" 
13192"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
13193"master/examples/book/clipboard/simple/\">Source Code</link>"
6476msgstr ""13194msgstr ""
nn13195"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
13196"master/examples/book/clipboard/simple/\">Källkod</link>"
647713197
6478#. (itstool) path: section/title13198#. (itstool) path: section/title
6479#: C/index-in.docbook:559613199#: C/index-in.docbook:5596
6480msgid "Ideal"13200msgid "Ideal"
n6481msgstr ""n13201msgstr "Idealiskt"
648213202
6483#. (itstool) path: listitem/simpara13203#. (itstool) path: listitem/simpara
6484#: C/index-in.docbook:559913204#: C/index-in.docbook:5599
6485msgid "Defines a custom clipboard target, though the format is still text."13205msgid "Defines a custom clipboard target, though the format is still text."
n6486msgstr ""n13206msgstr "Definierar ett anpassat urklippsmål, men formatet är fortfarande text."
648713207
6488#. (itstool) path: listitem/simpara13208#. (itstool) path: listitem/simpara
6489#: C/index-in.docbook:560013209#: C/index-in.docbook:5600
n6490msgid "It uses the <methodname>Gdk::ContentFormats::signal_changed()</methodnamen13210#, fuzzy
>> signal and disables the Paste button if it can't use anything on the clipboard 
>." 
13211msgid ""
13212"It uses the <methodname>Gdk::ContentFormats::signal_changed()</methodname> "
13213"signal and disables the Paste button if it can't use anything on the "
13214"clipboard."
6491msgstr ""13215msgstr ""
nn13216"Det använder signalen <methodname>Gdk::ContentFormats::signal_changed()</"
13217"methodname> och inaktiverar Paste-knappen om det inte kan använda något i "
13218"urklippet."
649213219
6493#. (itstool) path: section/para13220#. (itstool) path: section/para
6494#: C/index-in.docbook:559713221#: C/index-in.docbook:5597
6495msgid "This is like the simple example, but it <_:orderedlist-1/>"13222msgid "This is like the simple example, but it <_:orderedlist-1/>"
n6496msgstr ""n13223msgstr "Det här är som det enkla exemplet, men det <_:orderedlist-1/>"
649713224
6498#. (itstool) path: figure/title13225#. (itstool) path: figure/title
6499#: C/index-in.docbook:560613226#: C/index-in.docbook:5606
6500msgid "Clipboard - Ideal"13227msgid "Clipboard - Ideal"
n6501msgstr ""n13228msgstr "Urklipp - Idealiskt"
650213229
6503#. (itstool) path: imageobject/imagedata13230#. (itstool) path: imageobject/imagedata
6504#. This is a reference to an external file such as an image or video. When13231#. This is a reference to an external file such as an image or video. When
6505#. the file changes, the md5 hash will change to let you know you need to13232#. the file changes, the md5 hash will change to let you know you need to
6506#. update your localized copy. The msgstr is not used at all. Set it to13233#. update your localized copy. The msgstr is not used at all. Set it to
6507#. whatever you like once you have updated your copy of the file.13234#. whatever you like once you have updated your copy of the file.
6508#: C/index-in.docbook:560813235#: C/index-in.docbook:5608
nn13236#, fuzzy
6509msgctxt "_"13237msgctxt "_"
n6510msgid "external ref='figures/clipboard_ideal.png' md5='8f284904600e27efa06d39f07n13238msgid ""
>41acc2d'" 
13239"external ref='figures/clipboard_ideal.png' "
13240"md5='8f284904600e27efa06d39f0741acc2d'"
6511msgstr ""13241msgstr ""
nn13242"external ref='figures/clipboard_ideal.png' "
13243"md5='8f284904600e27efa06d39f0741acc2d'"
651213244
6513#. (itstool) path: section/para13245#. (itstool) path: section/para
6514#: C/index-in.docbook:561213246#: C/index-in.docbook:5612
n6515msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren13247msgid ""
>e/master/examples/book/clipboard/ideal/\">Source Code</link>" 
13248"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
13249"master/examples/book/clipboard/ideal/\">Source Code</link>"
6516msgstr ""13250msgstr ""
nn13251"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
13252"master/examples/book/clipboard/ideal/\">Källkod</link>"
651713253
6518#. (itstool) path: chapter/title13254#. (itstool) path: chapter/title
6519#: C/index-in.docbook:561913255#: C/index-in.docbook:5619
6520msgid "Printing"13256msgid "Printing"
n6521msgstr ""n13257msgstr "Utskrift"
652213258
6523#. (itstool) path: chapter/para13259#. (itstool) path: chapter/para
6524#: C/index-in.docbook:562113260#: C/index-in.docbook:5621
n6525msgid "At the application development level, <application>gtkmm</application>'s n13261#, fuzzy
>printing API provides dialogs that are consistent across applications and allows 
> use of Cairo's common drawing API, with Pango-driven text rendering. In the imp 
>lementation of this common API, platform-specific backends and printer-specific  
>drivers are used." 
13262msgid ""
13263"At the application development level, <application>gtkmm</application>'s "
13264"printing API provides dialogs that are consistent across applications and "
13265"allows use of Cairo's common drawing API, with Pango-driven text rendering. "
13266"In the implementation of this common API, platform-specific backends and "
13267"printer-specific drivers are used."
6526msgstr ""13268msgstr ""
nn13269"På programutvecklingsnivån tillhandahåller <application>gtkmm</application>:"
13270"s utskrifts-API dialogrutor som är konsekventa mellan program och tillåter "
13271"användning av Cairos gemensamma rit-API, med textrendering driven av Pango. "
13272"I implementationen av detta gemensamma API används plattformsspecifika "
13273"bakändar och skrivarspecifika drivrutiner."
652713274
6528#. (itstool) path: section/title13275#. (itstool) path: section/title
6529#: C/index-in.docbook:562713276#: C/index-in.docbook:5627
6530msgid "PrintOperation"13277msgid "PrintOperation"
n6531msgstr ""n13278msgstr "PrintOperation"
653213279
6533#. (itstool) path: section/para13280#. (itstool) path: section/para
6534#: C/index-in.docbook:562913281#: C/index-in.docbook:5629
n6535msgid "The primary object is <classname>Gtk::PrintOperation</classname>, allocatn13282#, fuzzy
>ed for each print operation. To handle page drawing connect to its signals, or i 
>nherit from it and override the default virtual signal handlers. <classname>Prin 
>tOperation</classname> automatically handles all the settings affecting the prin 
>t loop." 
13283msgid ""
13284"The primary object is <classname>Gtk::PrintOperation</classname>, allocated "
13285"for each print operation. To handle page drawing connect to its signals, or "
13286"inherit from it and override the default virtual signal handlers. "
13287"<classname>PrintOperation</classname> automatically handles all the settings "
13288"affecting the print loop."
6536msgstr ""13289msgstr ""
nn13290"Det primära objektet är <classname>Gtk::PrintOperation</classname>, "
13291"allokerat för varje utskriftsoperation. Anslut till dess signaler för att "
13292"hantera sidritning, eller ärv från den och åsidosätt de virtuella "
13293"standardsignalhanterarna. <classname>PrintOperation</classname> hanterar "
13294"automatiskt alla inställningar som påverkar utskriftsslingan."
653713295
6538#. (itstool) path: listitem/para13296#. (itstool) path: listitem/para
6539#: C/index-in.docbook:564613297#: C/index-in.docbook:5646
n6540msgid "<literal>begin_print</literal>: You must handle this signal, because thisn13298#, fuzzy
> is where you create and set up a <classname>Pango::Layout</classname> using the 
> provided <classname>Gtk::PrintContext</classname>, and break up your printing o 
>utput into pages." 
13299msgid ""
13300"<literal>begin_print</literal>: You must handle this signal, because this is "
13301"where you create and set up a <classname>Pango::Layout</classname> using the "
13302"provided <classname>Gtk::PrintContext</classname>, and break up your "
13303"printing output into pages."
6541msgstr ""13304msgstr ""
nn13305"<literal>begin_print</literal>: Du måste hantera denna signal, för detta är "
13306"var du skapar och konfigurerar en <classname>Pango::Layout</classname> med "
13307"tillhandahållen <classname>Gtk::PrintContext</classname>, och delar upp dina "
13308"utskriftsutdata i sidor."
654213309
6543#. (itstool) path: listitem/para13310#. (itstool) path: listitem/para
6544#: C/index-in.docbook:565613311#: C/index-in.docbook:5656
n6545msgid "<literal>paginate</literal>: Pagination is potentially slow so if you neen13312#, fuzzy
>d to monitor it you can call the <methodname>PrintOperation::set_show_progress() 
></methodname> method and handle this signal." 
13313msgid ""
13314"<literal>paginate</literal>: Pagination is potentially slow so if you need "
13315"to monitor it you can call the <methodname>PrintOperation::"
13316"set_show_progress()</methodname> method and handle this signal."
6546msgstr ""13317msgstr ""
nn13318"<literal>paginate</literal>: Paginering kan potentiellt vara långsam, så om "
13319"du behöver övervaka den kan du anropa metoden <methodname>PrintOperation::"
13320"set_show_progress()</methodname> och hantera denna signal."
654713321
6548#. (itstool) path: listitem/para13322#. (itstool) path: listitem/para
6549#: C/index-in.docbook:567013323#: C/index-in.docbook:5670
n6550msgid "<literal>request_page_setup</literal>: Provides a <classname>PrintContextn13324#, fuzzy
></classname>, page number and <classname>Gtk::PageSetup</classname>. Handle this 
> signal if you need to modify page setup on a per-page basis." 
13325msgid ""
13326"<literal>request_page_setup</literal>: Provides a <classname>PrintContext</"
13327"classname>, page number and <classname>Gtk::PageSetup</classname>. Handle "
13328"this signal if you need to modify page setup on a per-page basis."
6551msgstr ""13329msgstr ""
nn13330"<literal>request_page_setup</literal>: Tillhandahåller en "
13331"<classname>PrintContext</classname>, sidnummer och <classname>Gtk::"
13332"PageSetup</classname>. Hantera denna signal om du behöver ändra "
13333"sidinställningen för enskilda sidor."
655213334
6553#. (itstool) path: listitem/para13335#. (itstool) path: listitem/para
6554#: C/index-in.docbook:567913336#: C/index-in.docbook:5679
n6555msgid "<literal>draw_page</literal>: You must handle this signal, which providesn13337#, fuzzy
> a <classname>PrintContext</classname> and a page number. The <classname>PrintCo 
>ntext</classname> should be used to create a <classname>Cairo::Context</classnam 
>e> into which the provided page should be drawn. To render text, iterate over th 
>e <classname>Pango::Layout</classname> you created in the <literal>begin_print</ 
>literal> handler." 
13338msgid ""
13339"<literal>draw_page</literal>: You must handle this signal, which provides a "
13340"<classname>PrintContext</classname> and a page number. The "
13341"<classname>PrintContext</classname> should be used to create a "
13342"<classname>Cairo::Context</classname> into which the provided page should be "
13343"drawn. To render text, iterate over the <classname>Pango::Layout</classname> "
13344"you created in the <literal>begin_print</literal> handler."
6556msgstr ""13345msgstr ""
nn13346"<literal>draw_page</literal>: Du måste hantera denna signal som "
13347"tillhandahåller en <classname>PrintContext</classname> och ett sidnummer. "
13348"Denna <classname>PrintContext</classname> ska användas för att skapa en "
13349"<classname>Cairo::Context</classname> som den tillhandahållna sidan ska "
13350"ritas i. Iterera över den <classname>Pango::Layout</classname> du skapade i "
13351"<literal>begin_print</literal>-hanteraren för att rendera text."
655713352
6558#. (itstool) path: listitem/para13353#. (itstool) path: listitem/para
6559#: C/index-in.docbook:566513354#: C/index-in.docbook:5665
nn13355msgid ""
6560msgid "For each page that needs to be rendered, the following signals are emitte13356"For each page that needs to be rendered, the following signals are emitted: "
>d: <_:itemizedlist-1/>" 
13357"<_:itemizedlist-1/>"
6561msgstr ""13358msgstr ""
nn13359"För varje sida som behöver renderas sänds följande signaler ut: <_:"
13360"itemizedlist-1/>"
656213361
6563#. (itstool) path: listitem/para13362#. (itstool) path: listitem/para
6564#: C/index-in.docbook:569413363#: C/index-in.docbook:5694
n6565msgid "<literal>end_print</literal>: A handler for it is a safe place to free ann13364#, fuzzy
>y resources related to a <classname>PrintOperation</classname>. If you have your 
> custom class that inherits from <classname>PrintOperation</classname>, it is na 
>turally simpler to do it in the destructor." 
13365msgid ""
13366"<literal>end_print</literal>: A handler for it is a safe place to free any "
13367"resources related to a <classname>PrintOperation</classname>. If you have "
13368"your custom class that inherits from <classname>PrintOperation</classname>, "
13369"it is naturally simpler to do it in the destructor."
6566msgstr ""13370msgstr ""
nn13371"<literal>end_print</literal>: En hanterare för den är ett säkert ställe att "
13372"frigöra alla resurser relaterade till en <classname>PrintOperation</"
13373"classname>. Om du har din egen anpassade klass som ärver från "
13374"<classname>PrintOperation</classname> är det förstås enklare att göra det i "
13375"destruktorn."
656713376
6568#. (itstool) path: listitem/para13377#. (itstool) path: listitem/para
6569#: C/index-in.docbook:570413378#: C/index-in.docbook:5704
n6570msgid "<literal>done</literal>: This signal is emitted when printing is finishedn13379#, fuzzy
>, meaning when the print data is spooled. Note that the provided <literal>Gtk::P 
>rintOperation::Result</literal> may indicate that an error occurred. In any case 
> you probably want to notify the user about the final status." 
13380msgid ""
13381"<literal>done</literal>: This signal is emitted when printing is finished, "
13382"meaning when the print data is spooled. Note that the provided <literal>Gtk::"
13383"PrintOperation::Result</literal> may indicate that an error occurred. In any "
13384"case you probably want to notify the user about the final status."
6571msgstr ""13385msgstr ""
nn13386"<literal>done</literal>: Denna signal sänds ut när utskriften är klar, "
13387"vilket betyder när utskriftsdata har kölagts. Observera att den "
13388"tillhandahållna <literal>Gtk::PrintOperation::Result</literal> kan indikera "
13389"att ett fel inträffat. I vilket fall vill du troligen meddela användaren om "
13390"slutlig status."
657213391
6573#. (itstool) path: listitem/para13392#. (itstool) path: listitem/para
6574#: C/index-in.docbook:571413393#: C/index-in.docbook:5714
n6575msgid "<literal>status_changed</literal>: Emitted whenever a print job's status n13394#, fuzzy
>changes, until it is finished. Call the <methodname>PrintOperation::set_track_pr 
>int_status()</methodname> method to monitor the job status after spooling. To se 
>e the status, use <methodname>get_status()</methodname> or <methodname>get_statu 
>s_string()</methodname>." 
13395msgid ""
13396"<literal>status_changed</literal>: Emitted whenever a print job's status "
13397"changes, until it is finished. Call the <methodname>PrintOperation::"
13398"set_track_print_status()</methodname> method to monitor the job status after "
13399"spooling. To see the status, use <methodname>get_status()</methodname> or "
13400"<methodname>get_status_string()</methodname>."
6576msgstr ""13401msgstr ""
nn13402"<literal>status_changed</literal>: Sänds ut närhelst ett utskriftsjobbs "
13403"status ändras, tills det är klart. Anropa metoden "
13404"<methodname>PrintOperation::set_track_print_status()</methodname> för att "
13405"övervaka jobbstatusen efter köläggning. Använd <methodname>get_status()</"
13406"methodname> eller <methodname>get_status_string()</methodname> för att se "
13407"statusen."
657713408
6578#. (itstool) path: section/para13409#. (itstool) path: section/para
6579#: C/index-in.docbook:564013410#: C/index-in.docbook:5640
n6580msgid "The <methodname>PrintOperation::run()</methodname> method starts the prinn13411#, fuzzy
>t loop, during which various signals are emitted: <_:itemizedlist-1/>" 
13412msgid ""
13413"The <methodname>PrintOperation::run()</methodname> method starts the print "
13414"loop, during which various signals are emitted: <_:itemizedlist-1/>"
6581msgstr ""13415msgstr ""
nn13416"Metoden <methodname>PrintOperation::run()</methodname> startar "
13417"utskriftsslingan, under vilken olika signaler sänds ut: <_:itemizedlist-1/>"
658213418
6583#. (itstool) path: section/para13419#. (itstool) path: section/para
6584#: C/index-in.docbook:572713420#: C/index-in.docbook:5727
n6585msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n13421msgid ""
>1PrintOperation.html\">Reference</link>" 
13422"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
13423"classGtk_1_1PrintOperation.html\">Reference</link>"
6586msgstr ""13424msgstr ""
nn13425"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
13426"classGtk_1_1PrintOperation.html\">Referens</link>"
658713427
6588#. (itstool) path: section/title13428#. (itstool) path: section/title
6589#: C/index-in.docbook:573613429#: C/index-in.docbook:5736
6590msgid "Page setup"13430msgid "Page setup"
n6591msgstr ""n13431msgstr "Sidinställning"
659213432
6593#. (itstool) path: section/para13433#. (itstool) path: section/para
6594#: C/index-in.docbook:573813434#: C/index-in.docbook:5738
n6595msgid "The <classname>PrintOperation</classname> class has a method called <methn13435#, fuzzy
>odname>set_default_page_setup()</methodname> which selects the default paper siz 
>e, orientation and margins. To show a page setup dialog from your application, u 
>se the <methodname>Gtk::run_page_setup_dialog()</methodname> method, which retur 
>ns a <classname>Gtk::PageSetup</classname> object with the chosen settings. Use  
>this object to update a <classname>PrintOperation</classname> and to access the  
>selected <classname>Gtk::PaperSize</classname>, <literal>Gtk::PageOrientation</l 
>iteral> and printer-specific margins." 
13436msgid ""
13437"The <classname>PrintOperation</classname> class has a method called "
13438"<methodname>set_default_page_setup()</methodname> which selects the default "
13439"paper size, orientation and margins. To show a page setup dialog from your "
13440"application, use the <methodname>Gtk::run_page_setup_dialog()</methodname> "
13441"method, which returns a <classname>Gtk::PageSetup</classname> object with "
13442"the chosen settings. Use this object to update a <classname>PrintOperation</"
13443"classname> and to access the selected <classname>Gtk::PaperSize</classname>, "
13444"<literal>Gtk::PageOrientation</literal> and printer-specific margins."
6596msgstr ""13445msgstr ""
nn13446"Klassen <classname>PrintOperation</classname> har en metod som kallas "
13447"<methodname>set_default_page_setup()</methodname> och väljer standardvärde "
13448"för pappersstorlek, orientering och marginaler. För att visa en "
13449"sidinställningsdialog från ditt program använder du metoden <methodname>Gtk::"
13450"run_page_setup_dialog()</methodname>, vilken returnerar ett <classname>Gtk::"
13451"PageSetup</classname>-objekt med de valda inställningarna. Använd detta "
13452"objekt för att uppdatera en <classname>PrintOperation</classname> och för "
13453"att komma åt vald <classname>Gtk::PaperSize</classname>, <literal>Gtk::"
13454"PageOrientation</literal> och skrivarspecifika marginaler."
659713455
6598#. (itstool) path: section/para13456#. (itstool) path: section/para
6599#: C/index-in.docbook:574813457#: C/index-in.docbook:5748
n6600msgid "You should save the chosen <classname>Gtk::PageSetup</classname> so you cn13458msgid ""
>an use it again if the page setup dialog is shown again." 
13459"You should save the chosen <classname>Gtk::PageSetup</classname> so you can "
13460"use it again if the page setup dialog is shown again."
6601msgstr ""13461msgstr ""
nn13462"Du bör spara vald <classname>Gtk::PageSetup</classname> så du kan använda "
13463"den igen om sidinställningsdialogen visas igen."
660213464
6603#. (itstool) path: section/programlisting13465#. (itstool) path: section/programlisting
6604#: C/index-in.docbook:575213466#: C/index-in.docbook:5752
n6605#, no-wrapn13467#, fuzzy, no-wrap
13468#| msgid ""
13469#| "\n"
13470#| "// Within a class that inherits from Gtk::Window and keeps m_refPageSetup\n"
13471#| "// and m_refSettings as members...\n"
13472#| "auto new_page_setup = Gtk::run_page_setup_dialog(*this, m_refPageSetup, m_re
 >fSettings);\n"
13473#| "m_refPageSetup = new_page_setup;\n"
6606msgid ""13474msgid ""
6607"<code>// Within a class that inherits from Gtk::Window and keeps m_refPageSetup13475"<code>// Within a class that inherits from Gtk::Window and keeps m_refPageSetup
>\n">\n"
6608"// and m_refSettings as members...\n"13476"// and m_refSettings as members...\n"
6609"auto new_page_setup = Gtk::run_page_setup_dialog(*this, m_refPageSetup, m_refSe13477"auto new_page_setup = Gtk::run_page_setup_dialog(*this, m_refPageSetup, m_refSe
>ttings);\n">ttings);\n"
6610"m_refPageSetup = new_page_setup;\n"13478"m_refPageSetup = new_page_setup;\n"
6611"</code>"13479"</code>"
6612msgstr ""13480msgstr ""
nn13481"\n"
13482"// I en klass som ärver från Gtk::Window och behåller m_refPageSetup\n"
13483"// och m_refSettings som medlemmar...\n"
13484"auto new_page_setup = Gtk::run_page_setup_dialog(*this, m_refPageSetup, m_refSe
 >ttings);\n"
13485"m_refPageSetup = new_page_setup;\n"
661313486
6614#. (itstool) path: section/para13487#. (itstool) path: section/para
6615#: C/index-in.docbook:575813488#: C/index-in.docbook:5758
n6616msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n13489msgid ""
>1PageSetup.html\">Reference</link>" 
13490"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
13491"classGtk_1_1PageSetup.html\">Reference</link>"
6617msgstr ""13492msgstr ""
nn13493"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
13494"classGtk_1_1PageSetup.html\">Referens</link>"
661813495
6619#. (itstool) path: section/para13496#. (itstool) path: section/para
6620#: C/index-in.docbook:576213497#: C/index-in.docbook:5762
n6621msgid "The Cairo coordinate system, in the <literal>draw_page</literal> handler,n13498#, fuzzy
> is automatically rotated to the current page orientation. It is normally within 
> the printer margins, but you can change that via the <methodname>PrintOperation 
>::set_use_full_page()</methodname> method. The default measurement unit is devic 
>e pixels. To select other units, use the <methodname>PrintOperation::set_unit()< 
>/methodname> method." 
13499msgid ""
13500"The Cairo coordinate system, in the <literal>draw_page</literal> handler, is "
13501"automatically rotated to the current page orientation. It is normally within "
13502"the printer margins, but you can change that via the "
13503"<methodname>PrintOperation::set_use_full_page()</methodname> method. The "
13504"default measurement unit is device pixels. To select other units, use the "
13505"<methodname>PrintOperation::set_unit()</methodname> method."
6622msgstr ""13506msgstr ""
nn13507"Cairo-koordinatsystemet i <literal>draw_page</literal>-hanteraren roteras "
13508"automatiskt till aktuell sidorientering. Den är vanligen inom "
13509"skrivarmarginalerna, men du kan ändra det med metoden "
13510"<methodname>PrintOperation::set_use_full_page()</methodname>. "
13511"Standardmätenheten är enhetsbildpunkter. Använd metoden "
13512"<methodname>PrintOperation::set_unit()</methodname> för att välja andra "
13513"enheter."
662313514
6624#. (itstool) path: section/title13515#. (itstool) path: section/title
6625#: C/index-in.docbook:577413516#: C/index-in.docbook:5774
6626msgid "Rendering text"13517msgid "Rendering text"
n6627msgstr ""n13518msgstr "Rendering av text"
662813519
6629#. (itstool) path: section/para13520#. (itstool) path: section/para
6630#: C/index-in.docbook:577613521#: C/index-in.docbook:5776
n6631msgid "Text rendering is done using Pango. The <classname>Pango::Layout</classnan13522#, fuzzy
>me> object for printing should be created by calling the <methodname>PrintContex 
>t::create_pango_layout()</methodname> method. The <classname>PrintContext</class 
>name> object also provides the page metrics, via <methodname>get_width()</method 
>name> and <methodname>get_height()</methodname>. The number of pages can be set  
>with <methodname>PrintOperation::set_n_pages()</methodname>. To actually render  
>the Pango text in <literal>on_draw_page</literal>, get a <classname>Cairo::Conte 
>xt</classname> with <methodname>PrintContext::get_cairo_context()</methodname> a 
>nd show the <classname>Pango::LayoutLine</classname>s that appear within the req 
>uested page number." 
13523msgid ""
13524"Text rendering is done using Pango. The <classname>Pango::Layout</classname> "
13525"object for printing should be created by calling the "
13526"<methodname>PrintContext::create_pango_layout()</methodname> method. The "
13527"<classname>PrintContext</classname> object also provides the page metrics, "
13528"via <methodname>get_width()</methodname> and <methodname>get_height()</"
13529"methodname>. The number of pages can be set with <methodname>PrintOperation::"
13530"set_n_pages()</methodname>. To actually render the Pango text in "
13531"<literal>on_draw_page</literal>, get a <classname>Cairo::Context</classname> "
13532"with <methodname>PrintContext::get_cairo_context()</methodname> and show the "
13533"<classname>Pango::LayoutLine</classname>s that appear within the requested "
13534"page number."
6632msgstr ""13535msgstr ""
nn13536"Textrendering görs med Pango. <classname>Pango::Layout</classname>-objektet "
13537"för utskrift bör skapas genom att anropa metoden <methodname>PrintContext::"
13538"create_pango_layout()</methodname>. <classname>PrintContext</classname>-"
13539"objektet tillhandahåller också sidmätningar via <methodname>get_width()</"
13540"methodname> och <methodname>get_height()</methodname>. Antalet sidor kan "
13541"ställas in med <methodname>PrintOperation::set_n_pages()</methodname>. För "
13542"att faktiskt rendera Pango-texten i <literal>on_draw_page</literal> ordnar "
13543"du en <classname>Cairo::Context</classname> med <methodname>PrintContext::"
13544"get_cairo_context()</methodname> och visar de <classname>Pango::LayoutLine</"
13545"classname> som visas inom det begärda sidantalet."
663313546
6634#. (itstool) path: section/para13547#. (itstool) path: section/para
6635#: C/index-in.docbook:579113548#: C/index-in.docbook:5791
nn13549#, fuzzy
13550#| msgid ""
13551#| "See <link linkend=\"sec-printing-example-simple\">an example</link> of "
13552#| "exactly how this can be done."
13553msgid ""
6636msgid "See <link linkend=\"sec-printing-examples-simple\">an example</link> of e13554"See <link linkend=\"sec-printing-examples-simple\">an example</link> of "
>xactly how this can be done." 
13555"exactly how this can be done."
6637msgstr ""13556msgstr ""
nn13557"Se <link linkend=\"sec-printing-example-simple\">ett exempel</link> på exakt "
13558"hur detta kan göras."
663813559
6639#. (itstool) path: section/title13560#. (itstool) path: section/title
6640#: C/index-in.docbook:579913561#: C/index-in.docbook:5799
6641msgid "Asynchronous operations"13562msgid "Asynchronous operations"
n6642msgstr ""n13563msgstr "Asynkrona operationer"
664313564
6644#. (itstool) path: section/para13565#. (itstool) path: section/para
6645#: C/index-in.docbook:580113566#: C/index-in.docbook:5801
n6646msgid "By default, <methodname>PrintOperation::run()</methodname> returns when an13567#, fuzzy
> print operation is completed. If you need to run a non-blocking print operation 
>, call <methodname>PrintOperation::set_allow_async()</methodname>. Note that <me 
>thodname>set_allow_async()</methodname> is not supported on all platforms, howev 
>er the <literal>done</literal> signal will still be emitted." 
13568msgid ""
13569"By default, <methodname>PrintOperation::run()</methodname> returns when a "
13570"print operation is completed. If you need to run a non-blocking print "
13571"operation, call <methodname>PrintOperation::set_allow_async()</methodname>. "
13572"Note that <methodname>set_allow_async()</methodname> is not supported on all "
13573"platforms, however the <literal>done</literal> signal will still be emitted."
6647msgstr ""13574msgstr ""
nn13575"Som standard returnerar <methodname>PrintOperation::run()</methodname> när "
13576"en utskriftsoperation är slutförd. Om du behöver köra en icke-blockerande "
13577"utskriftsoperation anropar du <methodname>PrintOperation::set_allow_async()</"
13578"methodname>. Observera att <methodname>set_allow_async()</methodname> inte "
13579"stöds på alla plattformar, men signalen <literal>done</literal> kommer "
13580"fortfarande sändas ut."
664813581
6649#. (itstool) path: section/para13582#. (itstool) path: section/para
6650#: C/index-in.docbook:580813583#: C/index-in.docbook:5808
n6651msgid "<methodname>run()</methodname> may return <literal>PrintOperation::Resultn13584msgid ""
>::IN_PROGRESS</literal>. To track status and handle the result or error you need 
> to implement signal handlers for the <literal>done</literal> and <literal>statu 
>s_changed</literal> signals:" 
13585"<methodname>run()</methodname> may return <literal>PrintOperation::Result::"
13586"IN_PROGRESS</literal>. To track status and handle the result or error you "
13587"need to implement signal handlers for the <literal>done</literal> and "
13588"<literal>status_changed</literal> signals:"
6652msgstr ""13589msgstr ""
nn13590"<methodname>run()</methodname> kan returnera <literal>PrintOperation::"
13591"Result::IN_PROGRESS</literal>. För att övervaka status och hantera "
13592"resultatet eller fel behöver du implementera signalhanterare för signalerna "
13593"<literal>done</literal> och <literal>status_changed</literal>:"
665313594
6654#. (itstool) path: section/programlisting13595#. (itstool) path: section/programlisting
6655#: C/index-in.docbook:581613596#: C/index-in.docbook:5816
n6656#, no-wrapn13597#, fuzzy, no-wrap
6657msgid ""13598msgid ""
6658"<code>// in class ExampleWindow's method...\n"13599"<code>// in class ExampleWindow's method...\n"
6659"auto op = PrintOperation::create();\n"13600"auto op = PrintOperation::create();\n"
6660"// ...set up op...\n"13601"// ...set up op...\n"
6661"op-&gt;signal_done().connect(sigc::bind(sigc::mem_fun(\n"13602"op-&gt;signal_done().connect(sigc::bind(sigc::mem_fun(\n"
6662"  *this, &amp;ExampleWindow::on_printoperation_done), op));\n"13603"  *this, &amp;ExampleWindow::on_printoperation_done), op));\n"
6663"// run the op\n"13604"// run the op\n"
6664"</code>"13605"</code>"
6665msgstr ""13606msgstr ""
nn13607"\n"
13608"// i klassen ExampleWindows metod...\n"
13609"auto op = PrintOperation::create();\n"
13610"// ...konfigurera op...\n"
13611"op-&gt;signal_done().connect(sigc::bind(sigc::mem_fun(\n"
13612"  *this, &amp;ExampleWindow::on_printoperation_done), op));\n"
13613"// kör op\n"
666613614
6667#. (itstool) path: section/para13615#. (itstool) path: section/para
6668#: C/index-in.docbook:582413616#: C/index-in.docbook:5824
nn13617msgid ""
6669msgid "Second, check for an error and connect to the <literal>status_changed</li13618"Second, check for an error and connect to the <literal>status_changed</"
>teral> signal. For instance:" 
13619"literal> signal. For instance:"
6670msgstr ""13620msgstr ""
nn13621"Kontrollera sedan för fel och anslut till signalen <literal>status_changed</"
13622"literal>. Till exempel:"
667113623
6672#. (itstool) path: section/programlisting13624#. (itstool) path: section/programlisting
6673#: C/index-in.docbook:582613625#: C/index-in.docbook:5826
n6674#, no-wrapn13626#, fuzzy, no-wrap
13627#| msgid ""
13628#| "\n"
13629#| "void ExampleWindow::on_printoperation_done(Gtk::PrintOperation::Result resul
 >t,\n"
13630#| "  const Glib::RefPtr&lt;PrintOperation&gt;&amp; op)\n"
13631#| "{\n"
13632#| "  if (result == Gtk::PrintOperation::Result::ERROR)\n"
13633#| "    //notify user\n"
13634#| "  else if (result == Gtk::PrintOperation::Result::APPLY)\n"
13635#| "    //Update PrintSettings with the ones used in this PrintOperation\n"
13636#| "\n"
13637#| "  if (! op-&gt;is_finished())\n"
13638#| "    op-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(\n"
13639#| "      *this, &amp;ExampleWindow::on_printoperation_status_changed), op));\n"
13640#| "}\n"
6675msgid ""13641msgid ""
6676"<code>void ExampleWindow::on_printoperation_done(Gtk::PrintOperation::Result re13642"<code>void ExampleWindow::on_printoperation_done(Gtk::PrintOperation::Result re
>sult,\n">sult,\n"
6677"  const Glib::RefPtr&lt;PrintOperation&gt;&amp; op)\n"13643"  const Glib::RefPtr&lt;PrintOperation&gt;&amp; op)\n"
6678"{\n"13644"{\n"
6679"  if (result == Gtk::PrintOperation::Result::ERROR)\n"13645"  if (result == Gtk::PrintOperation::Result::ERROR)\n"
6685"    op-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(\n"13651"    op-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(\n"
6686"      *this, &amp;ExampleWindow::on_printoperation_status_changed), op));\n"13652"      *this, &amp;ExampleWindow::on_printoperation_status_changed), op));\n"
6687"}\n"13653"}\n"
6688"</code>"13654"</code>"
6689msgstr ""13655msgstr ""
nn13656"\n"
13657"void ExampleWindow::on_printoperation_done(Gtk::PrintOperation::Result result,\
 >n"
13658"  const Glib::RefPtr&lt;PrintOperation&gt;&amp; op)\n"
13659"{\n"
13660"  if (result == Gtk::PrintOperation::Result::ERROR)\n"
13661"    //meddela användare\n"
13662"  else if (result == Gtk::PrintOperation::Result::APPLY)\n"
13663"    //Uppdatera PrintSettings med de som används i denna PrintOperation\n"
13664"\n"
13665"  if (! op-&gt;is_finished())\n"
13666"    op-&gt;signal_status_changed().connect(sigc::bind(sigc::mem_fun(\n"
13667"      *this, &amp;ExampleWindow::on_printoperation_status_changed), op));\n"
13668"}\n"
669013669
6691#. (itstool) path: section/para13670#. (itstool) path: section/para
6692#: C/index-in.docbook:584013671#: C/index-in.docbook:5840
6693msgid "Finally, check the status. For instance,"13672msgid "Finally, check the status. For instance,"
n6694msgstr ""n13673msgstr "Kontrollera slutligen status. Till exempel,"
669513674
6696#. (itstool) path: section/programlisting13675#. (itstool) path: section/programlisting
6697#: C/index-in.docbook:584113676#: C/index-in.docbook:5841
n6698#, no-wrapn13677#, fuzzy, no-wrap
13678#| msgid ""
13679#| "\n"
13680#| "void ExampleWindow::on_printoperation_status_changed(const Glib::RefPtr&lt;P
 >rintOperation&gt;&amp; op)\n"
13681#| "{\n"
13682#| "  if (op-&gt;is_finished())\n"
13683#| "    //the print job is finished\n"
13684#| "  else\n"
13685#| "    //get the status with get_status() or get_status_string()\n"
13686#| "\n"
13687#| "  //update UI\n"
13688#| "}\n"
6699msgid ""13689msgid ""
6700"<code>void ExampleWindow::on_printoperation_status_changed(const Glib::RefPtr&l13690"<code>void ExampleWindow::on_printoperation_status_changed(const Glib::RefPtr&l
>t;PrintOperation&gt;&amp; op)\n">t;PrintOperation&gt;&amp; op)\n"
6701"{\n"13691"{\n"
6702"  if (op-&gt;is_finished())\n"13692"  if (op-&gt;is_finished())\n"
6703"    //the print job is finished\n"13693"    //the print job is finished\n"
6706"\n"13696"\n"
6707"  //update UI\n"13697"  //update UI\n"
6708"}\n"13698"}\n"
6709"</code>"13699"</code>"
6710msgstr ""13700msgstr ""
nn13701"\n"
13702"void ExampleWindow::on_printoperation_status_changed(const Glib::RefPtr&lt;Prin
 >tOperation&gt;&amp; op)\n"
13703"{\n"
13704"  if (op-&gt;is_finished())\n"
13705"    //utskriftsjobbet är klart\n"
13706"  else\n"
13707"    //få status med get_status() eller get_status_string()\n"
13708"\n"
13709"  //uppdatera användargränssnitt\n"
13710"}\n"
671113711
6712#. (itstool) path: section/title13712#. (itstool) path: section/title
6713#: C/index-in.docbook:585513713#: C/index-in.docbook:5855
6714msgid "Export to PDF"13714msgid "Export to PDF"
n6715msgstr ""n13715msgstr "Exportera till PDF"
671613716
6717#. (itstool) path: section/para13717#. (itstool) path: section/para
6718#: C/index-in.docbook:585713718#: C/index-in.docbook:5857
n6719msgid "The 'Print to file' option is available in the print dialog, without the n13719#, fuzzy
>need for extra implementation. However, it is sometimes useful to generate a pdf 
> file directly from code. For instance," 
13720msgid ""
13721"The 'Print to file' option is available in the print dialog, without the "
13722"need for extra implementation. However, it is sometimes useful to generate a "
13723"pdf file directly from code. For instance,"
6720msgstr ""13724msgstr ""
nn13725"Alternativet ”Skriv ut till fil” är tillgängligt i utskriftsdialogen, utan "
13726"att någon extra implementation krävs. Det är dock ibland användbart att "
13727"generera en pdf-fil direkt från kod. Till exempel,"
672113728
6722#. (itstool) path: section/programlisting13729#. (itstool) path: section/programlisting
6723#: C/index-in.docbook:586013730#: C/index-in.docbook:5860
n6724#, no-wrapn13731#, fuzzy, no-wrap
6725msgid ""13732msgid ""
6726"<code>auto op = Gtk::PrintOperation::create();\n"13733"<code>auto op = Gtk::PrintOperation::create();\n"
6727"// ...set up op...\n"13734"// ...set up op...\n"
6728"op-&gt;set_export_filename(\"test.pdf\");\n"13735"op-&gt;set_export_filename(\"test.pdf\");\n"
6729"auto res = op-&gt;run(Gtk::PrintOperation::Action::EXPORT);\n"13736"auto res = op-&gt;run(Gtk::PrintOperation::Action::EXPORT);\n"
6730"</code>"13737"</code>"
6731msgstr ""13738msgstr ""
nn13739"\n"
13740"auto op = Gtk::PrintOperation::create();\n"
13741"// ...konfigurera op...\n"
13742"op-&gt;set_export_filename(\"test.pdf\");\n"
13743"auto res = op-&gt;run(Gtk::PrintOperation::Action::EXPORT);\n"
673213744
6733#. (itstool) path: section/title13745#. (itstool) path: section/title
6734#: C/index-in.docbook:586913746#: C/index-in.docbook:5869
6735msgid "Extending the print dialog"13747msgid "Extending the print dialog"
n6736msgstr ""n13748msgstr "Utöka utskriftsdialogen"
673713749
6738#. (itstool) path: listitem/para13750#. (itstool) path: listitem/para
6739#: C/index-in.docbook:587613751#: C/index-in.docbook:5876
n6740msgid "Set the title of the tab via <methodname>PrintOperation::set_custom_tab_ln13752#, fuzzy
>abel()</methodname>, create a new widget and return it from the <literal>create_ 
>custom_widget</literal> signal handler. You'll probably want this to be a contai 
>ner widget, packed with some others." 
13753msgid ""
13754"Set the title of the tab via <methodname>PrintOperation::"
13755"set_custom_tab_label()</methodname>, create a new widget and return it from "
13756"the <literal>create_custom_widget</literal> signal handler. You'll probably "
13757"want this to be a container widget, packed with some others."
6741msgstr ""13758msgstr ""
nn13759"Ställ in titeln för fliken via <methodname>PrintOperation::"
13760"set_custom_tab_label()</methodname>, skapa en ny komponent och returnera den "
13761"från signalhanteraren <literal>create_custom_widget</literal>. Du kommer "
13762"troligen vilja att detta är en behållarkomponent som packats med några andra."
674213763
6743#. (itstool) path: listitem/para13764#. (itstool) path: listitem/para
6744#: C/index-in.docbook:588613765#: C/index-in.docbook:5886
nn13766#, fuzzy
13767msgid ""
6745msgid "Get the data from the widgets in the <literal>custom_widget_apply</litera13768"Get the data from the widgets in the <literal>custom_widget_apply</literal> "
>l> signal handler." 
13769"signal handler."
6746msgstr ""13770msgstr ""
nn13771"Få data från komponenterna i signalhanteraren <literal>custom_widget_apply</"
13772"literal>."
674713773
6748#. (itstool) path: section/para13774#. (itstool) path: section/para
6749#: C/index-in.docbook:587113775#: C/index-in.docbook:5871
6750msgid "You may add a custom tab to the print dialog: <_:itemizedlist-1/>"13776msgid "You may add a custom tab to the print dialog: <_:itemizedlist-1/>"
6751msgstr ""13777msgstr ""
nn13778"Du kan lägga till en anpassad flik till utskriftsdialogen: <_:itemizedlist-1/"
13779">"
675213780
6753#. (itstool) path: section/para13781#. (itstool) path: section/para
6754#: C/index-in.docbook:589413782#: C/index-in.docbook:5894
n6755msgid "Although the <literal>custom_widget_apply</literal> signal provides the wn13783#, fuzzy
>idget you previously created, to simplify things you can keep the widgets you ex 
>pect to contain some user input as class members. For example, let's say you hav 
>e a <classname>Gtk::Entry</classname> called <literal>m_Entry</literal> as a mem 
>ber of your <classname>CustomPrintOperation</classname> class:" 
13784msgid ""
13785"Although the <literal>custom_widget_apply</literal> signal provides the "
13786"widget you previously created, to simplify things you can keep the widgets "
13787"you expect to contain some user input as class members. For example, let's "
13788"say you have a <classname>Gtk::Entry</classname> called <literal>m_Entry</"
13789"literal> as a member of your <classname>CustomPrintOperation</classname> "
13790"class:"
6756msgstr ""13791msgstr ""
nn13792"Även om <literal>custom_widget_apply</literal>-signalen tillhandahåller "
13793"komponenten du skapat tidigare kan du för att förenkla saker behålla "
13794"komponenterna som du förväntar dig ska innehålla användarindata som "
13795"klassmedlemmar. Om vi exempelvis säger att du har en <classname>Gtk::Entry</"
13796"classname> med namnet <literal>m_Entry</literal> som en medlem i din "
13797"<classname>CustomPrintOperation</classname>-klass:"
675713798
6758#. (itstool) path: section/programlisting13799#. (itstool) path: section/programlisting
6759#: C/index-in.docbook:590113800#: C/index-in.docbook:5901
n6760#, no-wrapn13801#, fuzzy, no-wrap
6761msgid ""13802msgid ""
6762"<code>Gtk::Widget* CustomPrintOperation::on_create_custom_widget()\n"13803"<code>Gtk::Widget* CustomPrintOperation::on_create_custom_widget()\n"
6763"{\n"13804"{\n"
6764"  set_custom_tab_label(\"My custom tab\");\n"13805"  set_custom_tab_label(\"My custom tab\");\n"
6765"\n"13806"\n"
6779"  auto user_input = m_Entry.get_text();\n"13820"  auto user_input = m_Entry.get_text();\n"
6780"  //...\n"13821"  //...\n"
6781"}\n"13822"}\n"
6782"</code>"13823"</code>"
6783msgstr ""13824msgstr ""
nn13825"\n"
13826"Gtk::Widget* CustomPrintOperation::on_create_custom_widget()\n"
13827"{\n"
13828"  set_custom_tab_label(\"Min anpassade flik\");\n"
13829"\n"
13830"  auto hbox = new Gtk::Box(Gtk::Orientation::HORIZONTAL, 8);\n"
13831"  hbox-&gt;set_margin(6);\n"
13832"\n"
13833"  auto label = Gtk::make_managed&lt;Gtk::Label&gt;(\"Mata in lite text: \");\n"
13834"  hbox-&gt;append(*label);\n"
13835"\n"
13836"  hbox-&gt;append(m_Entry);\n"
13837"\n"
13838"  return hbox;\n"
13839"}\n"
13840"\n"
13841"void CustomPrintOperation::on_custom_widget_apply(Gtk::Widget* /* widget */)\n"
13842"{\n"
13843"  auto user_input = m_Entry.get_text();\n"
13844"  //...\n"
13845"}\n"
678413846
6785#. (itstool) path: section/para13847#. (itstool) path: section/para
6786#: C/index-in.docbook:592313848#: C/index-in.docbook:5923
6787msgid "The example in examples/book/printing/advanced demonstrates this."13849msgid "The example in examples/book/printing/advanced demonstrates this."
n6788msgstr ""n13850msgstr "Exemplet i examples/book/printing/advanced demonstrerar detta."
678913851
6790#. (itstool) path: section/title13852#. (itstool) path: section/title
6791#: C/index-in.docbook:593013853#: C/index-in.docbook:5930
6792msgid "Preview"13854msgid "Preview"
n6793msgstr ""n13855msgstr "Förhandsgranskning"
679413856
6795#. (itstool) path: section/para13857#. (itstool) path: section/para
6796#: C/index-in.docbook:593213858#: C/index-in.docbook:5932
nn13859#, fuzzy
13860msgid ""
6797msgid "The native GTK print dialog has a preview button, but you may also start 13861"The native GTK print dialog has a preview button, but you may also start a "
>preview directly from an application:" 
13862"preview directly from an application:"
6798msgstr ""13863msgstr ""
nn13864"Den inhemska GTK-utskriftsdialogen har en knapp för förhandsgranskning, men "
13865"du kan också starta en förhandsgranskning direkt från ett program:"
679913866
6800#. (itstool) path: section/programlisting13867#. (itstool) path: section/programlisting
6801#: C/index-in.docbook:593613868#: C/index-in.docbook:5936
n6802#, no-wrapn13869#, fuzzy, no-wrap
13870#| msgid ""
13871#| "\n"
13872#| "// in a class that inherits from Gtk::Window...\n"
13873#| "auto op = PrintOperation::create();\n"
13874#| "// ...set up op...\n"
13875#| "op-&gt;run(Gtk::PrintOperation::Action::PREVIEW, *this);\n"
6803msgid ""13876msgid ""
6804"<code>// in a class that inherits from Gtk::Window...\n"13877"<code>// in a class that inherits from Gtk::Window...\n"
6805"auto op = PrintOperation::create();\n"13878"auto op = PrintOperation::create();\n"
6806"// ...set up op...\n"13879"// ...set up op...\n"
6807"op-&gt;run(Gtk::PrintOperation::Action::PREVIEW, *this);\n"13880"op-&gt;run(Gtk::PrintOperation::Action::PREVIEW, *this);\n"
6808"</code>"13881"</code>"
6809msgstr ""13882msgstr ""
nn13883"\n"
13884"// i en klass som ärver från Gtk::Window...\n"
13885"auto op = PrintOperation::create();\n"
13886"// ...konfigurera op...\n"
13887"op-&gt;run(Gtk::PrintOperation::Action::PREVIEW, *this);\n"
681013888
6811#. (itstool) path: section/para13889#. (itstool) path: section/para
6812#: C/index-in.docbook:594213890#: C/index-in.docbook:5942
n6813msgid "On Unix, the default preview handler uses an external viewer program. On n13891#, fuzzy
>Windows, the native preview dialog will be shown. If necessary you may override  
>this behavior and provide a custom preview dialog. See the example located in /e 
>xamples/book/printing/advanced." 
13892msgid ""
13893"On Unix, the default preview handler uses an external viewer program. On "
13894"Windows, the native preview dialog will be shown. If necessary you may "
13895"override this behavior and provide a custom preview dialog. See the example "
13896"located in /examples/book/printing/advanced."
6814msgstr ""13897msgstr ""
nn13898"På Unix använder standardhanteraren för förhandsgranskning ett externt "
13899"visningsprogram. På Windows kommer den inbyggda förhandsgranskningsdialogen "
13900"visas. Om nödvändigt kan du åsidosätta detta beteende och tillhandahålla en "
13901"anpassad förhandsgranskningsdialog. Se exemplet i /examples/book/printing/"
13902"advanced."
681513903
6816#. (itstool) path: section/title13904#. (itstool) path: section/title
n6817#: C/index-in.docbook:5952n13905#: C/index-in.docbook:5952 C/index-in.docbook:5989
6818#: C/index-in.docbook:598913906#, fuzzy
13907#| msgid "FontDialog"
6819msgid "PrintDialog"13908msgid "PrintDialog"
n6820msgstr ""n13909msgstr "FontDialog"
682113910
6822#. (itstool) path: section/para13911#. (itstool) path: section/para
6823#: C/index-in.docbook:595413912#: C/index-in.docbook:5954
n6824msgid "Since <application>gtkmm</application> 4.14 <classname>Gtk::PrintDialog</n13913msgid ""
>classname> is an alternative to <classname>Gtk::PrintOperation</classname>. <cla 
>ssname>PrintDialog</classname> uses the same <classname>PageSetup</classname> an 
>d <classname>PrintSettings</classname> classes as <classname>PrintOperation</cla 
>ssname>. The rendering with Cairo and Pango is also similar." 
13914"Since <application>gtkmm</application> 4.14 <classname>Gtk::PrintDialog</"
13915"classname> is an alternative to <classname>Gtk::PrintOperation</classname>. "
13916"<classname>PrintDialog</classname> uses the same <classname>PageSetup</"
13917"classname> and <classname>PrintSettings</classname> classes as "
13918"<classname>PrintOperation</classname>. The rendering with Cairo and Pango is "
13919"also similar."
6825msgstr ""13920msgstr ""
682613921
6827#. (itstool) path: section/para13922#. (itstool) path: section/para
6828#: C/index-in.docbook:597013923#: C/index-in.docbook:5970
n6829msgid "The following example demonstrates how to print some input from a user inn13924#, fuzzy
>terface using <classname>PrintOperation</classname>. It shows how to implement < 
>literal>on_begin_print</literal> and <literal>on_draw_page</literal>, as well as 
> how to track print status and update the print settings." 
13925msgid ""
13926"The following example demonstrates how to print some input from a user "
13927"interface using <classname>PrintOperation</classname>. It shows how to "
13928"implement <literal>on_begin_print</literal> and <literal>on_draw_page</"
13929"literal>, as well as how to track print status and update the print settings."
6830msgstr ""13930msgstr ""
nn13931"Följande exempel demonstrerar hur inmatning från ett användargränssnitt kan "
13932"skrivas ut. Det visar hur man implementerar <literal>on_begin_print</"
13933"literal> och <literal>on_draw_page</literal>, såväl som att spåra "
13934"utskriftsstatus och uppdatera utskriftsinställningarna."
683113935
6832#. (itstool) path: figure/title13936#. (itstool) path: figure/title
6833#: C/index-in.docbook:597813937#: C/index-in.docbook:5978
6834msgid "Printing - Simple"13938msgid "Printing - Simple"
n6835msgstr ""n13939msgstr "Utskrift - Enkel"
683613940
6837#. (itstool) path: imageobject/imagedata13941#. (itstool) path: imageobject/imagedata
6838#. This is a reference to an external file such as an image or video. When13942#. This is a reference to an external file such as an image or video. When
6839#. the file changes, the md5 hash will change to let you know you need to13943#. the file changes, the md5 hash will change to let you know you need to
6840#. update your localized copy. The msgstr is not used at all. Set it to13944#. update your localized copy. The msgstr is not used at all. Set it to
6841#. whatever you like once you have updated your copy of the file.13945#. whatever you like once you have updated your copy of the file.
6842#: C/index-in.docbook:598013946#: C/index-in.docbook:5980
nn13947#, fuzzy
6843msgctxt "_"13948msgctxt "_"
n6844msgid "external ref='figures/printing_simple.png' md5='8e7f72103094230cafcd912cbn13949msgid ""
>6b34277'" 
13950"external ref='figures/printing_simple.png' "
13951"md5='8e7f72103094230cafcd912cb6b34277'"
6845msgstr ""13952msgstr ""
nn13953"external ref='figures/printing.png' md5='d4565328475ec89edf5f2230cb3fc5d0'"
684613954
6847#. (itstool) path: section/para13955#. (itstool) path: section/para
6848#: C/index-in.docbook:598413956#: C/index-in.docbook:5984
n6849msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren13957msgid ""
>e/master/examples/book/printing/simple/\">Source Code</link>" 
13958"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
13959"master/examples/book/printing/simple/\">Source Code</link>"
6850msgstr ""13960msgstr ""
nn13961"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
13962"master/examples/book/printing/simple/\">Källkod</link>"
685113963
6852#. (itstool) path: section/para13964#. (itstool) path: section/para
6853#: C/index-in.docbook:599113965#: C/index-in.docbook:5991
n6854msgid "The following example demonstrates how to print some input from a user inn13966#, fuzzy
>terface using <classname>PrintDialog</classname>. The user interface is similar  
>to the previous example." 
13967msgid ""
13968"The following example demonstrates how to print some input from a user "
13969"interface using <classname>PrintDialog</classname>. The user interface is "
13970"similar to the previous example."
6855msgstr ""13971msgstr ""
nn13972"Följande exempel demonstrerar hur inmatning från ett användargränssnitt kan "
13973"skrivas ut. Det visar hur man implementerar <literal>on_begin_print</"
13974"literal> och <literal>on_draw_page</literal>, såväl som att spåra "
13975"utskriftsstatus och uppdatera utskriftsinställningarna."
685613976
6857#. (itstool) path: figure/title13977#. (itstool) path: figure/title
6858#: C/index-in.docbook:599813978#: C/index-in.docbook:5998
nn13979#, fuzzy
13980#| msgid "Printing - Simple"
6859msgid "Printing - PrintDialog"13981msgid "Printing - PrintDialog"
n6860msgstr ""n13982msgstr "Utskrift - Enkel"
686113983
6862#. (itstool) path: imageobject/imagedata13984#. (itstool) path: imageobject/imagedata
6863#. This is a reference to an external file such as an image or video. When13985#. This is a reference to an external file such as an image or video. When
6864#. the file changes, the md5 hash will change to let you know you need to13986#. the file changes, the md5 hash will change to let you know you need to
6865#. update your localized copy. The msgstr is not used at all. Set it to13987#. update your localized copy. The msgstr is not used at all. Set it to
6866#. whatever you like once you have updated your copy of the file.13988#. whatever you like once you have updated your copy of the file.
6867#: C/index-in.docbook:600013989#: C/index-in.docbook:6000
nn13990#, fuzzy
6868msgctxt "_"13991msgctxt "_"
n6869msgid "external ref='figures/printing_printdialog.png' md5='131a217e90587b80335cn13992msgid ""
>230cace02a57'" 
13993"external ref='figures/printing_printdialog.png' "
13994"md5='131a217e90587b80335c230cace02a57'"
6870msgstr ""13995msgstr ""
nn13996"external ref='figures/printing.png' md5='d4565328475ec89edf5f2230cb3fc5d0'"
687113997
6872#. (itstool) path: section/para13998#. (itstool) path: section/para
6873#: C/index-in.docbook:600413999#: C/index-in.docbook:6004
n6874msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren14000#, fuzzy
>e/master/examples/book/printing/print_dialog/\">Source Code</link>" 
14001#| msgid ""
14002#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
14003#| "tree/master/examples/book/printing/simple/\">Source Code</link>"
14004msgid ""
14005"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14006"master/examples/book/printing/print_dialog/\">Source Code</link>"
6875msgstr ""14007msgstr ""
nn14008"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14009"master/examples/book/printing/simple/\">Källkod</link>"
687614010
6877#. (itstool) path: chapter/title14011#. (itstool) path: chapter/title
6878#: C/index-in.docbook:601114012#: C/index-in.docbook:6011
6879msgid "Recently Used Documents"14013msgid "Recently Used Documents"
n6880msgstr ""n14014msgstr "Senast använda dokument"
688114015
6882#. (itstool) path: chapter/para14016#. (itstool) path: chapter/para
6883#: C/index-in.docbook:601314017#: C/index-in.docbook:6013
n6884msgid "<application>gtkmm</application> provides an easy way to manage recently n14018msgid ""
>used documents. This functionality is implemented in the <classname>Gtk::RecentM 
>anager</classname> class." 
14019"<application>gtkmm</application> provides an easy way to manage recently "
14020"used documents. This functionality is implemented in the <classname>Gtk::"
14021"RecentManager</classname> class."
6885msgstr ""14022msgstr ""
nn14023"<application>gtkmm</application> tillhandahåller ett lätt sätt att hantera "
14024"senast använda dokument. Denna funktionalitet implementeras i klassen "
14025"<classname>Gtk::RecentManager</classname>."
688614026
6887#. (itstool) path: chapter/para14027#. (itstool) path: chapter/para
6888#: C/index-in.docbook:601714028#: C/index-in.docbook:6017
n6889msgid "Each item in the list of recently used files is identified by its URI, ann14029#, fuzzy
>d can have associated metadata. The metadata can be used to specify how the file 
> should be displayed, a description of the file, its mime type, which applicatio 
>n registered it, whether it's private to the registering application, and severa 
>l other things." 
14030msgid ""
14031"Each item in the list of recently used files is identified by its URI, and "
14032"can have associated metadata. The metadata can be used to specify how the "
14033"file should be displayed, a description of the file, its mime type, which "
14034"application registered it, whether it's private to the registering "
14035"application, and several other things."
6890msgstr ""14036msgstr ""
nn14037"Varje objekt i listan över senast använda filer identifieras av sin URI, och "
14038"kan ha associerade metadata. Dessa metadata kan användas för att ange hur "
14039"filen ska visas, en beskrivning av filen, dess mime-typ, vilket program som "
14040"registrerat den, huruvida den är privat för det registrerande programmet, "
14041"och flera andra saker."
689114042
6892#. (itstool) path: section/title14043#. (itstool) path: section/title
6893#: C/index-in.docbook:602614044#: C/index-in.docbook:6026
6894msgid "RecentManager"14045msgid "RecentManager"
n6895msgstr ""n14046msgstr "RecentManager"
689614047
6897#. (itstool) path: section/para14048#. (itstool) path: section/para
6898#: C/index-in.docbook:602714049#: C/index-in.docbook:6027
n6899msgid "<classname>RecentManager</classname> acts as a database of recently used n14050msgid ""
>files. You use this class to register new files, remove files from the list, or  
>look up recently used files. There is one list of recently used files per user." 
14051"<classname>RecentManager</classname> acts as a database of recently used "
14052"files. You use this class to register new files, remove files from the list, "
14053"or look up recently used files. There is one list of recently used files per "
14054"user."
6900msgstr ""14055msgstr ""
nn14056"<classname>RecentManager</classname> agerar som en databas över senast "
14057"använda filer. Du använder denna klass för att registrera nya filer, ta bort "
14058"filer från listan, eller slå upp senast använda filer. Det finns en lista "
14059"över senast använda filer per användare."
690114060
6902#. (itstool) path: section/para14061#. (itstool) path: section/para
6903#: C/index-in.docbook:603314062#: C/index-in.docbook:6033
n6904msgid "You can create a new <classname>RecentManager</classname>, but you'll mosn14063#, fuzzy
>t likely just want to use the default one. You can get a reference to the defaul 
>t <classname>RecentManager</classname> with <methodname>get_default()</methodnam 
>e>." 
14064msgid ""
14065"You can create a new <classname>RecentManager</classname>, but you'll most "
14066"likely just want to use the default one. You can get a reference to the "
14067"default <classname>RecentManager</classname> with <methodname>get_default()</"
14068"methodname>."
6905msgstr ""14069msgstr ""
nn14070"Du kan skapa en ny <classname>RecentManager</classname>, men du vill mest "
14071"troligt helt enkelt använda den som används som standard. Du kan få en "
14072"referens till standard-<classname>RecentManager</classname> med "
14073"<methodname>get_default()</methodname>."
690614074
6907#. (itstool) path: section/title14075#. (itstool) path: section/title
6908#: C/index-in.docbook:604114076#: C/index-in.docbook:6041
nn14077#, fuzzy
6909msgid "Adding Items to the List of Recent Files"14078msgid "Adding Items to the List of Recent Files"
n6910msgstr ""n14079msgstr "Lägga till objekt i listan över senaste filer"
691114080
6912#. (itstool) path: section/para14081#. (itstool) path: section/para
6913#: C/index-in.docbook:604214082#: C/index-in.docbook:6042
nn14083#, fuzzy
14084msgid ""
6914msgid "To add a new file to the list of recent documents, in the simplest case, 14085"To add a new file to the list of recent documents, in the simplest case, you "
>you only need to provide the URI. For example:" 
14086"only need to provide the URI. For example:"
6915msgstr ""14087msgstr ""
nn14088"För att lägga till en ny fil till listan över senaste dokument behöver du i "
14089"det enklaste fallet bara tillhandahålla URI:n. Till exempel:"
691614090
6917#. (itstool) path: section/programlisting14091#. (itstool) path: section/programlisting
6918#: C/index-in.docbook:604614092#: C/index-in.docbook:6046
n6919#, no-wrapn14093#, fuzzy, no-wrap
14094#| msgid ""
14095#| "auto recent_manager = Gtk::RecentManager::get_default();\n"
14096#| "recent_manager-&gt;add_item(uri);"
6920msgid ""14097msgid ""
6921"<code>auto recent_manager = Gtk::RecentManager::get_default();\n"14098"<code>auto recent_manager = Gtk::RecentManager::get_default();\n"
6922"recent_manager-&gt;add_item(uri);</code>"14099"recent_manager-&gt;add_item(uri);</code>"
6923msgstr ""14100msgstr ""
nn14101"auto recent_manager = Gtk::RecentManager::get_default();\n"
14102"recent_manager-&gt;add_item(uri);"
692414103
6925#. (itstool) path: section/para14104#. (itstool) path: section/para
6926#: C/index-in.docbook:604814105#: C/index-in.docbook:6048
n6927msgid "If you want to register a file with metadata, you can pass a <classname>Rn14106#, fuzzy
>ecentManager::Data</classname> parameter to <methodname>add_item()</methodname>. 
> The metadata that can be set on a particular file item is as follows:" 
14107msgid ""
14108"If you want to register a file with metadata, you can pass a "
14109"<classname>RecentManager::Data</classname> parameter to "
14110"<methodname>add_item()</methodname>. The metadata that can be set on a "
14111"particular file item is as follows:"
6928msgstr ""14112msgstr ""
nn14113"Om du vill registrera en fil med metadata kan du skicka med en "
14114"<classname>RecentManager::Data</classname>-parameter till "
14115"<methodname>add_item()</methodname>. Metadata som kan ställas in på ett "
14116"specifikt filobjekt är följande:"
692914117
6930#. (itstool) path: listitem/para14118#. (itstool) path: listitem/para
6931#: C/index-in.docbook:605614119#: C/index-in.docbook:6056
n6932msgid "<varname>app_exec</varname>: The command line to be used to launch this rn14120#, fuzzy
>esource. This string may contain the \"f\" and \"u\" escape characters which wil 
>l be expanded to the resource file path and URI respectively" 
14121msgid ""
14122"<varname>app_exec</varname>: The command line to be used to launch this "
14123"resource. This string may contain the \"f\" and \"u\" escape characters "
14124"which will be expanded to the resource file path and URI respectively"
6933msgstr ""14125msgstr ""
nn14126"<varname>app_exec</varname>: Kommandoraden att använda för att köra denna "
14127"resurs. Denna sträng kan innehålla kontrollsekvenserna \"f\" och \"u\" som "
14128"kommer expanderas till resursens filsökväg respektive URI"
693414129
6935#. (itstool) path: listitem/para14130#. (itstool) path: listitem/para
6936#: C/index-in.docbook:606214131#: C/index-in.docbook:6062
nn14132#, fuzzy
14133msgid ""
6937msgid "<varname>app_name</varname>: The name of the application that registered 14134"<varname>app_name</varname>: The name of the application that registered the "
>the resource" 
14135"resource"
6938msgstr ""14136msgstr ""
nn14137"<varname>app_name</varname>: Namnet på programmet som registrerat resursen"
693914138
6940#. (itstool) path: listitem/para14139#. (itstool) path: listitem/para
6941#: C/index-in.docbook:606614140#: C/index-in.docbook:6066
nn14141msgid ""
6942msgid "<varname>description</varname>: A short description of the resource as a 14142"<varname>description</varname>: A short description of the resource as a "
>UTF-8 encoded string" 
14143"UTF-8 encoded string"
6943msgstr ""14144msgstr ""
nn14145"<varname>description</varname>: En kort beskrivning av resursen som en UTF-8-"
14146"kodad sträng"
694414147
6945#. (itstool) path: listitem/para14148#. (itstool) path: listitem/para
6946#: C/index-in.docbook:607014149#: C/index-in.docbook:6070
nn14150#, fuzzy
14151msgid ""
6947msgid "<varname>display_name</varname>: The name of the resource to be used for 14152"<varname>display_name</varname>: The name of the resource to be used for "
>display as a UTF-8 encoded string" 
14153"display as a UTF-8 encoded string"
6948msgstr ""14154msgstr ""
nn14155"<varname>display_name</varname>: Namnet på resursen att använda för visning "
14156"som en UTF-8-kodad sträng"
694914157
6950#. (itstool) path: listitem/para14158#. (itstool) path: listitem/para
6951#: C/index-in.docbook:607414159#: C/index-in.docbook:6074
n6952msgid "<varname>groups</varname>: A list of groups associated with this item. Grn14160#, fuzzy
>oups are essentially arbitrary strings associated with a particular resource. Th 
>ey can be thought of as 'categories' (such as \"email\", \"graphics\", etc) or t 
>ags for the resource." 
14161msgid ""
14162"<varname>groups</varname>: A list of groups associated with this item. "
14163"Groups are essentially arbitrary strings associated with a particular "
14164"resource. They can be thought of as 'categories' (such as \"email\", "
14165"\"graphics\", etc) or tags for the resource."
6953msgstr ""14166msgstr ""
nn14167"<varname>groups</varname>: En lista över grupper som är associerade med "
14168"detta objekt. Grupper är i princip godtyckliga strängar associerade med en "
14169"viss resurs. De kan tänkas på som ”kategorier” (som ”e-post”, ”grafik” o.s."
14170"v.) eller taggar för resursen."
695414171
6955#. (itstool) path: listitem/para14172#. (itstool) path: listitem/para
6956#: C/index-in.docbook:608014173#: C/index-in.docbook:6080
nn14174msgid ""
6957msgid "<varname>is_private</varname>: Whether this resource should be visible on14175"<varname>is_private</varname>: Whether this resource should be visible only "
>ly to applications that have registered it or not" 
14176"to applications that have registered it or not"
6958msgstr ""14177msgstr ""
nn14178"<varname>is_private</varname>: huruvida denna resurs endast ska vara synlig "
14179"för program som har registrerat den eller inte"
695914180
6960#. (itstool) path: listitem/para14181#. (itstool) path: listitem/para
6961#: C/index-in.docbook:608414182#: C/index-in.docbook:6084
6962msgid "<varname>mime_type</varname>: The MIME type of the resource"14183msgid "<varname>mime_type</varname>: The MIME type of the resource"
n6963msgstr ""n14184msgstr "<varname>mime_type</varname>: MIME-typen för resursen"
696414185
6965#. (itstool) path: section/para14186#. (itstool) path: section/para
6966#: C/index-in.docbook:608714187#: C/index-in.docbook:6087
nn14188msgid ""
6967msgid "In addition to adding items to the list, you can also look up items from 14189"In addition to adding items to the list, you can also look up items from the "
>the list and modify or remove items." 
14190"list and modify or remove items."
6968msgstr ""14191msgstr ""
nn14192"Utöver att lägga till objekt till listan kan du också slå upp objekt i "
14193"listan och ändra eller ta bort objekt."
696914194
6970#. (itstool) path: section/title14195#. (itstool) path: section/title
6971#: C/index-in.docbook:609414196#: C/index-in.docbook:6094
6972msgid "Looking up Items in the List of Recent Files"14197msgid "Looking up Items in the List of Recent Files"
n6973msgstr ""n14198msgstr "Slå upp objekt i listan över senaste filer"
697414199
6975#. (itstool) path: section/para14200#. (itstool) path: section/para
6976#: C/index-in.docbook:609514201#: C/index-in.docbook:6095
n6977msgid "To look up recently used files, <classname>RecentManager</classname> provn14202#, fuzzy
>ides several functions. To look up a specific item by its URI, you can use the < 
>methodname>lookup_item()</methodname> function, which will return a <classname>R 
>ecentInfo</classname> class. If the specified URI did not exist in the list of r 
>ecent files, <methodname>lookup_item()</methodname> throws a <classname>RecentMa 
>nagerError</classname> exception. For example:" 
14203msgid ""
14204"To look up recently used files, <classname>RecentManager</classname> "
14205"provides several functions. To look up a specific item by its URI, you can "
14206"use the <methodname>lookup_item()</methodname> function, which will return a "
14207"<classname>RecentInfo</classname> class. If the specified URI did not exist "
14208"in the list of recent files, <methodname>lookup_item()</methodname> throws a "
14209"<classname>RecentManagerError</classname> exception. For example:"
6978msgstr ""14210msgstr ""
nn14211"<classname>RecentManager</classname> tillhandahåller flera funktioner för "
14212"att slå upp senast använda filer. För att slå upp ett visst objekt enligt "
14213"dess URI kan du använda funktionen <methodname>lookup_item()</methodname>, "
14214"vilken kommer returnera en <classname>RecentInfo</classname>-klass. Om den "
14215"angivna URI:n inte finns i listan över senaste filer kommer "
14216"<methodname>lookup_item()</methodname> kasta ett "
14217"<classname>RecentManagerError</classname>-undantag. Till exempel:"
697914218
6980#. (itstool) path: section/programlisting14219#. (itstool) path: section/programlisting
6981#: C/index-in.docbook:610414220#: C/index-in.docbook:6104
n6982#, no-wrapn14221#, fuzzy, no-wrap
6983msgid ""14222msgid ""
6984"<code>Glib::RefPtr&lt;Gtk::RecentInfo&gt; info;\n"14223"<code>Glib::RefPtr&lt;Gtk::RecentInfo&gt; info;\n"
6985"try\n"14224"try\n"
6986"{\n"14225"{\n"
6987"  info = recent_manager-&gt;lookup_item(uri);\n"14226"  info = recent_manager-&gt;lookup_item(uri);\n"
6993"if (info)\n"14232"if (info)\n"
6994"{\n"14233"{\n"
6995"  // item was found\n"14234"  // item was found\n"
6996"}</code>"14235"}</code>"
6997msgstr ""14236msgstr ""
nn14237"Glib::RefPtr&lt;Gtk::RecentInfo&gt; info;\n"
14238"try\n"
14239"{\n"
14240"  info = recent_manager-&gt;lookup_item(uri);\n"
14241"}\n"
14242"catch(const Gtk::RecentManagerError&amp; ex)\n"
14243"{\n"
14244"  std::cerr &lt;&lt; \"RecentManagerError: \" &lt;&lt; ex.what() &lt;&lt; std::
 >endl;\n"
14245"}\n"
14246"if (info)\n"
14247"{\n"
14248"  // objektet hittades\n"
14249"}"
699814250
6999#. (itstool) path: section/para14251#. (itstool) path: section/para
7000#: C/index-in.docbook:611714252#: C/index-in.docbook:6117
n7001msgid "A <classname>RecentInfo</classname> object is essentially an object contan14253#, fuzzy
>ining all of the metadata about a single recently-used file. You can use this ob 
>ject to look up any of the properties listed <link linkend=\"list-file-metadata\ 
>">above</link>." 
14254msgid ""
14255"A <classname>RecentInfo</classname> object is essentially an object "
14256"containing all of the metadata about a single recently-used file. You can "
14257"use this object to look up any of the properties listed <link linkend=\"list-"
14258"file-metadata\">above</link>."
7002msgstr ""14259msgstr ""
nn14260"Ett <classname>RecentInfo</classname>-objekt är i princip ett objekt som "
14261"innehåller alla metadata om en ensam senast använd fil. Du kan använda detta "
14262"objekt för att slå upp vilken som helst av egenskaperna listade <link "
14263"linkend=\"list-file-metadata\">ovan</link>."
700314264
7004#. (itstool) path: section/para14265#. (itstool) path: section/para
7005#: C/index-in.docbook:612314266#: C/index-in.docbook:6123
n7006msgid "If you don't want to look for a specific URI, but instead want to get a ln14267#, fuzzy
>ist of all recently used items, <classname>RecentManager</classname> provides th 
>e <methodname>get_items()</methodname> function. The return value of this functi 
>on is a <classname>std::vector</classname> of all recently used files. The follo 
>wing code demonstrates how you might get a list of recently used files:" 
14268msgid ""
14269"If you don't want to look for a specific URI, but instead want to get a list "
14270"of all recently used items, <classname>RecentManager</classname> provides "
14271"the <methodname>get_items()</methodname> function. The return value of this "
14272"function is a <classname>std::vector</classname> of all recently used files. "
14273"The following code demonstrates how you might get a list of recently used "
14274"files:"
7007msgstr ""14275msgstr ""
nn14276"Om du inte vill söka en viss URI, utan i stället vill få en lista över alla "
14277"senast använda filer tillhandahåller <classname>RecentManager</classname> "
14278"funktionen <methodname>get_items()</methodname>. Returvärdet för denna "
14279"funktion är en <classname>std::vector</classname> med alla senast använda "
14280"filer. Följande kod demonstrerar hur du kan få en lista över senast använda "
14281"filer:"
700814282
7009#. (itstool) path: section/programlisting14283#. (itstool) path: section/programlisting
7010#: C/index-in.docbook:613114284#: C/index-in.docbook:6131
n7011#, no-wrapn14285#, fuzzy, no-wrap
7012msgid ""14286#| msgid "auto info_list = recent_manager-&gt;get_items();"
7013"<code>auto info_list = recent_manager-&gt;get_items();</code>"14287msgid "<code>auto info_list = recent_manager-&gt;get_items();</code>"
7014msgstr ""14288msgstr "auto info_list = recent_manager-&gt;get_items();"
701514289
7016#. (itstool) path: section/para14290#. (itstool) path: section/para
7017#: C/index-in.docbook:613214291#: C/index-in.docbook:6132
n7018msgid "The maximum age of items in the recently used files list can be set with n14292#, fuzzy
><methodname>Gtk::Settings::property_gtk_recent_files_max_age()</methodname>. Def 
>ault value: 30 days." 
14293msgid ""
14294"The maximum age of items in the recently used files list can be set with "
14295"<methodname>Gtk::Settings::property_gtk_recent_files_max_age()</methodname>. "
14296"Default value: 30 days."
7019msgstr ""14297msgstr ""
nn14298"Den högsta åldern på objekt i listan över senast använda filer kan ställas "
14299"in med <methodname>Gtk::Settings::property_gtk_recent_files_max_age()</"
14300"methodname>. Standardvärde: 30 dagar."
702014301
7021#. (itstool) path: section/title14302#. (itstool) path: section/title
7022#: C/index-in.docbook:614014303#: C/index-in.docbook:6140
nn14304#, fuzzy
7023msgid "Modifying the List of Recent Files"14305msgid "Modifying the List of Recent Files"
n7024msgstr ""n14306msgstr "Modifiera listan över senast använda filer"
702514307
7026#. (itstool) path: section/para14308#. (itstool) path: section/para
7027#: C/index-in.docbook:614114309#: C/index-in.docbook:6141
n7028msgid "There may be times when you need to modify the list of recent files. For n14310#, fuzzy
>instance, if a file is moved or renamed, you may need to update the file's locat 
>ion in the recent files list so that it doesn't point to an incorrect location.  
>You can update an item's location by using <methodname>move_item()</methodname>. 
>" 
14311msgid ""
14312"There may be times when you need to modify the list of recent files. For "
14313"instance, if a file is moved or renamed, you may need to update the file's "
14314"location in the recent files list so that it doesn't point to an incorrect "
14315"location. You can update an item's location by using "
14316"<methodname>move_item()</methodname>."
7029msgstr ""14317msgstr ""
nn14318"Det kan finnas tillfällen när du behöver ändra listan över senast använda "
14319"filer. Om exempelvis en fil flyttas eller byter namn så kan du behöva "
14320"uppdatera filens plats i listan över senast använda filer så den inte pekar "
14321"på en ogiltig plats. Du kan uppdatera ett objekts plats genom att använda "
14322"<methodname>move_item()</methodname>."
703014323
7031#. (itstool) path: section/para14324#. (itstool) path: section/para
7032#: C/index-in.docbook:614814325#: C/index-in.docbook:6148
n7033msgid "In addition to changing a file's URI, you can also remove items from the n14326#, fuzzy
>list, either one at a time or by clearing them all at once. The former is accomp 
>lished with <methodname>remove_item()</methodname>, the latter with <methodname> 
>purge_items()</methodname>." 
14327msgid ""
14328"In addition to changing a file's URI, you can also remove items from the "
14329"list, either one at a time or by clearing them all at once. The former is "
14330"accomplished with <methodname>remove_item()</methodname>, the latter with "
14331"<methodname>purge_items()</methodname>."
7034msgstr ""14332msgstr ""
nn14333"Utöver att ändra en fils URI kan du också ta bort objekt från listan, "
14334"antingen ett åt gången eller genom att rensa bort alla samtidigt. Det "
14335"tidigare åstadkoms med <methodname>remove_item()</methodname>, det senare "
14336"med <methodname>purge_items()</methodname>."
703514337
7036#. (itstool) path: note/para14338#. (itstool) path: note/para
7037#: C/index-in.docbook:615514339#: C/index-in.docbook:6155
n7038msgid "The functions <methodname>move_item()</methodname>, <methodname>remove_itn14340#, fuzzy
>em()</methodname> and <methodname>purge_items()</methodname> have no effect on t 
>he actual files that are referred to by the URIs, they only modify the list of r 
>ecent files." 
14341msgid ""
14342"The functions <methodname>move_item()</methodname>, "
14343"<methodname>remove_item()</methodname> and <methodname>purge_items()</"
14344"methodname> have no effect on the actual files that are referred to by the "
14345"URIs, they only modify the list of recent files."
7039msgstr ""14346msgstr ""
nn14347"Funktionerna <methodname>move_item()</methodname>, "
14348"<methodname>remove_item()</methodname> och <methodname>purge_items()</"
14349"methodname> påverkar inte de faktiska filerna som URI:erna hänvisar till, de "
14350"ändrar bara listan över senaste filer."
704014351
7041#. (itstool) path: section/title14352#. (itstool) path: section/title
7042#: C/index-in.docbook:616714353#: C/index-in.docbook:6167
7043msgid "FileChooser and FileDialog"14354msgid "FileChooser and FileDialog"
n7044msgstr ""n14355msgstr "FileChooser och FileDialog"
704514356
7046#. (itstool) path: section/para14357#. (itstool) path: section/para
7047#: C/index-in.docbook:616914358#: C/index-in.docbook:6169
n7048msgid "<classname>FileChooser</classname> is an interface that can be implementen14359msgid ""
>d by widgets displaying a list of files. <application>gtkmm</application> provid 
>es three built-in implementations for choosing recent files or other files: <cla 
>ssname>FileChooserWidget</classname>, <classname>FileChooserDialog</classname>,  
>and <classname>FileChooserNative</classname>." 
14360"<classname>FileChooser</classname> is an interface that can be implemented "
14361"by widgets displaying a list of files. <application>gtkmm</application> "
14362"provides three built-in implementations for choosing recent files or other "
14363"files: <classname>FileChooserWidget</classname>, "
14364"<classname>FileChooserDialog</classname>, and <classname>FileChooserNative</"
14365"classname>."
7049msgstr ""14366msgstr ""
nn14367"<classname>FileChooser</classname> är ett gränssnitt som kan implementeras "
14368"av komponenter som visar en lista med filer. <application>gtkmm</"
14369"application> tillhandahåller tre inbyggda implementationer för att välja "
14370"senaste filer eller andra filer: <classname>FileChooserWidget</classname>, "
14371"<classname>FileChooserDialog</classname> och <classname>FileChooserNative</"
14372"classname>."
705014373
7051#. (itstool) path: section/para14374#. (itstool) path: section/para
7052#: C/index-in.docbook:617814375#: C/index-in.docbook:6178
n7053msgid "<classname>FileChooserWidget</classname> is a simple widget for displayinn14376#, fuzzy
>g a list of recently used files or other files. <classname>FileChooserWidget</cl 
>assname> is the basic building block for <classname>FileChooserDialog</classname 
>>, but you can embed it into your user interface if you want to." 
14377msgid ""
14378"<classname>FileChooserWidget</classname> is a simple widget for displaying a "
14379"list of recently used files or other files. <classname>FileChooserWidget</"
14380"classname> is the basic building block for <classname>FileChooserDialog</"
14381"classname>, but you can embed it into your user interface if you want to."
7054msgstr ""14382msgstr ""
nn14383"<classname>FileChooserWidget</classname> är ett enkelt gränssnitt för att "
14384"visa en lista med senast använda filer eller andra filer. "
14385"<classname>FileChooserWidget</classname> är grundblocket för "
14386"<classname>FileChooserDialog</classname>, men du kan bädda in den i ditt "
14387"användargränssnitt om du vill."
705514388
7056#. (itstool) path: note/para14389#. (itstool) path: note/para
7057#: C/index-in.docbook:618514390#: C/index-in.docbook:6185
n7058msgid "<classname>FileChooser</classname> and the classes that implement it are n14391msgid ""
>deprecated since <application>gtkmm</application> 4.10. They have been replaced  
>by <classname>FileDialog</classname>, which is available since <application>gtkm 
>m</application> 4.10." 
14392"<classname>FileChooser</classname> and the classes that implement it are "
14393"deprecated since <application>gtkmm</application> 4.10. They have been "
14394"replaced by <classname>FileDialog</classname>, which is available since "
14395"<application>gtkmm</application> 4.10."
7059msgstr ""14396msgstr ""
nn14397"<classname>FileChooser</classname> och klasserna som implementerar den är "
14398"föråldrade sedan <application>gtkmm</application> 4.10. De har ersatts av "
14399"<classname>FileDialog</classname>, vilken finns tillgänglig sedan "
14400"<application>gtkmm</application> 4.10."
706014401
7061#. (itstool) path: section/title14402#. (itstool) path: section/title
7062#: C/index-in.docbook:619114403#: C/index-in.docbook:6191
7063msgid "Simple FileDialog example"14404msgid "Simple FileDialog example"
n7064msgstr ""n14405msgstr "Enkelt FileDialog-exempel"
706514406
7066#. (itstool) path: section/para14407#. (itstool) path: section/para
7067#: C/index-in.docbook:619314408#: C/index-in.docbook:6193
n7068msgid "Shown below is a simple example of how to use the <classname>FileDialog</n14409#, fuzzy
>classname> class in a program. This simple program has a menubar with a <guimenu 
>item>File Dialog</guimenuitem> menu item. When you select this menu item, a dial 
>og pops up showing a list of files. If you select <guimenuitem>Recent</guimenuit 
>em> in the sidebar, the list of recently used files is shown." 
14410msgid ""
14411"Shown below is a simple example of how to use the <classname>FileDialog</"
14412"classname> class in a program. This simple program has a menubar with a "
14413"<guimenuitem>File Dialog</guimenuitem> menu item. When you select this menu "
14414"item, a dialog pops up showing a list of files. If you select "
14415"<guimenuitem>Recent</guimenuitem> in the sidebar, the list of recently used "
14416"files is shown."
7069msgstr ""14417msgstr ""
nn14418"Nedan visas ett enkelt exempel på hur du använder "
14419"<classname>FileChooserDialog</classname>-klassen i ett program. Detta enkla "
14420"program har en menyrad med ett menyobjekt <guimenuitem>File Chooser Dialog</"
14421"guimenuitem>. När du väljer detta menyobjekt poppar en dialogruta upp som "
14422"visar en fillista. Om du väljer <guimenuitem>Recent</guimenuitem> i "
14423"sidopanelen visas listan över senast använda filer."
707014424
7071#. (itstool) path: note/para14425#. (itstool) path: note/para
7072#: C/index-in.docbook:620314426#: C/index-in.docbook:6203
n7073msgid "If this is the first time you're using a program that uses the Recent Filn14427#, fuzzy
>es framework, the dialog may be empty at first. Otherwise it should show the lis 
>t of recently used documents registered by other applications." 
14428msgid ""
14429"If this is the first time you're using a program that uses the Recent Files "
14430"framework, the dialog may be empty at first. Otherwise it should show the "
14431"list of recently used documents registered by other applications."
7074msgstr ""14432msgstr ""
nn14433"Om detta är den första gången du använder ett program som använder senaste "
14434"filer-ramverket kan dialogrutan till en början vara tom. I andra fall bör "
14435"den visa listan över senast använda dokument som registrerats av andra "
14436"program."
707514437
7076#. (itstool) path: section/para14438#. (itstool) path: section/para
7077#: C/index-in.docbook:621014439#: C/index-in.docbook:6210
n7078msgid "After selecting the <guimenuitem>File Dialog</guimenuitem> menu item and n14440#, fuzzy
>the <guimenuitem>Recent</guimenuitem> sidebar item, you should see something sim 
>ilar to the following window." 
14441msgid ""
14442"After selecting the <guimenuitem>File Dialog</guimenuitem> menu item and the "
14443"<guimenuitem>Recent</guimenuitem> sidebar item, you should see something "
14444"similar to the following window."
7079msgstr ""14445msgstr ""
nn14446"Efter att ha valt menyobjektet <guimenuitem>File Chooser Dialog</"
14447"guimenuitem> och sidopanelsobjektet <guimenuitem>Recent</guimenuitem> bör du "
14448"se något liknande följande fönster."
708014449
7081#. (itstool) path: imageobject/imagedata14450#. (itstool) path: imageobject/imagedata
7082#. This is a reference to an external file such as an image or video. When14451#. This is a reference to an external file such as an image or video. When
7083#. the file changes, the md5 hash will change to let you know you need to14452#. the file changes, the md5 hash will change to let you know you need to
7084#. update your localized copy. The msgstr is not used at all. Set it to14453#. update your localized copy. The msgstr is not used at all. Set it to
7085#. whatever you like once you have updated your copy of the file.14454#. whatever you like once you have updated your copy of the file.
7086#: C/index-in.docbook:621614455#: C/index-in.docbook:6216
nn14456#, fuzzy
7087msgctxt "_"14457msgctxt "_"
nn14458msgid ""
7088msgid "external ref='figures/recentfiles.png' md5='2ca280c98b5c8822ad48ca40f7ce014459"external ref='figures/recentfiles.png' md5='2ca280c98b5c8822ad48ca40f7ce0bb4'"
>bb4'" 
7089msgstr ""14460msgstr ""
nn14461"external ref='figures/recentfiles.png' md5='2ca280c98b5c8822ad48ca40f7ce0bb4'"
709014462
7091#. (itstool) path: section/para14463#. (itstool) path: section/para
7092#: C/index-in.docbook:621814464#: C/index-in.docbook:6218
n7093msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren14465msgid ""
>e/master/examples/book/recent_files\">Source Code</link>" 
14466"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14467"master/examples/book/recent_files\">Source Code</link>"
7094msgstr ""14468msgstr ""
nn14469"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14470"master/examples/book/recent_files\">Källkod</link>"
709514471
7096#. (itstool) path: section/para14472#. (itstool) path: section/para
7097#: C/index-in.docbook:621914473#: C/index-in.docbook:6219
n7098msgid "The constructor for <classname>ExampleWindow</classname> creates the menun14474msgid ""
> and the toolbar using <classname>Builder</classname> (see <xref linkend=\"chapt 
>er-menus-and-toolbars\"/> for more information). It then adds the menu and the t 
>oolbar to the window." 
14475"The constructor for <classname>ExampleWindow</classname> creates the menu "
14476"and the toolbar using <classname>Builder</classname> (see <xref "
14477"linkend=\"chapter-menus-and-toolbars\"/> for more information). It then adds "
14478"the menu and the toolbar to the window."
7099msgstr ""14479msgstr ""
nn14480"Konstruktorn för <classname>ExampleWindow</classname> skapar menyn och "
14481"verktygsfältet med <classname>Builder</classname> (se <xref "
14482"linkend=\"chapter-menus-and-toolbars\"/> for mer information). Den lägger "
14483"sedan till menyn och verktygsfältet till fönstret."
710014484
7101#. (itstool) path: section/title14485#. (itstool) path: section/title
7102#: C/index-in.docbook:622714486#: C/index-in.docbook:6227
7103msgid "Filtering Files"14487msgid "Filtering Files"
n7104msgstr ""n14488msgstr "Filtrera filer"
710514489
7106#. (itstool) path: section/para14490#. (itstool) path: section/para
7107#: C/index-in.docbook:622814491#: C/index-in.docbook:6228
n7108msgid "For any of the <classname>FileChooser</classname> classes, if you don't wn14492#, fuzzy
>ish to display all of the items in the list of files, you can filter the list to 
> show only those that you want. You can filter the list with the help of the <cl 
>assname>FileFilter</classname> class. This class allows you to filter files by t 
>heir name (<methodname>add_pattern()</methodname>), or their mime type (<methodn 
>ame>add_mime_type()</methodname>)." 
14493msgid ""
14494"For any of the <classname>FileChooser</classname> classes, if you don't wish "
14495"to display all of the items in the list of files, you can filter the list to "
14496"show only those that you want. You can filter the list with the help of the "
14497"<classname>FileFilter</classname> class. This class allows you to filter "
14498"files by their name (<methodname>add_pattern()</methodname>), or their mime "
14499"type (<methodname>add_mime_type()</methodname>)."
7109msgstr ""14500msgstr ""
nn14501"För alla <classname>FileChooser</classname>-klasser kan du filtrera listan "
14502"så att bara de objekt som du vill se visas i fillistan. Du kan filtrera "
14503"listan med hjälp av <classname>FileFilter</classname>-klassen. Denna klass "
14504"låter dig filtrera filer efter deras namn (<methodname>add_pattern()</"
14505"methodname>) eller deras mime-typ (<methodname>add_mime_type()</methodname>)."
711014506
7111#. (itstool) path: section/para14507#. (itstool) path: section/para
7112#: C/index-in.docbook:623714508#: C/index-in.docbook:6237
n7113msgid "After you've created and set up the filter to match only the items you wan14509#, fuzzy
>nt, you can apply a filter to a chooser widget with the <methodname>FileChooser: 
>:add_filter()</methodname> function." 
14510msgid ""
14511"After you've created and set up the filter to match only the items you want, "
14512"you can apply a filter to a chooser widget with the <methodname>FileChooser::"
14513"add_filter()</methodname> function."
7114msgstr ""14514msgstr ""
nn14515"Efter att du skapat och konfigurerat filtret så att det bara matchar de "
14516"objekt du vill ha kan du tillämpa ett filter till en väljarkomponent med "
14517"funktionen <methodname>FileChooser::add_filter()</methodname>."
711514518
7116#. (itstool) path: chapter/title14519#. (itstool) path: chapter/title
7117#. (itstool) path: figure/title14520#. (itstool) path: figure/title
n7118#: C/index-in.docbook:6247n14521#: C/index-in.docbook:6247 C/index-in.docbook:6420
7119#: C/index-in.docbook:642014522#, fuzzy
14523#| msgid "Keyboard Events"
7120msgid "Keyboard and Mouse Events"14524msgid "Keyboard and Mouse Events"
n7121msgstr ""n14525msgstr "Tangentbordshändelser"
712214526
7123#. (itstool) path: chapter/para14527#. (itstool) path: chapter/para
7124#: C/index-in.docbook:624814528#: C/index-in.docbook:6248
n7125msgid "Event signals differ in some ways from other signals. These differences an14529#, fuzzy
>re described in the <link linkend=\"sec-eventsignals\">Event signals</link> sect 
>ion in the appendix. Here we will use keyboard events and mouse events to show h 
>ow events can be used in a program." 
14530msgid ""
14531"Event signals differ in some ways from other signals. These differences are "
14532"described in the <link linkend=\"sec-eventsignals\">Event signals</link> "
14533"section in the appendix. Here we will use keyboard events and mouse events "
14534"to show how events can be used in a program."
7126msgstr ""14535msgstr ""
nn14536"Händelsesignaler skiljer sig på några sätt från andra signaler. Dessa "
14537"skillnader beskrivs i avsnittet <link linkend=\"sec-"
14538"eventsignals\">Händelsesignaler</link> i bilagan. Här kommer vi använda "
14539"tangentbordshändelser för att visa hur händelser kan användas i ett program."
712714540
7128#. (itstool) path: section/title14541#. (itstool) path: section/title
7129#: C/index-in.docbook:625514542#: C/index-in.docbook:6255
7130msgid "Overview"14543msgid "Overview"
n7131msgstr ""n14544msgstr "Översikt"
713214545
7133#. (itstool) path: section/para14546#. (itstool) path: section/para
7134#: C/index-in.docbook:625714547#: C/index-in.docbook:6257
n7135msgid "Whenever you press or release a key, an event is emitted. You can add an n14548#, fuzzy
>event controller and connect a signal handler to handle such events." 
14549msgid ""
14550"Whenever you press or release a key, an event is emitted. You can add an "
14551"event controller and connect a signal handler to handle such events."
7136msgstr ""14552msgstr ""
nn14553"Närhelst du trycker på eller släpper en tangent sänds en händelse ut. Du kan "
14554"lägga till en händelsekontroll och ansluta en signalhanterare för att "
14555"hantera sådana händelser."
713714556
7138#. (itstool) path: section/para14557#. (itstool) path: section/para
7139#: C/index-in.docbook:626114558#: C/index-in.docbook:6261
n7140msgid "The event signal handler will receive arguments that depend on the type on14559#, fuzzy
>f event. For key press events the arguments are (<type>guint</type> <varname>key 
>val</varname>, <type>guint</type> <varname>keycode</varname>, <type>Gdk::Modifie 
>rType</type> <varname>state</varname>). As described in the <link linkend=\"sec- 
>eventsignals\">appendix</link>, the key press event signal handler returns a <ty 
>pe>bool</type> value, to indicate that the signal is fully handled (<literal>tru 
>e</literal>) or allow event propagation (<literal>false</literal>)." 
14560msgid ""
14561"The event signal handler will receive arguments that depend on the type of "
14562"event. For key press events the arguments are (<type>guint</type> "
14563"<varname>keyval</varname>, <type>guint</type> <varname>keycode</varname>, "
14564"<type>Gdk::ModifierType</type> <varname>state</varname>). As described in "
14565"the <link linkend=\"sec-eventsignals\">appendix</link>, the key press event "
14566"signal handler returns a <type>bool</type> value, to indicate that the "
14567"signal is fully handled (<literal>true</literal>) or allow event propagation "
14568"(<literal>false</literal>)."
7141msgstr ""14569msgstr ""
nn14570"Händelsesignalhanteraren kommer ta emot argument som beror på händelsetypen. "
14571"För tangenttryckshändelser är argumenten (<type>guint</type> "
14572"<varname>keyval</varname>, <type>guint</type> <varname>keycode</varname>, "
14573"<type>Gdk::ModifierType</type> <varname>state</varname>). Som beskrivet i "
14574"<link linkend=\"sec-eventsignals\">bilagan</link>, returnerar "
14575"signalhanteraren för tangenttryckshändelsen ett <type>bool</type>-värde för "
14576"att indikera att signalen hanteras fullständigt (<literal>true</literal>) "
14577"eller tillåter händelsespridning (<literal>false</literal>)."
714214578
7143#. (itstool) path: section/para14579#. (itstool) path: section/para
7144#: C/index-in.docbook:627014580#: C/index-in.docbook:6270
n7145msgid "To determine which key was pressed or released, you read the value of then14581#, fuzzy
> <varname>keyval</varname> argument and compare it with a constant in the <link  
>xlink:href=\"https://gitlab.gnome.org/GNOME/gtk/tree/main/gdk/gdkkeysyms.h\"> <f 
>ilename>&lt;gdk/gdkkeysyms.h&gt;</filename></link> header file. The states of mo 
>difier keys (shift, ctrl, etc.) are available as bit-flags in <varname>state</va 
>rname>." 
14582msgid ""
14583"To determine which key was pressed or released, you read the value of the "
14584"<varname>keyval</varname> argument and compare it with a constant in the "
14585"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtk/tree/main/gdk/"
14586"gdkkeysyms.h\"> <filename>&lt;gdk/gdkkeysyms.h&gt;</filename></link> header "
14587"file. The states of modifier keys (shift, ctrl, etc.) are available as bit-"
14588"flags in <varname>state</varname>."
7146msgstr ""14589msgstr ""
nn14590"För att avgöra vilken tangent som trycktes ned eller släpptes läser du "
14591"värdet på argumentet <varname>keyval</varname> och jämför det med en "
14592"konstant i header-filen <link xlink:href=\"https://gitlab.gnome.org/GNOME/"
14593"gtk/tree/main/gdk/gdkkeysyms.h\"> <filename>&lt;gdk/gdkkeysyms.h&gt;</"
14594"filename></link>. Tillstånden för modifierartangenter (skift, ctrl o.s.v.) "
14595"finns tillgängliga som bitflaggor i <varname>state</varname>."
714714596
7148#. (itstool) path: section/para14597#. (itstool) path: section/para
n7149#: C/index-in.docbook:6278n14598#: C/index-in.docbook:6278 C/index-in.docbook:9263
7150#: C/index-in.docbook:9263
7151msgid "Here's a simple example:"14599msgid "Here's a simple example:"
n7152msgstr ""n14600msgstr "Här är ett enkelt exempel:"
715314601
7154#. (itstool) path: section/programlisting14602#. (itstool) path: section/programlisting
7155#: C/index-in.docbook:628114603#: C/index-in.docbook:6281
n7156#, no-wrapn14604#, fuzzy, no-wrap
7157msgid ""14605msgid ""
7158"<code>\n"14606"<code>\n"
7159"bool MyClass::on_key_pressed(guint keyval, guint, Gdk::ModifierType state)\n"14607"bool MyClass::on_key_pressed(guint keyval, guint, Gdk::ModifierType state)\n"
7160"{\n"14608"{\n"
7161"  if (keyval == GDK_KEY_1 &amp;&amp;\n"14609"  if (keyval == GDK_KEY_1 &amp;&amp;\n"
7173"controller-&gt;signal_key_pressed().connect(\n"14621"controller-&gt;signal_key_pressed().connect(\n"
7174"  sigc::mem_fun(*this, &amp;MyClass::on_key_pressed), false);\n"14622"  sigc::mem_fun(*this, &amp;MyClass::on_key_pressed), false);\n"
7175"add_controller(controller);\n"14623"add_controller(controller);\n"
7176"</code>"14624"</code>"
7177msgstr ""14625msgstr ""
nn14626"\n"
14627"bool MyClass::on_key_pressed(guint keyval, guint, Gdk::ModifierType state)\n"
14628"{\n"
14629"  if (keyval == GDK_KEY_1 &amp;&amp;\n"
14630"    (state &amp; (Gdk::ModifierType::SHIFT_MASK | Gdk::ModifierType::CONTROL_MA
 >SK |\n"
14631"     Gdk::ModifierType::ALT_MASK)) == Gdk::ModifierType::ALT_MASK)\n"
14632"  {\n"
14633"    handle_alt_press();\n"
14634"    return true;\n"
14635"  }\n"
14636"  return false;\n"
14637"}\n"
14638"\n"
14639"// i MyClass-konstruktor\n"
14640"auto controller = Gtk::EventControllerKey::create();\n"
14641"controller-&gt;signal_key_pressed().connect(\n"
14642"  sigc::mem_fun(*this, &amp;MyClass::on_key_pressed), false);\n"
14643"add_controller(controller);\n"
717814644
7179#. (itstool) path: section/para14645#. (itstool) path: section/para
7180#: C/index-in.docbook:630414646#: C/index-in.docbook:6304
n7181msgid "In this example there are three keyboard shortcuts: <keycap>Alt</keycap>+n14647msgid ""
><keycap>1</keycap> selects the first radio button, <keycap>Alt</keycap>+<keycap> 
>2</keycap> selects the second one, and the <keycap>Esc</keycap> key hides (close 
>s) the window." 
14648"In this example there are three keyboard shortcuts: <keycap>Alt</"
14649"keycap>+<keycap>1</keycap> selects the first radio button, <keycap>Alt</"
14650"keycap>+<keycap>2</keycap> selects the second one, and the <keycap>Esc</"
14651"keycap> key hides (closes) the window."
7182msgstr ""14652msgstr ""
nn14653"I detta exempel finns det tre tangentbordsgenvägar: <keycap>Alt</"
14654"keycap>+<keycap>1</keycap> väljer den första radioknappen, <keycap>Alt</"
14655"keycap>+<keycap>2</keycap> väljer den andra, och <keycap>Esc</keycap> döljer "
14656"(stänger) fönstret."
718314657
7184#. (itstool) path: figure/title14658#. (itstool) path: figure/title
7185#: C/index-in.docbook:631214659#: C/index-in.docbook:6312
nn14660#, fuzzy
7186msgid "Keyboard Events - Simple"14661msgid "Keyboard Events - Simple"
n7187msgstr ""n14662msgstr "Tangentbordshändelser - Enkelt"
718814663
7189#. (itstool) path: imageobject/imagedata14664#. (itstool) path: imageobject/imagedata
7190#. This is a reference to an external file such as an image or video. When14665#. This is a reference to an external file such as an image or video. When
7191#. the file changes, the md5 hash will change to let you know you need to14666#. the file changes, the md5 hash will change to let you know you need to
7192#. update your localized copy. The msgstr is not used at all. Set it to14667#. update your localized copy. The msgstr is not used at all. Set it to
7193#. whatever you like once you have updated your copy of the file.14668#. whatever you like once you have updated your copy of the file.
7194#: C/index-in.docbook:631414669#: C/index-in.docbook:6314
nn14670#, fuzzy
7195msgctxt "_"14671msgctxt "_"
n7196msgid "external ref='figures/events_simple.png' md5='59e69135f7b646af1a9f528eba1n14672msgid ""
>3a5df'" 
14673"external ref='figures/events_simple.png' "
14674"md5='59e69135f7b646af1a9f528eba13a5df'"
7197msgstr ""14675msgstr ""
nn14676"external ref='figures/keyboardevents_simple.png' "
14677"md5='59e69135f7b646af1a9f528eba13a5df'"
719814678
7199#. (itstool) path: section/para14679#. (itstool) path: section/para
7200#: C/index-in.docbook:631814680#: C/index-in.docbook:6318
n7201msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren14681#, fuzzy
>e/master/examples/book/events/keyboard_simple/\">Source Code</link>" 
14682#| msgid ""
14683#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
14684#| "tree/master/examples/book/keyboard_events/simple/\">Source Code</link>"
14685msgid ""
14686"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14687"master/examples/book/events/keyboard_simple/\">Source Code</link>"
7202msgstr ""14688msgstr ""
nn14689"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14690"master/examples/book/keyboard_events/simple/\">Källkod</link>"
720314691
7204#. (itstool) path: section/title14692#. (itstool) path: section/title
7205#: C/index-in.docbook:632314693#: C/index-in.docbook:6323
nn14694#, fuzzy
7206msgid "Event Propagation"14695msgid "Event Propagation"
n7207msgstr ""n14696msgstr "Händelsespridning"
720814697
7209#. (itstool) path: listitem/simpara14698#. (itstool) path: listitem/simpara
n7210#: C/index-in.docbook:6329n14699#: C/index-in.docbook:6329 C/index-in.docbook:9301
7211#: C/index-in.docbook:930114700#, fuzzy
7212msgid "Capture phase - runs from the toplevel down to the event widget."14701msgid "Capture phase - runs from the toplevel down to the event widget."
n7213msgstr ""n14702msgstr "Fångstfas - körs från toppnivån ner till händelsekomponenten."
721414703
7215#. (itstool) path: listitem/simpara14704#. (itstool) path: listitem/simpara
n7216#: C/index-in.docbook:6330n14705#: C/index-in.docbook:6330 C/index-in.docbook:9302
7217#: C/index-in.docbook:930214706#, fuzzy
7218msgid "Target phase - runs only on the event widget."14707msgid "Target phase - runs only on the event widget."
n7219msgstr ""n14708msgstr "Målfas - körs bara på händelsekomponenten."
722014709
7221#. (itstool) path: listitem/simpara14710#. (itstool) path: listitem/simpara
n7222#: C/index-in.docbook:6331n14711#: C/index-in.docbook:6331 C/index-in.docbook:9303
7223#: C/index-in.docbook:930314712#, fuzzy
7224msgid "Bubble phase - runs from the event widget up to the toplevel."14713msgid "Bubble phase - runs from the event widget up to the toplevel."
n7225msgstr ""n14714msgstr "Bubbelfas - körs från händelsekomponenten upp till toppnivån."
722614715
7227#. (itstool) path: section/para14716#. (itstool) path: section/para
7228#: C/index-in.docbook:632514717#: C/index-in.docbook:6325
n7229msgid "As described in the <link linkend=\"signal-handler-sequence\">appendix</ln14718#, fuzzy
>ink> event signals are propagated in 3 phases: <_:orderedlist-1/>" 
14719msgid ""
14720"As described in the <link linkend=\"signal-handler-sequence\">appendix</"
14721"link> event signals are propagated in 3 phases: <_:orderedlist-1/>"
7230msgstr ""14722msgstr ""
nn14723"Som beskrivs i <link linkend=\"signal-handler-sequence\">bilagan</link> "
14724"sprids händelsesignaler i 3 faser: <_:orderedlist-1/>"
723114725
7232#. (itstool) path: section/para14726#. (itstool) path: section/para
7233#: C/index-in.docbook:633414727#: C/index-in.docbook:6334
n7234msgid "A keyboard event is first sent to the toplevel window (<classname>Gtk::Win14728#, fuzzy
>ndow</classname>), where it will be checked for any keyboard shortcuts that may  
>be set (accelerator keys and mnemonics, used for selecting menu items from the k 
>eyboard). After this (and assuming the event wasn't handled), it is propagated d 
>own until it reaches the widget which has keyboard focus. The event will then pr 
>opagate up until it reaches the top-level widget, or until you stop the propagat 
>ion by returning <literal>true</literal> from an event handler." 
14729msgid ""
14730"A keyboard event is first sent to the toplevel window (<classname>Gtk::"
14731"Window</classname>), where it will be checked for any keyboard shortcuts "
14732"that may be set (accelerator keys and mnemonics, used for selecting menu "
14733"items from the keyboard). After this (and assuming the event wasn't "
14734"handled), it is propagated down until it reaches the widget which has "
14735"keyboard focus. The event will then propagate up until it reaches the top-"
14736"level widget, or until you stop the propagation by returning <literal>true</"
14737"literal> from an event handler."
7235msgstr ""14738msgstr ""
nn14739"En tangentbordshändelse skickas först till toppnivåfönstret (<classname>Gtk::"
14740"Window</classname>), där den kommer kontrolleras för tangentbordsgenvägar "
14741"som kan ha satts (snabbtangenter och kortkommandon, använda för att välja "
14742"menyobjekt från tangentbordet). Efter detta (och om vi antar att händelsen "
14743"inte hanterats), så sprids den nedåt tills den når komponenten som har "
14744"tangentbordsfokus. Händelsen kommer sedan spridas uppåt tills den når "
14745"toppnivåkomponenten, eller till du stoppar spridningen genom att returnera "
14746"<literal>true</literal> från en händelsehanterare."
723614747
7237#. (itstool) path: section/para14748#. (itstool) path: section/para
7238#: C/index-in.docbook:634414749#: C/index-in.docbook:6344
nn14750#, fuzzy
14751msgid ""
7239msgid "Notice, that after canceling an event, no other function will be called (14752"Notice, that after canceling an event, no other function will be called "
>even if it is from the same widget)." 
14753"(even if it is from the same widget)."
7240msgstr ""14754msgstr ""
nn14755"Observera att efter att ha avbrutit en händelse kommer ingen annan funktion "
14756"att anropas (även om den är från samma komponent)."
724114757
7242#. (itstool) path: section/para14758#. (itstool) path: section/para
7243#: C/index-in.docbook:635214759#: C/index-in.docbook:6352
n7244msgid "In this example there are 9 <classname>EventControllerKey</classname>s, 3n14760#, fuzzy
> in each of a <classname>Gtk::Window</classname>, a <classname>Gtk::Box</classna 
>me> and a <classname>Gtk::Label</classname>. In each of the widgets there is one 
> event controller for each propagation phase." 
14761msgid ""
14762"In this example there are 9 <classname>EventControllerKey</classname>s, 3 in "
14763"each of a <classname>Gtk::Window</classname>, a <classname>Gtk::Box</"
14764"classname> and a <classname>Gtk::Label</classname>. In each of the widgets "
14765"there is one event controller for each propagation phase."
7245msgstr ""14766msgstr ""
nn14767"I detta exempel finns det 9 <classname>EventControllerKey</classname>, 3 i "
14768"varje av ett <classname>Gtk::Window</classname>, en <classname>Gtk::Box</"
14769"classname> och en <classname>Gtk::Label</classname>. I var och en av "
14770"komponenterna finns en händelsekontroll för varje spridningsfas."
724614771
7247#. (itstool) path: section/para14772#. (itstool) path: section/para
7248#: C/index-in.docbook:635814773#: C/index-in.docbook:6358
nn14774#, fuzzy
14775msgid ""
7249msgid "The purpose of this example is to show the steps the event takes when it 14776"The purpose of this example is to show the steps the event takes when it is "
>is emitted." 
14777"emitted."
7250msgstr ""14778msgstr ""
nn14779"Syftet med detta exempel är att visa stegen som händelsen tar när den sänds "
14780"ut."
725114781
7252#. (itstool) path: section/para14782#. (itstool) path: section/para
7253#: C/index-in.docbook:636114783#: C/index-in.docbook:6361
n7254msgid "When you write in the label, a key press event will be emitted, which wiln14784#, fuzzy
>l go first, in the capture phase, to the toplevel window (<classname>Gtk::Window 
></classname>), then down to its child, the box, then to the box's child, the lab 
>el with the keyboard focus. In the target phase the event goes only to the widge 
>t with the keyboard focus (the label). In the bubble phase the event goes first  
>to the widget with the keyboard focus (the label), then to its parent (the box), 
> then to the box's parent (the window). If the event propagates all the way down 
> to the label and then up to the window without being stopped, the text you're w 
>riting will appear in the <classname>Label</classname> above the <classname>Labe 
>l</classname> you're writing in." 
14785msgid ""
14786"When you write in the label, a key press event will be emitted, which will "
14787"go first, in the capture phase, to the toplevel window (<classname>Gtk::"
14788"Window</classname>), then down to its child, the box, then to the box's "
14789"child, the label with the keyboard focus. In the target phase the event goes "
14790"only to the widget with the keyboard focus (the label). In the bubble phase "
14791"the event goes first to the widget with the keyboard focus (the label), then "
14792"to its parent (the box), then to the box's parent (the window). If the event "
14793"propagates all the way down to the label and then up to the window without "
14794"being stopped, the text you're writing will appear in the <classname>Label</"
14795"classname> above the <classname>Label</classname> you're writing in."
7255msgstr ""14796msgstr ""
nn14797"När du skriver i etiketten kommer en tangenttryckshändelse sändas ut, vilken "
14798"först i fångstfasen går till toppnivåfönstret (<classname>Gtk::Window</"
14799"classname>), sedan till dess underordnade box, sedan till boxens "
14800"underordnade, etiketten med tangentbordsfokus. I målfasen går händelsen "
14801"endast till komponenten med tangentbordsfokus (etiketten). I bubbelfasen går "
14802"händelsen först till komponenten med tangentbordsfokus (etiketten), sedan "
14803"till dess överordnade (boxen). sedan till boxens överordnade (fönstret). Om "
14804"händelsen sprids hela vägen till etiketten och sedan upp till fönstret utan "
14805"att stoppas kommer texten du skriver dyka upp i den <classname>Label</"
14806"classname> som är ovanför den <classname>Label</classname> du skriver i."
725614807
7257#. (itstool) path: figure/title14808#. (itstool) path: figure/title
7258#: C/index-in.docbook:637614809#: C/index-in.docbook:6376
nn14810#, fuzzy
7259msgid "Keyboard Events - Event Propagation"14811msgid "Keyboard Events - Event Propagation"
n7260msgstr ""n14812msgstr "Tangentbordshändelser - Händelsespridning"
726114813
7262#. (itstool) path: imageobject/imagedata14814#. (itstool) path: imageobject/imagedata
7263#. This is a reference to an external file such as an image or video. When14815#. This is a reference to an external file such as an image or video. When
7264#. the file changes, the md5 hash will change to let you know you need to14816#. the file changes, the md5 hash will change to let you know you need to
7265#. update your localized copy. The msgstr is not used at all. Set it to14817#. update your localized copy. The msgstr is not used at all. Set it to
7266#. whatever you like once you have updated your copy of the file.14818#. whatever you like once you have updated your copy of the file.
7267#: C/index-in.docbook:637814819#: C/index-in.docbook:6378
nn14820#, fuzzy
7268msgctxt "_"14821msgctxt "_"
n7269msgid "external ref='figures/events_propagation.png' md5='4250a1b17c413f3243cf11n14822msgid ""
>485e7a7bb9'" 
14823"external ref='figures/events_propagation.png' "
14824"md5='4250a1b17c413f3243cf11485e7a7bb9'"
7270msgstr ""14825msgstr ""
nn14826"external ref='figures/keyboardevents_propagation.png' "
14827"md5='4250a1b17c413f3243cf11485e7a7bb9'"
727114828
7272#. (itstool) path: section/para14829#. (itstool) path: section/para
7273#: C/index-in.docbook:638214830#: C/index-in.docbook:6382
n7274msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren14831#, fuzzy
>e/master/examples/book/events/keyboard_propagation/\">Source Code</link>" 
14832#| msgid ""
14833#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
14834#| "tree/master/examples/book/keyboard_events/propagation/\">Source Code</"
14835#| "link>"
14836msgid ""
14837"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14838"master/examples/book/events/keyboard_propagation/\">Source Code</link>"
7275msgstr ""14839msgstr ""
nn14840"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14841"master/examples/book/keyboard_events/propagation/\">Källkod</link>"
727614842
7277#. (itstool) path: section/title14843#. (itstool) path: section/title
7278#: C/index-in.docbook:638714844#: C/index-in.docbook:6387
7279msgid "Mouse Events"14845msgid "Mouse Events"
7280msgstr ""14846msgstr ""
728114847
7282#. (itstool) path: listitem/para14848#. (itstool) path: listitem/para
7283#: C/index-in.docbook:639214849#: C/index-in.docbook:6392
nn14850#, fuzzy
14851#| msgid ""
14852#| "<classname>Gtk::FontButton</classname> implements the <classname>Gtk::"
14853#| "FontChooser</classname> interface."
14854msgid ""
7284msgid "You use <classname>Gtk::GestureClick</classname> instead of <classname>Gt14855"You use <classname>Gtk::GestureClick</classname> instead of <classname>Gtk::"
>k::EventControllerKey</classname>." 
14856"EventControllerKey</classname>."
7285msgstr ""14857msgstr ""
nn14858"<classname>Gtk::FontButton</classname> implementerar gränssnittet "
14859"<classname>Gtk::FontChooser</classname>."
728614860
7287#. (itstool) path: listitem/para14861#. (itstool) path: listitem/para
7288#: C/index-in.docbook:639414862#: C/index-in.docbook:6394
n7289msgid "There are other event classes that can be used for handling mouse events,n14863#, fuzzy
> for instance <classname>Gtk::EventControllerMotion</classname> and <classname>G 
>tk::EventControllerScroll</classname>." 
14864#| msgid ""
14865#| "<classname>Gtk::EventControllerKey</classname>, <classname>Gtk::"
14866#| "EventControllerMotion</classname>, <classname>Gtk::EventControllerScroll</"
14867#| "classname> and <classname>Gtk::GestureStylus</classname>"
14868msgid ""
14869"There are other event classes that can be used for handling mouse events, "
14870"for instance <classname>Gtk::EventControllerMotion</classname> and "
14871"<classname>Gtk::EventControllerScroll</classname>."
7290msgstr ""14872msgstr ""
nn14873"<classname>Gtk::EventControllerKey</classname>, <classname>Gtk::"
14874"EventControllerMotion</classname>, <classname>Gtk::EventControllerScroll</"
14875"classname> och <classname>Gtk::GestureStylus</classname>"
729114876
7292#. (itstool) path: listitem/para14877#. (itstool) path: listitem/para
7293#: C/index-in.docbook:639714878#: C/index-in.docbook:6397
nn14879msgid ""
7294msgid "Many signal handlers don't return a <literal>bool</literal>. You can't st14880"Many signal handlers don't return a <literal>bool</literal>. You can't stop "
>op those events from propagating." 
14881"those events from propagating."
7295msgstr ""14882msgstr ""
729614883
7297#. (itstool) path: section/para14884#. (itstool) path: section/para
7298#: C/index-in.docbook:638914885#: C/index-in.docbook:6389
nn14886msgid ""
7299msgid "Mouse events are similar to keyboard events. There are some differences, 14887"Mouse events are similar to keyboard events. There are some differences, "
>though. <_:itemizedlist-1/>" 
14888"though. <_:itemizedlist-1/>"
7300msgstr ""14889msgstr ""
730114890
7302#. (itstool) path: section/para14891#. (itstool) path: section/para
7303#: C/index-in.docbook:640214892#: C/index-in.docbook:6402
n7304msgid "The event classes that handle mouse events are also useful for handling en14893msgid ""
>vents from touchscreens. There are also many subclasses of <classname>Gtk::Event 
>Controller</classname> which are only (or mainly) useful for touchscreens. Examp 
>les: <classname>Gtk::GestureRotate</classname>, <classname>Gtk::GestureZoom</cla 
>ssname>, <classname>Gtk::GestureSwipe</classname>, <classname>Gtk::GestureLongPr 
>ess</classname>." 
14894"The event classes that handle mouse events are also useful for handling "
14895"events from touchscreens. There are also many subclasses of <classname>Gtk::"
14896"EventController</classname> which are only (or mainly) useful for "
14897"touchscreens. Examples: <classname>Gtk::GestureRotate</classname>, "
14898"<classname>Gtk::GestureZoom</classname>, <classname>Gtk::GestureSwipe</"
14899"classname>, <classname>Gtk::GestureLongPress</classname>."
7305msgstr ""14900msgstr ""
730614901
7307#. (itstool) path: section/para14902#. (itstool) path: section/para
7308#: C/index-in.docbook:641114903#: C/index-in.docbook:6411
n7309msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n14904#, fuzzy
>1EventController.html\">Reference</link>" 
14905#| msgid ""
14906#| "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
14907#| "classGtk_1_1Entry.html\">Reference</link>"
14908msgid ""
14909"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
14910"classGtk_1_1EventController.html\">Reference</link>"
7310msgstr ""14911msgstr ""
nn14912"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
14913"classGtk_1_1Entry.html\">Referens</link>"
731114914
7312#. (itstool) path: section/para14915#. (itstool) path: section/para
7313#: C/index-in.docbook:641514916#: C/index-in.docbook:6415
7314msgid "This is an expanded version of the simple keyboard events example."14917msgid "This is an expanded version of the simple keyboard events example."
7315msgstr ""14918msgstr ""
7318#. This is a reference to an external file such as an image or video. When14921#. This is a reference to an external file such as an image or video. When
7319#. the file changes, the md5 hash will change to let you know you need to14922#. the file changes, the md5 hash will change to let you know you need to
7320#. update your localized copy. The msgstr is not used at all. Set it to14923#. update your localized copy. The msgstr is not used at all. Set it to
7321#. whatever you like once you have updated your copy of the file.14924#. whatever you like once you have updated your copy of the file.
7322#: C/index-in.docbook:642214925#: C/index-in.docbook:6422
nn14926#, fuzzy
7323msgctxt "_"14927msgctxt "_"
n7324msgid "external ref='figures/events_mouse.png' md5='e92832c065b3b626a14b5da77d20n14928msgid ""
>9b2f'" 
14929"external ref='figures/events_mouse.png' "
14930"md5='e92832c065b3b626a14b5da77d209b2f'"
7325msgstr ""14931msgstr ""
nn14932"external ref='figures/treeview_popup.png' "
14933"md5='29c7b04f9f865c6ae8214cbb1724b05f'"
732614934
7327#. (itstool) path: section/para14935#. (itstool) path: section/para
7328#: C/index-in.docbook:642614936#: C/index-in.docbook:6426
n7329msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren14937#, fuzzy
>e/master/examples/book/events/mouse/\">Source Code</link>" 
14938#| msgid ""
14939#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
14940#| "tree/master/examples/book/menus/popup/\">Source Code</link>"
14941msgid ""
14942"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14943"master/examples/book/events/mouse/\">Source Code</link>"
7330msgstr ""14944msgstr ""
nn14945"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
14946"master/examples/book/menus/popup/\">Källkod</link>"
733114947
7332#. (itstool) path: chapter/title14948#. (itstool) path: chapter/title
7333#: C/index-in.docbook:643214949#: C/index-in.docbook:6432
nn14950#, fuzzy
7334msgid "Timeouts, I/O and Idle Functions"14951msgid "Timeouts, I/O and Idle Functions"
n7335msgstr ""n14952msgstr "Timeout, I/O och inaktivitetsfunktioner"
733614953
7337#. (itstool) path: section/title14954#. (itstool) path: section/title
7338#: C/index-in.docbook:643514955#: C/index-in.docbook:6435
nn14956#, fuzzy
7339msgid "Timeouts"14957msgid "Timeouts"
n7340msgstr ""n14958msgstr "Timeout"
734114959
7342#. (itstool) path: section/para14960#. (itstool) path: section/para
7343#: C/index-in.docbook:643714961#: C/index-in.docbook:6437
n7344msgid "You may be wondering how to make <application>gtkmm</application> do usefn14962#, fuzzy
>ul work while it's idling along. Happily, you have several options. Using the fo 
>llowing methods you can create a timeout method that will be called every few mi 
>lliseconds." 
14963msgid ""
14964"You may be wondering how to make <application>gtkmm</application> do useful "
14965"work while it's idling along. Happily, you have several options. Using the "
14966"following methods you can create a timeout method that will be called every "
14967"few milliseconds."
7345msgstr ""14968msgstr ""
nn14969"Du kanske funderar hur du kan få <application>gtkmm</application> att göra "
14970"något nyttigt medan det är inaktivt. Lyckligtvis har du flera alternativ. "
14971"Med de följande metoderna kan du skapa en timeout-metod som kommer anropas "
14972"med några millisekunders intervall."
734614973
7347#. (itstool) path: section/programlisting14974#. (itstool) path: section/programlisting
7348#: C/index-in.docbook:644314975#: C/index-in.docbook:6443
n7349#, no-wrapn14976#, fuzzy, no-wrap
7350msgid ""14977msgid ""
7351"<code>sigc::connection Glib::SignalTimeout::connect(const sigc::slot&lt;bool()&14978"<code>sigc::connection Glib::SignalTimeout::connect(const sigc::slot&lt;bool()&
>gt;&amp; slot,\n">gt;&amp; slot,\n"
7352"                                      unsigned int interval, int priority = Gli14979"                                      unsigned int interval, int priority = Gli
>b::PRIORITY_DEFAULT);\n">b::PRIORITY_DEFAULT);\n"
7353"</code>"14980"</code>"
7354msgstr ""14981msgstr ""
nn14982"\n"
14983"sigc::connection Glib::SignalTimeout::connect(const sigc::slot&lt;bool()&gt;&am
 >p; slot,\n"
14984"                                      unsigned int interval, int priority = Gli
 >b::PRIORITY_DEFAULT);\n"
735514985
7356#. (itstool) path: section/para14986#. (itstool) path: section/para
7357#: C/index-in.docbook:644714987#: C/index-in.docbook:6447
n7358msgid "The first argument is a <classname>slot</classname> you wish to have calln14988#, fuzzy
>ed when the timeout occurs. The second argument is the number of milliseconds be 
>tween calls to that method. You receive a <classname>sigc::connection</classname 
>> object that can be used to deactivate the connection using its <methodname>dis 
>connect()</methodname> method:" 
14989msgid ""
14990"The first argument is a <classname>slot</classname> you wish to have called "
14991"when the timeout occurs. The second argument is the number of milliseconds "
14992"between calls to that method. You receive a <classname>sigc::connection</"
14993"classname> object that can be used to deactivate the connection using its "
14994"<methodname>disconnect()</methodname> method:"
7359msgstr ""14995msgstr ""
nn14996"Det första argumentet är en <classname>slot</classname> som du vill ha "
14997"anropad när timeouten inträffar. Det andra argumentet är antal millisekunder "
14998"mellan anrop till den metoden. Du erhåller ett <classname>sigc::connection</"
14999"classname>-objekt som kan användas för att inaktivera anslutningen med dess "
15000"<methodname>disconnect()</methodname>-metod:"
736015001
7361#. (itstool) path: section/programlisting15002#. (itstool) path: section/programlisting
7362#: C/index-in.docbook:645515003#: C/index-in.docbook:6455
n7363#, no-wrapn15004#, fuzzy, no-wrap
7364msgid ""15005msgid ""
7365"<code>my_connection.disconnect();\n"15006"<code>my_connection.disconnect();\n"
7366"</code>"15007"</code>"
7367msgstr ""15008msgstr ""
nn15009"\n"
15010"my_connection.disconnect();\n"
736815011
7369#. (itstool) path: section/para15012#. (itstool) path: section/para
7370#: C/index-in.docbook:645815013#: C/index-in.docbook:6458
n7371msgid "Another way of destroying the connection is your signal handler. It has tn15014#, fuzzy
>o be of the type <classname>sigc::slot&lt;bool()&gt;</classname>. As you see fro 
>m the definition your signal handler has to return a value of the type <literal> 
>bool</literal>. A definition of a sample method might look like this:" 
15015msgid ""
15016"Another way of destroying the connection is your signal handler. It has to "
15017"be of the type <classname>sigc::slot&lt;bool()&gt;</classname>. As you see "
15018"from the definition your signal handler has to return a value of the type "
15019"<literal>bool</literal>. A definition of a sample method might look like "
15020"this:"
7372msgstr ""15021msgstr ""
nn15022"Ett annat sätt att förstöra anslutningen är din signalhanterare. Den måste "
15023"vara av typen <classname>sigc::slot&lt;bool()&gt;</classname>. Som du kan se "
15024"från definitionen måste din signalhanterare returnera ett värde av typen "
15025"<literal>bool</literal>. En definition av en exempelmetod kan se ut så här:"
737315026
7374#. (itstool) path: section/programlisting15027#. (itstool) path: section/programlisting
7375#: C/index-in.docbook:646615028#: C/index-in.docbook:6466
n7376#, no-wrapn15029#, fuzzy, no-wrap
7377msgid ""15030msgid ""
7378"<code>bool MyCallback() { std::cout &lt;&lt; \"Hello World!\\n\" &lt;&lt; std::15031"<code>bool MyCallback() { std::cout &lt;&lt; \"Hello World!\\n\" &lt;&lt; std::
>endl; return true; }\n">endl; return true; }\n"
7379"</code>"15032"</code>"
7380msgstr ""15033msgstr ""
nn15034"\n"
15035"bool MyCallback() { std::cout &lt;&lt; \"Hej världen!\\n\" &lt;&lt; std::endl; 
 >return true; }\n"
738115036
7382#. (itstool) path: section/para15037#. (itstool) path: section/para
7383#: C/index-in.docbook:646915038#: C/index-in.docbook:6469
n7384msgid "You can stop the timeout method by returning <literal>false</literal> fron15039#, fuzzy
>m your signal handler. Therefore, if you want your method to be called repeatedl 
>y, it should return <literal>true</literal>." 
15040msgid ""
15041"You can stop the timeout method by returning <literal>false</literal> from "
15042"your signal handler. Therefore, if you want your method to be called "
15043"repeatedly, it should return <literal>true</literal>."
7385msgstr ""15044msgstr ""
nn15045"Du kan stoppa timeoutmetoden genom att returnera <literal>false</literal> "
15046"från din signalhanterare. Om du vill att din method ska anropas upprepat bör "
15047"den därför returnera <literal>true</literal>."
738615048
7387#. (itstool) path: section/para15049#. (itstool) path: section/para
7388#: C/index-in.docbook:647515050#: C/index-in.docbook:6475
7389msgid "Here's an example of this technique:"15051msgid "Here's an example of this technique:"
n7390msgstr ""n15052msgstr "Här är ett exempel på denna teknik:"
739115053
7392#. (itstool) path: section/para15054#. (itstool) path: section/para
7393#: C/index-in.docbook:647915055#: C/index-in.docbook:6479
n7394msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren15056msgid ""
>e/master/examples/book/timeout/\">Source Code</link>" 
15057"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
15058"master/examples/book/timeout/\">Source Code</link>"
7395msgstr ""15059msgstr ""
nn15060"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
15061"master/examples/book/timeout/\">Källkod</link>"
739615062
7397#. (itstool) path: section/title15063#. (itstool) path: section/title
7398#: C/index-in.docbook:648415064#: C/index-in.docbook:6484
nn15065#, fuzzy
7399msgid "Monitoring I/O"15066msgid "Monitoring I/O"
n7400msgstr ""n15067msgstr "Övervaka I/O"
740115068
7402#. (itstool) path: section/para15069#. (itstool) path: section/para
7403#: C/index-in.docbook:648615070#: C/index-in.docbook:6486
n7404msgid "A nifty feature of Glib (one of the libraries underlying <application>gtkn15071#, fuzzy
>mm</application>) is the ability to have it check for data on a file descriptor  
>for you. This is especially useful for networking applications. The following me 
>thod is used to do this:" 
15072msgid ""
15073"A nifty feature of Glib (one of the libraries underlying <application>gtkmm</"
15074"application>) is the ability to have it check for data on a file descriptor "
15075"for you. This is especially useful for networking applications. The "
15076"following method is used to do this:"
7405msgstr ""15077msgstr ""
nn15078"En häftig funktion i Glib (ett av biblioteken bakom <application>gtkmm</"
15079"application>) är förmågan att få det att kontrollera data på en "
15080"filbeskrivare för dig. Detta är speciellt användbart för nätverksprogram. "
15081"Följande metod används för att göra detta:"
740615082
7407#. (itstool) path: section/programlisting15083#. (itstool) path: section/programlisting
7408#: C/index-in.docbook:649315084#: C/index-in.docbook:6493
n7409#, no-wrapn15085#, fuzzy, no-wrap
7410msgid ""15086msgid ""
7411"<code>sigc::connection Glib::SignalIO::connect(const sigc::slot&lt;bool(Glib::I15087"<code>sigc::connection Glib::SignalIO::connect(const sigc::slot&lt;bool(Glib::I
>OCondition)&gt;&amp; slot,\n">OCondition)&gt;&amp; slot,\n"
7412"                                 Glib::PollFD::fd_t fd, Glib::IOCondition condi15088"                                 Glib::PollFD::fd_t fd, Glib::IOCondition condi
>tion,\n">tion,\n"
7413"                                 int priority = Glib::PRIORITY_DEFAULT);\n"15089"                                 int priority = Glib::PRIORITY_DEFAULT);\n"
7414"</code>"15090"</code>"
7415msgstr ""15091msgstr ""
nn15092"\n"
15093"sigc::connection Glib::SignalIO::connect(const sigc::slot&lt;bool(Glib::IOCondi
 >tion)&gt;&amp; slot,\n"
15094"                                 Glib::PollFD::fd_t fd, Glib::IOCondition condi
 >tion,\n"
15095"                                 int priority = Glib::PRIORITY_DEFAULT);\n"
741615096
7417#. (itstool) path: section/para15097#. (itstool) path: section/para
7418#: C/index-in.docbook:649815098#: C/index-in.docbook:6498
n7419msgid "The first argument is a slot you wish to have called when the specified en15099#, fuzzy
>vent (see argument 3) occurs on the file descriptor you specify using argument t 
>wo. Argument three may be one or more (using <literal>|</literal>) of:" 
15100msgid ""
15101"The first argument is a slot you wish to have called when the specified "
15102"event (see argument 3) occurs on the file descriptor you specify using "
15103"argument two. Argument three may be one or more (using <literal>|</literal>) "
15104"of:"
7420msgstr ""15105msgstr ""
nn15106"Det första argumentet är ett fack som du vill ska anropas när den angivna "
15107"händelsen (se argument 3) inträffar på filbeskrivaren du anger med argument "
15108"2. Argument 3 kan vara en eller flera (med <literal>|</literal>) av:"
742115109
7422#. (itstool) path: listitem/para15110#. (itstool) path: listitem/para
7423#: C/index-in.docbook:650715111#: C/index-in.docbook:6507
nn15112#, fuzzy
15113msgid ""
7424msgid "Glib::IOCondition::IO_IN - Call your method when there is data ready for 15114"Glib::IOCondition::IO_IN - Call your method when there is data ready for "
>reading on your file descriptor." 
15115"reading on your file descriptor."
7425msgstr ""15116msgstr ""
nn15117"Glib::IOCondition::IO_IN - Anropa din metod när det finns data redo för "
15118"läsning på din filbeskrivare."
742615119
7427#. (itstool) path: listitem/para15120#. (itstool) path: listitem/para
7428#: C/index-in.docbook:651315121#: C/index-in.docbook:6513
nn15122#, fuzzy
15123msgid ""
7429msgid "Glib::IOCondition::IO_OUT - Call your method when the file descriptor is 15124"Glib::IOCondition::IO_OUT - Call your method when the file descriptor is "
>ready for writing." 
15125"ready for writing."
7430msgstr ""15126msgstr ""
nn15127"Glib::IOCondition::IO_OUT - Anropa din metod när filbeskrivaren är redo för "
15128"skrivning."
743115129
7432#. (itstool) path: listitem/para15130#. (itstool) path: listitem/para
7433#: C/index-in.docbook:651915131#: C/index-in.docbook:6519
nn15132#, fuzzy
15133msgid ""
7434msgid "Glib::IOCondition::IO_PRI - Call your method when the file descriptor has15134"Glib::IOCondition::IO_PRI - Call your method when the file descriptor has "
> urgent data to be read." 
15135"urgent data to be read."
7435msgstr ""15136msgstr ""
nn15137"Glib::IOCondition::IO_PRI - Anropa din metod när filbeskrivaren har "
15138"brådskande data för läsning."
743615139
7437#. (itstool) path: listitem/para15140#. (itstool) path: listitem/para
7438#: C/index-in.docbook:652415141#: C/index-in.docbook:6524
nn15142#, fuzzy
15143msgid ""
7439msgid "Glib::IOCondition::IO_ERR - Call your method when an error has occurred o15144"Glib::IOCondition::IO_ERR - Call your method when an error has occurred on "
>the file descriptor." 
15145"the file descriptor."
7440msgstr ""15146msgstr ""
nn15147"Glib::IOCondition::IO_ERR - Anropa din metod när ett fel har inträffat på "
15148"filbeskrivaren."
744115149
7442#. (itstool) path: listitem/para15150#. (itstool) path: listitem/para
7443#: C/index-in.docbook:652915151#: C/index-in.docbook:6529
n7444msgid "Glib::IOCondition::IO_HUP - Call your method when hung up (the connectionn15152#, fuzzy
> has been broken usually for pipes and sockets)." 
15153msgid ""
15154"Glib::IOCondition::IO_HUP - Call your method when hung up (the connection "
15155"has been broken usually for pipes and sockets)."
7445msgstr ""15156msgstr ""
nn15157"Glib::IOCondition::IO_HUP - Anropa din metod när anslutningen läggs på "
15158"(anslutningen har brutits, vanligen för rör och uttag)."
744615159
7447#. (itstool) path: section/para15160#. (itstool) path: section/para
7448#: C/index-in.docbook:653515161#: C/index-in.docbook:6535
n7449msgid "The return value is a <classname>sigc::connection</classname> that may ben15162#, fuzzy
> used to stop monitoring this file descriptor using its <methodname>disconnect() 
></methodname> method. The <parameter>slot</parameter> signal handler should be d 
>eclared as follows:" 
15163msgid ""
15164"The return value is a <classname>sigc::connection</classname> that may be "
15165"used to stop monitoring this file descriptor using its "
15166"<methodname>disconnect()</methodname> method. The <parameter>slot</"
15167"parameter> signal handler should be declared as follows:"
7450msgstr ""15168msgstr ""
nn15169"Returvärdet är en <classname>sigc::connection</classname> som kan användas "
15170"för att sluta övervaka denna filbeskrivare med dess "
15171"<methodname>disconnect()</methodname>-metod. <parameter>slot</parameter>-"
15172"signalhanteraren ska deklareras enligt följande:"
745115173
7452#. (itstool) path: section/programlisting15174#. (itstool) path: section/programlisting
7453#: C/index-in.docbook:654115175#: C/index-in.docbook:6541
n7454#, no-wrapn15176#, fuzzy, no-wrap
7455msgid ""15177msgid ""
7456"<code>bool input_callback(Glib::IOCondition condition);\n"15178"<code>bool input_callback(Glib::IOCondition condition);\n"
7457"</code>"15179"</code>"
7458msgstr ""15180msgstr ""
nn15181"\n"
15182"bool input_callback(Glib::IOCondition condition);\n"
745915183
7460#. (itstool) path: section/para15184#. (itstool) path: section/para
7461#: C/index-in.docbook:654415185#: C/index-in.docbook:6544
n7462msgid "where <parameter>condition</parameter> is as specified above. As usual thn15186#, fuzzy
>e slot is created with <function>sigc::mem_fun()</function> (for a member method 
> of an object), or <function>sigc::ptr_fun()</function> (for a function). A lamb 
>da expression can be used, if you don't need the automatic disconnection that <f 
>unction>sigc::mem_fun()</function> provides when the object goes out of scope." 
15187msgid ""
15188"where <parameter>condition</parameter> is as specified above. As usual the "
15189"slot is created with <function>sigc::mem_fun()</function> (for a member "
15190"method of an object), or <function>sigc::ptr_fun()</function> (for a "
15191"function). A lambda expression can be used, if you don't need the automatic "
15192"disconnection that <function>sigc::mem_fun()</function> provides when the "
15193"object goes out of scope."
7463msgstr ""15194msgstr ""
nn15195"där <parameter>condition</parameter> är som beskrivet ovan. Som vanligt "
15196"skapas facket med <function>sigc::mem_fun()</function> (för en medlemsmetod "
15197"för ett objekt), eller <function>sigc::ptr_fun()</function> (för en "
15198"funktion). Ett lambdauttryck kan användas om du inte behöver den automatiska "
15199"frånkopplingen som <function>sigc::mem_fun()</function> tillhandahåller då "
15200"objektet lämnar räckvidden."
746415201
7465#. (itstool) path: section/para15202#. (itstool) path: section/para
7466#: C/index-in.docbook:655315203#: C/index-in.docbook:6553
n7467msgid "A little example follows. To use the example just execute it from a termin15204#, fuzzy
>nal; it doesn't create a window. It will create a pipe named <literal>testfifo</ 
>literal> in the current directory. Then start another shell and execute <literal 
>>echo \"Hello\" &gt; testfifo</literal>. The example will print each line you en 
>ter until you execute <literal>echo \"Q\" &gt; testfifo</literal>." 
15205msgid ""
15206"A little example follows. To use the example just execute it from a "
15207"terminal; it doesn't create a window. It will create a pipe named "
15208"<literal>testfifo</literal> in the current directory. Then start another "
15209"shell and execute <literal>echo \"Hello\" &gt; testfifo</literal>. The "
15210"example will print each line you enter until you execute <literal>echo \"Q\" "
15211"&gt; testfifo</literal>."
7468msgstr ""15212msgstr ""
nn15213"Ett litet exempel följer. För att använda exemplet kör du det bara från en "
15214"terminal, det skapar inget fönster. Det kommer skapa ett rör med namnet "
15215"<literal>testfifo</literal> i aktuell katalog. Starta sedan ett annat skal "
15216"och exekvera <literal>echo \"Hello\" &gt; testfifo</literal>. Exemplet "
15217"kommer skriva ut varje rad som du matar in, tills du exekverar <literal>echo "
15218"\"Q\" &gt; testfifo</literal>."
746915219
7470#. (itstool) path: section/para15220#. (itstool) path: section/para
7471#: C/index-in.docbook:656215221#: C/index-in.docbook:6562
n7472msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren15222msgid ""
>e/master/examples/book/input/\">Source Code</link>" 
15223"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
15224"master/examples/book/input/\">Source Code</link>"
7473msgstr ""15225msgstr ""
nn15226"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
15227"master/examples/book/input/\">Källkod</link>"
747415228
7475#. (itstool) path: section/title15229#. (itstool) path: section/title
7476#: C/index-in.docbook:656715230#: C/index-in.docbook:6567
nn15231#, fuzzy
7477msgid "Idle Functions"15232msgid "Idle Functions"
n7478msgstr ""n15233msgstr "Inaktivitetsfunktioner"
747915234
7480#. (itstool) path: section/para15235#. (itstool) path: section/para
7481#: C/index-in.docbook:656915236#: C/index-in.docbook:6569
nn15237msgid ""
7482msgid "If you want to specify a method that gets called when nothing else is hap15238"If you want to specify a method that gets called when nothing else is "
>pening, use the following:" 
15239"happening, use the following:"
7483msgstr ""15240msgstr ""
nn15241"Om du vill ange en metod som anropas när inget annat händer använder du "
15242"följande:"
748415243
7485#. (itstool) path: section/programlisting15244#. (itstool) path: section/programlisting
7486#: C/index-in.docbook:657315245#: C/index-in.docbook:6573
n7487#, no-wrapn15246#, fuzzy, no-wrap
7488msgid ""15247msgid ""
7489"<code>sigc::connection  Glib::SignalIdle::connect(const sigc::slot&lt;bool()&gt15248"<code>sigc::connection  Glib::SignalIdle::connect(const sigc::slot&lt;bool()&gt
>;&amp; slot,\n">;&amp; slot,\n"
7490"                                    int priority = Glib::PRIORITY_DEFAULT_IDLE)15249"                                    int priority = Glib::PRIORITY_DEFAULT_IDLE)
>;\n">;\n"
7491"</code>"15250"</code>"
7492msgstr ""15251msgstr ""
nn15252"\n"
15253"sigc::connection  Glib::SignalIdle::connect(const sigc::slot&lt;bool()&gt;&amp;
 > slot,\n"
15254"                                    int priority = Glib::PRIORITY_DEFAULT_IDLE)
 >;\n"
749315255
7494#. (itstool) path: section/para15256#. (itstool) path: section/para
7495#: C/index-in.docbook:657715257#: C/index-in.docbook:6577
n7496msgid "This causes <application>gtkmm</application> to call the specified methodn15258#, fuzzy
> whenever nothing else is happening. You can add a priority (lower numbers are h 
>igher priorities). There are two ways to remove the signal handler: calling <met 
>hodname>disconnect()</methodname> on the <classname>sigc::connection</classname> 
> object, or returning <literal>false</literal> in the signal handler, which shou 
>ld be declared as follows:" 
15259msgid ""
15260"This causes <application>gtkmm</application> to call the specified method "
15261"whenever nothing else is happening. You can add a priority (lower numbers "
15262"are higher priorities). There are two ways to remove the signal handler: "
15263"calling <methodname>disconnect()</methodname> on the <classname>sigc::"
15264"connection</classname> object, or returning <literal>false</literal> in the "
15265"signal handler, which should be declared as follows:"
7497msgstr ""15266msgstr ""
nn15267"Detta får <application>gtkmm</application> att anropa den angivna metoden "
15268"när inget annat händer. Du kan lägga till en prioritet (lägre tal har högre "
15269"prioritet). Det finns två sätt att ta bort signalhanteraren: anropa "
15270"<methodname>disconnect()</methodname> på <classname>sigc::connection</"
15271"classname>-objektet, eller returnera <literal>false</literal> i "
15272"signalhanteraren, vilket bör deklareras enligt följande:"
749815273
7499#. (itstool) path: section/programlisting15274#. (itstool) path: section/programlisting
7500#: C/index-in.docbook:658615275#: C/index-in.docbook:6586
n7501#, no-wrapn15276#, fuzzy, no-wrap
15277#| msgid ""
15278#| "\n"
15279#| "bool idleFunc();\n"
7502msgid ""15280msgid ""
7503"<code>bool idleFunc();\n"15281"<code>bool idleFunc();\n"
7504"</code>"15282"</code>"
7505msgstr ""15283msgstr ""
nn15284"\n"
15285"bool idleFunc();\n"
750615286
7507#. (itstool) path: section/para15287#. (itstool) path: section/para
7508#: C/index-in.docbook:658915288#: C/index-in.docbook:6589
n7509msgid "Since this is very similar to the methods above this explanation should bn15289msgid ""
>e sufficient to understand what's going on. However, here's a little example:" 
15290"Since this is very similar to the methods above this explanation should be "
15291"sufficient to understand what's going on. However, here's a little example:"
7510msgstr ""15292msgstr ""
nn15293"Eftersom detta är väldigt likt metoderna ovan bör denna förklaring räcka för "
15294"att förstå vad som pågår. Här kommer dock ett litet exempel:"
751115295
7512#. (itstool) path: section/para15296#. (itstool) path: section/para
7513#: C/index-in.docbook:659415297#: C/index-in.docbook:6594
n7514msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren15298msgid ""
>e/master/examples/book/idle/\">Source Code</link>" 
15299"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
15300"master/examples/book/idle/\">Source Code</link>"
7515msgstr ""15301msgstr ""
nn15302"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
15303"master/examples/book/idle/\">Källkod</link>"
751615304
7517#. (itstool) path: section/para15305#. (itstool) path: section/para
7518#: C/index-in.docbook:659615306#: C/index-in.docbook:6596
n7519msgid "This example points out the difference of idle and timeout methods a littn15307#, fuzzy
>le. If you need methods that are called periodically, and speed is not very impo 
>rtant, then you want timeout methods. If you want methods that are called as oft 
>en as possible (like calculating a fractal in background), then use idle methods 
>." 
15308msgid ""
15309"This example points out the difference of idle and timeout methods a little. "
15310"If you need methods that are called periodically, and speed is not very "
15311"important, then you want timeout methods. If you want methods that are "
15312"called as often as possible (like calculating a fractal in background), then "
15313"use idle methods."
7520msgstr ""15314msgstr ""
nn15315"Detta exempel pekar på skillnaden mellan inaktivitets- och timeout-metoder "
15316"lite grann. Om du behöver metoder som anropas med jämna intervall, och "
15317"hastighet inte är så viktigt, så vill du ha timeout-metoder. Om du vill ha "
15318"metoder som anropas så ofta som möjligt (som att beräkna en fraktal i "
15319"bakgrunden), så använd inaktivitetsmetoder."
752115320
7522#. (itstool) path: section/para15321#. (itstool) path: section/para
7523#: C/index-in.docbook:660415322#: C/index-in.docbook:6604
n7524msgid "Try executing the example and increasing the system load. The upper progrn15323#, fuzzy
>ess bar will increase steadily; the lower one will slow down." 
15324msgid ""
15325"Try executing the example and increasing the system load. The upper progress "
15326"bar will increase steadily; the lower one will slow down."
7525msgstr ""15327msgstr ""
nn15328"Försök köra exemplet och öka systemets belastning. Den övre "
15329"förloppsindikatorn kommer öka stadigt, den nedre kommer sakta ner."
752615330
7527#. (itstool) path: chapter/title15331#. (itstool) path: chapter/title
7528#: C/index-in.docbook:661415332#: C/index-in.docbook:6614
7529msgid "Memory management"15333msgid "Memory management"
n7530msgstr ""n15334msgstr "Minneshantering"
753115335
7532#. (itstool) path: section/title15336#. (itstool) path: section/title
7533#: C/index-in.docbook:662015337#: C/index-in.docbook:6620
7534msgid "Normal C++ memory management"15338msgid "Normal C++ memory management"
n7535msgstr ""n15339msgstr "Vanlig C++-minneshantering"
753615340
7537#. (itstool) path: section/para15341#. (itstool) path: section/para
7538#: C/index-in.docbook:662215342#: C/index-in.docbook:6622
n7539msgid "<application>gtkmm</application> allows the programmer to control the lifn15343#, fuzzy
>etime (that is, the construction and destruction) of any widget in the same mann 
>er as any other <phrase role=\"nowrap\">C++</phrase> object. This flexibility al 
>lows you to use <literal>new</literal> and <literal>delete</literal> to create a 
>nd destroy objects dynamically or to use regular class members (that are destroy 
>ed automatically when the class is destroyed) or to use local instances (that ar 
>e destroyed when the instance goes out of scope). This flexibility is not presen 
>t in some <phrase role=\"nowrap\">C++</phrase> GUI toolkits, which restrict the  
>programmer to only a subset of <phrase role=\"nowrap\">C++</phrase>'s memory man 
>agement features." 
15344msgid ""
15345"<application>gtkmm</application> allows the programmer to control the "
15346"lifetime (that is, the construction and destruction) of any widget in the "
15347"same manner as any other <phrase role=\"nowrap\">C++</phrase> object. This "
15348"flexibility allows you to use <literal>new</literal> and <literal>delete</"
15349"literal> to create and destroy objects dynamically or to use regular class "
15350"members (that are destroyed automatically when the class is destroyed) or to "
15351"use local instances (that are destroyed when the instance goes out of "
15352"scope). This flexibility is not present in some <phrase role=\"nowrap\">C++</"
15353"phrase> GUI toolkits, which restrict the programmer to only a subset of "
15354"<phrase role=\"nowrap\">C++</phrase>'s memory management features."
7540msgstr ""15355msgstr ""
nn15356"<application>gtkmm</application> tillåter programmeraren att styra livstiden "
15357"(det vill säga konstruktionen och förstörandet) av alla komponenter på samma "
15358"sätt som andra C++-objekt. Denna flexibilitet låter dig använda "
15359"<literal>new</literal> och <literal>delete</literal> för att skapa och "
15360"förstöra objekt dynamiskt eller använda vanliga klassmedlemmar (som förstörs "
15361"automatiskt när klassen förstörs) eller använda lokala instanser (som "
15362"förstörs när instansen lämnar räckvidden). Denna flexibilitet finns inte i "
15363"vissa C++-GUI-verktygslådor, vilket begränsar programmeraren till bara en "
15364"delmängd av C++:s minneshanteringsfunktioner."
754115365
7542#. (itstool) path: section/para15366#. (itstool) path: section/para
7543#: C/index-in.docbook:663315367#: C/index-in.docbook:6633
n7544msgid "An important difference in <application>gtkmm</application>-4.0 vs. oldern15368msgid ""
> versions is that a <phrase role=\"nowrap\">C++</phrase> widgetʼs destruction no 
> longer causes the widget to be destroyed if itʼs within a parent; in that case  
>the C GtkWidget stays alive. If you had relied on that behavior in an older vers 
>ion, in <application>gtkmm</application>-4.0 you must now remove the widget from 
> its parent first. See <link linkend=\"changes-gtkmm4\">Changes in <application> 
>gtkmm</application>-4.0</link>." 
15369"An important difference in <application>gtkmm</application>-4.0 vs. older "
15370"versions is that a <phrase role=\"nowrap\">C++</phrase> widgetʼs destruction "
15371"no longer causes the widget to be destroyed if itʼs within a parent; in that "
15372"case the C GtkWidget stays alive. If you had relied on that behavior in an "
15373"older version, in <application>gtkmm</application>-4.0 you must now remove "
15374"the widget from its parent first. See <link linkend=\"changes-"
15375"gtkmm4\">Changes in <application>gtkmm</application>-4.0</link>."
7545msgstr ""15376msgstr ""
754615377
7547#. (itstool) path: section/para15378#. (itstool) path: section/para
7548#: C/index-in.docbook:664015379#: C/index-in.docbook:6640
nn15380#, fuzzy
15381#| msgid "Here are some examples of normal C++ memory management:"
15382msgid ""
7549msgid "Here are some examples of normal <phrase role=\"nowrap\">C++</phrase> mem15383"Here are some examples of normal <phrase role=\"nowrap\">C++</phrase> memory "
>ory management:" 
7550msgstr ""15384"management:"
15385msgstr "Här är några exempel på vanlig C++-minneshantering:"
755115386
7552#. (itstool) path: section/title15387#. (itstool) path: section/title
7553#: C/index-in.docbook:664315388#: C/index-in.docbook:6643
nn15389#, fuzzy
7554msgid "Class Scope widgets"15390msgid "Class Scope widgets"
n7555msgstr ""n15391msgstr "Klassräckviddskomponenter"
755615392
7557#. (itstool) path: section/para15393#. (itstool) path: section/para
7558#: C/index-in.docbook:664415394#: C/index-in.docbook:6644
n7559msgid "If a programmer does not need dynamic memory allocation, automatic widgetn15395#, fuzzy
>s in class scope may be used. One advantage of automatic widgets in class scope  
>is that memory management is grouped in one place. The programmer does not risk  
>memory leaks from failing to <literal>delete</literal> a widget." 
15396msgid ""
15397"If a programmer does not need dynamic memory allocation, automatic widgets "
15398"in class scope may be used. One advantage of automatic widgets in class "
15399"scope is that memory management is grouped in one place. The programmer does "
15400"not risk memory leaks from failing to <literal>delete</literal> a widget."
7560msgstr ""15401msgstr ""
nn15402"Om en programmerare inte behöver dynamisk minnesallokering kan automatiska "
15403"komponenter i klassräckvidd användas. En fördel med automatiska komponenter "
15404"i klassräckvidd är att minneshantering grupperas på ett ställe. "
15405"Programmeraren behöver inte riskera minnesläckor från att missa "
15406"<literal>delete</literal> för en komponent."
756115407
7562#. (itstool) path: section/para15408#. (itstool) path: section/para
7563#: C/index-in.docbook:665015409#: C/index-in.docbook:6650
n7564msgid "The primary disadvantage of using class scope widgets is revealing the cln15410#, fuzzy
>ass implementation rather than the class interface in the class header." 
15411msgid ""
15412"The primary disadvantage of using class scope widgets is revealing the class "
15413"implementation rather than the class interface in the class header."
7565msgstr ""15414msgstr ""
nn15415"Den primära fördelen med att använda klassräckviddskomponenter är att "
15416"avslöja klassimplementationen snarare än klassgränssnittet i klasshuvudet."
756615417
7567#. (itstool) path: section/programlisting15418#. (itstool) path: section/programlisting
7568#: C/index-in.docbook:665415419#: C/index-in.docbook:6654
n7569#, no-wrapn15420#, fuzzy, no-wrap
7570msgid ""15421msgid ""
7571"<code>#include &lt;gtkmm/button.h&gt;\n"15422"<code>#include &lt;gtkmm/button.h&gt;\n"
7572"#include &lt;gtkmm/window.h&gt;\n"15423"#include &lt;gtkmm/window.h&gt;\n"
7573"class Foo : public Gtk::Window\n"15424"class Foo : public Gtk::Window\n"
7574"{\n"15425"{\n"
7576"  Gtk::Button theButton;\n"15427"  Gtk::Button theButton;\n"
7577"  // will be destroyed when the Foo object is destroyed\n"15428"  // will be destroyed when the Foo object is destroyed\n"
7578"};\n"15429"};\n"
7579"</code>"15430"</code>"
7580msgstr ""15431msgstr ""
nn15432"\n"
15433"#include &lt;gtkmm/button.h&gt;\n"
15434"#include &lt;gtkmm/window.h&gt;\n"
15435"class Foo : public Gtk::Window\n"
15436"{\n"
15437"private:\n"
15438"  Gtk::Button theButton;\n"
15439"  // kommer förstöras när objektet Foo förstörs\n"
15440"};\n"
758115441
7582#. (itstool) path: section/title15442#. (itstool) path: section/title
7583#: C/index-in.docbook:666615443#: C/index-in.docbook:6666
nn15444#, fuzzy
7584msgid "Function scope widgets"15445msgid "Function scope widgets"
n7585msgstr ""n15446msgstr "Funktionsräckviddskomponenter"
758615447
7587#. (itstool) path: section/para15448#. (itstool) path: section/para
7588#: C/index-in.docbook:666715449#: C/index-in.docbook:6667
n7589msgid "If a programmer does not need a class scope widget, a function scope widgn15450#, fuzzy
>et may also be used. The advantages to function scope over class scope are the i 
>ncreased data hiding and reduced dependencies." 
15451msgid ""
15452"If a programmer does not need a class scope widget, a function scope widget "
15453"may also be used. The advantages to function scope over class scope are the "
15454"increased data hiding and reduced dependencies."
7590msgstr ""15455msgstr ""
nn15456"Om en programmerare inte behöver en klassräckviddskomponent kan en "
15457"funktionsräckviddskomponent också användas. Fördelarna med funktionsräckvidd "
15458"över klassräckvidd är det ökade datadöljandet och minskade beroendena."
759115459
7592#. (itstool) path: section/programlisting15460#. (itstool) path: section/programlisting
7593#: C/index-in.docbook:667215461#: C/index-in.docbook:6672
n7594#, no-wrapn15462#, fuzzy, no-wrap
15463#| msgid ""
15464#| "\n"
15465#| "{\n"
15466#| "  Gtk::Button aButton;\n"
15467#| "  aButton.set_visible(true);\n"
15468#| "  ...\n"
15469#| "  app-&gt;run();\n"
15470#| "}\n"
7595msgid ""15471msgid ""
7596"<code>{\n"15472"<code>{\n"
7597"  Gtk::Button aButton;\n"15473"  Gtk::Button aButton;\n"
7598"  aButton.set_visible(true);\n"15474"  aButton.set_visible(true);\n"
7599"  ...\n"15475"  ...\n"
7600"  app-&gt;run();\n"15476"  app-&gt;run();\n"
7601"}\n"15477"}\n"
7602"</code>"15478"</code>"
7603msgstr ""15479msgstr ""
nn15480"\n"
15481"{\n"
15482"  Gtk::Button aButton;\n"
15483"  aButton.set_visible(true);\n"
15484"  ...\n"
15485"  app-&gt;run();\n"
15486"}\n"
760415487
7605#. (itstool) path: section/para15488#. (itstool) path: section/para
7606#: C/index-in.docbook:667915489#: C/index-in.docbook:6679
n7607msgid "However, this technique is rarely useful. Most widgets can't safely be crn15490#, fuzzy
>eated before the application has been registered or activated. They can't safely 
> be deleted after <methodname>Gtk::Application::run()</methodname> or <methodnam 
>e>Gtk::Application::make_window_and_run()</methodname> returns." 
15491msgid ""
15492"However, this technique is rarely useful. Most widgets can't safely be "
15493"created before the application has been registered or activated. They can't "
15494"safely be deleted after <methodname>Gtk::Application::run()</methodname> or "
15495"<methodname>Gtk::Application::make_window_and_run()</methodname> returns."
7608msgstr ""15496msgstr ""
nn15497"Denna teknik är dock sällan användbar. De flesta komponenter kan inte på ett "
15498"säkert sätt skapas innan programmet har registrerats eller aktiverats. De "
15499"kan inte på ett säkert sätt tas bort efter att <methodname>Gtk::Application::"
15500"run()</methodname> eller <methodname>Gtk::Application::"
15501"make_window_and_run()</methodname> returnerar."
760915502
7610#. (itstool) path: section/title15503#. (itstool) path: section/title
7611#: C/index-in.docbook:668915504#: C/index-in.docbook:6689
nn15505#, fuzzy
7612msgid "Dynamic allocation with new and delete"15506msgid "Dynamic allocation with new and delete"
n7613msgstr ""n15507msgstr "Dynamisk allokering med new och delete"
761415508
nn15509# TODO: favor?
7615#. (itstool) path: section/para15510#. (itstool) path: section/para
7616#: C/index-in.docbook:669015511#: C/index-in.docbook:6690
n7617msgid "Usually, the programmer will prefer to allow containers to automatically n15512#, fuzzy
>destroy their children by creating them using <function>Gtk::make_managed()</fun 
>ction> (see below). This is not strictly required, as the <literal>new</literal> 
> and <literal>delete</literal> operators may also be used, but modern <phrase ro 
>le=\"nowrap\">C++</phrase> style discourages those in favor of safer models of m 
>emory management, so it is better to create widgets using <function>Gtk::make_ma 
>naged()</function> and let their parent destroy them, than to manually perform d 
>ynamic allocation." 
15513msgid ""
15514"Usually, the programmer will prefer to allow containers to automatically "
15515"destroy their children by creating them using <function>Gtk::make_managed()</"
15516"function> (see below). This is not strictly required, as the <literal>new</"
15517"literal> and <literal>delete</literal> operators may also be used, but "
15518"modern <phrase role=\"nowrap\">C++</phrase> style discourages those in favor "
15519"of safer models of memory management, so it is better to create widgets "
15520"using <function>Gtk::make_managed()</function> and let their parent destroy "
15521"them, than to manually perform dynamic allocation."
7618msgstr ""15522msgstr ""
nn15523"Vanligen kommer programmeraren föredra att tillåta behållare att automatiskt "
15524"förstöra sina underordnade genom att skapa dem med <function>Gtk::"
15525"make_managed()</function> (se nedan). Detta är inte strikt nödvändigt då "
15526"operatorerna <literal>new</literal> och <literal>delete</literal> också kan "
15527"användas, men modern C++-stil avråder från dessa till förmån för säkrare "
15528"minneshanteringsmodeller, så det är bättre att skapa komponenter med "
15529"<function>Gtk::make_managed()</function> och låta deras överordnade förstöra "
15530"dem än att manuellt utföra dynamisk allokering. <_:programlisting-1/> Här "
15531"tar programmeraren bort <varname>pButton</varname> för att förhindra en "
15532"minnesläcka."
761915533
7620#. (itstool) path: section/programlisting15534#. (itstool) path: section/programlisting
7621#: C/index-in.docbook:669915535#: C/index-in.docbook:6699
n7622#, no-wrapn15536#, fuzzy, no-wrap
15537#| msgid ""
15538#| "\n"
15539#| "auto pButton = new Gtk::Button(\"Test\");\n"
15540#| "\n"
15541#| "// do something useful with pButton\n"
15542#| "\n"
15543#| "delete pButton;\n"
7623msgid ""15544msgid ""
7624"<code>auto pButton = new Gtk::Button(\"Test\");\n"15545"<code>auto pButton = new Gtk::Button(\"Test\");\n"
7625"// do something useful with pButton\n"15546"// do something useful with pButton\n"
7626"delete pButton;\n"15547"delete pButton;\n"
7627"</code>"15548"</code>"
7628msgstr ""15549msgstr ""
nn15550"\n"
15551"auto pButton = new Gtk::Button(\"Test\");\n"
15552"\n"
15553"// gör något användbart med pButton\n"
15554"\n"
15555"delete pButton;\n"
762915556
7630#. (itstool) path: section/para15557#. (itstool) path: section/para
7631#: C/index-in.docbook:670315558#: C/index-in.docbook:6703
nn15559msgid ""
7632msgid "Here, the programmer deletes <varname>pButton</varname> to prevent a memo15560"Here, the programmer deletes <varname>pButton</varname> to prevent a memory "
>ry leak." 
15561"leak."
7633msgstr ""15562msgstr ""
763415563
7635#. (itstool) path: section/title15564#. (itstool) path: section/title
7636#: C/index-in.docbook:671015565#: C/index-in.docbook:6710
7637msgid "Managed Widgets"15566msgid "Managed Widgets"
n7638msgstr ""n15567msgstr "Hanterade komponenter"
763915568
7640#. (itstool) path: section/para15569#. (itstool) path: section/para
7641#: C/index-in.docbook:671215570#: C/index-in.docbook:6712
n7642msgid "Alternatively, you can let a widget's container control when the widget in15571#, fuzzy
>s destroyed. In most cases, you want a widget to last only as long as the contai 
>ner it is in. To delegate the management of a widget's lifetime to its container 
>, create it with <function>Gtk::make_managed()</function> and then pack it into  
>its container with <methodname>Gtk::Box::append()</methodname> or a similar meth 
>od. Now the widget will be destroyed whenever its container is destroyed." 
15572msgid ""
15573"Alternatively, you can let a widget's container control when the widget is "
15574"destroyed. In most cases, you want a widget to last only as long as the "
15575"container it is in. To delegate the management of a widget's lifetime to its "
15576"container, create it with <function>Gtk::make_managed()</function> and then "
15577"pack it into its container with <methodname>Gtk::Box::append()</methodname> "
15578"or a similar method. Now the widget will be destroyed whenever its container "
15579"is destroyed."
7643msgstr ""15580msgstr ""
nn15581"Alternativt kan du låta en komponents behållare styra när komponenten "
15582"förstörs. I de flesta fall vill du att en komponent ska finnas lika länge "
15583"som behållaren den är i. För att delegera hanteringen av en komponents "
15584"livstid till dess behållare skapar du den med <function>Gtk::make_managed()</"
15585"function> och packar sedan in den i dess behållare med <methodname>Gtk::Box::"
15586"append()</methodname> eller en liknande metod. Nu kommer komponenten "
15587"förstöras närhelst dess behållare förstörs."
764415588
7645#. (itstool) path: section/title15589#. (itstool) path: section/title
7646#: C/index-in.docbook:672215590#: C/index-in.docbook:6722
7647msgid "Dynamic allocation with make_managed() and append()"15591msgid "Dynamic allocation with make_managed() and append()"
n7648msgstr ""n15592msgstr "Dynamisk allokering med make_managed() och append()"
764915593
7650#. (itstool) path: section/para15594#. (itstool) path: section/para
7651#: C/index-in.docbook:672415595#: C/index-in.docbook:6724
n7652msgid "<application>gtkmm</application> provides ways including the <function>man15596#, fuzzy
>ke_managed()</function> function and <methodname>Gtk::Box::append()</methodname> 
> method to simplify creation and destruction of widgets whose lifetime can be ma 
>naged by a parent." 
15597msgid ""
15598"<application>gtkmm</application> provides ways including the "
15599"<function>make_managed()</function> function and <methodname>Gtk::Box::"
15600"append()</methodname> method to simplify creation and destruction of widgets "
15601"whose lifetime can be managed by a parent."
7653msgstr ""15602msgstr ""
nn15603"<application>gtkmm</application> tillhandahåller sätt som "
15604"<function>make_managed()</function>-funktionen och <methodname>Gtk::Box::"
15605"append()</methodname>-metoden för att förenkla skapande och förstörande av "
15606"komponenter vars livstid kan hanteras av en överordnad."
765415607
7655#. (itstool) path: section/para15608#. (itstool) path: section/para
7656#: C/index-in.docbook:673015609#: C/index-in.docbook:6730
n7657msgid "Every widget except a top-level window must be added to a parent containen15610#, fuzzy
>r in order to be displayed. The <function>manage()</function> function marks a w 
>idget so that when that widget is added to a parent container, said container be 
>comes responsible for deleting the widget, meaning the user no longer needs to d 
>o so. The original way to create widgets whose lifetime is managed by their pare 
>nt in this way was to call <function>manage()</function>, passing in the result  
>of a <literal>new</literal> expression that created a dynamically allocated widg 
>et." 
15611msgid ""
15612"Every widget except a top-level window must be added to a parent container "
15613"in order to be displayed. The <function>manage()</function> function marks a "
15614"widget so that when that widget is added to a parent container, said "
15615"container becomes responsible for deleting the widget, meaning the user no "
15616"longer needs to do so. The original way to create widgets whose lifetime is "
15617"managed by their parent in this way was to call <function>manage()</"
15618"function>, passing in the result of a <literal>new</literal> expression that "
15619"created a dynamically allocated widget."
7658msgstr ""15620msgstr ""
nn15621"Varje komponent förutom en toppnivåkomponent måste läggas till i en "
15622"överordnad behållare för att visas. Funktionen <function>manage()</function> "
15623"markerar en komponent så att när den komponenten läggs till i en överordnad "
15624"behållare så blir denna behållare ansvarig för att ta bort komponenten, "
15625"vilket betyder att användaren inte behöver göra det. Det ursprungliga sättet "
15626"att skapa komponenter vars livstid hanteras av deras överordnade på detta "
15627"sätt var att anropa <function>manage()</function>, och skicka med resultatet "
15628"av ett <literal>new</literal>-uttryck som skapat en dynamiskt allokerad "
15629"komponent."
765915630
7660#. (itstool) path: section/para15631#. (itstool) path: section/para
7661#: C/index-in.docbook:674015632#: C/index-in.docbook:6740
n7662msgid "However, usually, when you create such a widget, you will already know thn15633#, fuzzy
>at its parent container should be responsible for destroying it. In addition, mo 
>dern <phrase role=\"nowrap\">C++</phrase> style discourages use of the <literal> 
>new</literal> operator, which was required when passing a newly created widget t 
>o <function>manage()</function>. Therefore, <application>gtkmm</application> has 
> added <function>make_managed()</function>, which combines creation and marking  
>with <function>manage()</function> into a single step. This avoids you having to 
> write <literal>new</literal>, which is discouraged in modern <phrase role=\"now 
>rap\">C++</phrase> style, and more clearly expresses intent to create a managed  
>widget." 
15634msgid ""
15635"However, usually, when you create such a widget, you will already know that "
15636"its parent container should be responsible for destroying it. In addition, "
15637"modern <phrase role=\"nowrap\">C++</phrase> style discourages use of the "
15638"<literal>new</literal> operator, which was required when passing a newly "
15639"created widget to <function>manage()</function>. Therefore, "
15640"<application>gtkmm</application> has added <function>make_managed()</"
15641"function>, which combines creation and marking with <function>manage()</"
15642"function> into a single step. This avoids you having to write <literal>new</"
15643"literal>, which is discouraged in modern <phrase role=\"nowrap\">C++</"
15644"phrase> style, and more clearly expresses intent to create a managed widget."
7663msgstr ""15645msgstr ""
nn15646"Oftast kommer du dock när du skapar en sådan komponent redan veta att dess "
15647"överordnade behållare ska vara ansvarig för att förstöra den. Vidare avråder "
15648"modern C++-stil från användning av <literal>new</literal>-operatorn, vilken "
15649"krävdes då en nyss skapad komponent skickades till <function>manage()</"
15650"function>. <application>gtkmm</application> har därför lagt till "
15651"<function>make_managed()</function> som kombinerar skapande och markerande "
15652"med <function>manage()</function> till ett enda steg. Detta undviker att du "
15653"behöver skriva <literal>new</literal>, vilket avrådes från i modern C++-"
15654"stil, och mer tydligt uttrycker avsikten att skapa en hanterad komponent."
766415655
7665#. (itstool) path: section/programlisting15656#. (itstool) path: section/programlisting
7666#: C/index-in.docbook:675115657#: C/index-in.docbook:6751
n7667#, no-wrapn15658#, fuzzy, no-wrap
15659#| msgid ""
15660#| "\n"
15661#| "MyContainer::MyContainer()\n"
15662#| "{\n"
15663#| "  auto pButton = Gtk::make_managed&lt;Gtk::Button&gt;(\"Test\");\n"
15664#| "  append(*pButton); //add *pButton to MyContainer\n"
15665#| "}\n"
7668msgid ""15666msgid ""
7669"<code>MyContainer::MyContainer()\n"15667"<code>MyContainer::MyContainer()\n"
7670"{\n"15668"{\n"
7671"  auto pButton = Gtk::make_managed&lt;Gtk::Button&gt;(\"Test\");\n"15669"  auto pButton = Gtk::make_managed&lt;Gtk::Button&gt;(\"Test\");\n"
7672"  append(*pButton); //add *pButton to MyContainer\n"15670"  append(*pButton); //add *pButton to MyContainer\n"
7673"}\n"15671"}\n"
7674"</code>"15672"</code>"
7675msgstr ""15673msgstr ""
nn15674"\n"
15675"MyContainer::MyContainer()\n"
15676"{\n"
15677"  auto pButton = Gtk::make_managed&lt;Gtk::Button&gt;(\"Test\");\n"
15678"  append(*pButton); //lägg till *pButton till MyContainer\n"
15679"}\n"
767615680
7677#. (itstool) path: section/para15681#. (itstool) path: section/para
7678#: C/index-in.docbook:675715682#: C/index-in.docbook:6757
n7679msgid "Now, when objects of type <classname>MyContainer</classname> are destroyen15683#, fuzzy
>d, the button will also be deleted. It is no longer necessary to delete <varname 
>>pButton</varname> to free the button's memory; its deletion has been delegated  
>to the <classname>MyContainer</classname> object." 
15684msgid ""
15685"Now, when objects of type <classname>MyContainer</classname> are destroyed, "
15686"the button will also be deleted. It is no longer necessary to delete "
15687"<varname>pButton</varname> to free the button's memory; its deletion has "
15688"been delegated to the <classname>MyContainer</classname> object."
7680msgstr ""15689msgstr ""
nn15690"När objekt av typen <classname>MyContainer</classname> nu förstörs kommer "
15691"även knappen tas bort. Det är inte längre nödvändigt att ta bort "
15692"<varname>pButton</varname> för att frigöra knappens minne. Dess borttagning "
15693"har delegerats till <classname>MyContainer</classname>-objektet."
768115694
7682#. (itstool) path: section/para15695#. (itstool) path: section/para
7683#: C/index-in.docbook:676415696#: C/index-in.docbook:6764
n7684msgid "If you never added the widget to any parent container, it's your responsin15697msgid ""
>bility to delete it. If you add it to a container widget, and later remove it (f 
>or instance with <methodname>Gtk::Box::remove()</methodname>), it's deleted by t 
>he container." 
15698"If you never added the widget to any parent container, it's your "
15699"responsibility to delete it. If you add it to a container widget, and later "
15700"remove it (for instance with <methodname>Gtk::Box::remove()</methodname>), "
15701"it's deleted by the container."
7685msgstr ""15702msgstr ""
nn15703"Om du aldrig la till komponenten till någon överordnad behållare så är det "
15704"ditt ansvar att ta bort den. Om du lägger till den till en "
15705"behållarkomponent, och sedan tar bort den (exempelvis med <methodname>Gtk::"
15706"Box::remove()</methodname>), så tas den bort av behållaren."
768615707
7687#. (itstool) path: section/para15708#. (itstool) path: section/para
7688#: C/index-in.docbook:677115709#: C/index-in.docbook:6771
n7689msgid "Of course, a top-level container will not be added to another container. n15710#, fuzzy
>The programmer is responsible for destroying the top-level container using one o 
>f the traditional <phrase role=\"nowrap\">C++</phrase> techniques. Or you can le 
>t <methodname>Gtk::Application::make_window_and_run()</methodname> create a top- 
>level window and delete it when it's hidden." 
15711msgid ""
15712"Of course, a top-level container will not be added to another container. The "
15713"programmer is responsible for destroying the top-level container using one "
15714"of the traditional <phrase role=\"nowrap\">C++</phrase> techniques. Or you "
15715"can let <methodname>Gtk::Application::make_window_and_run()</methodname> "
15716"create a top-level window and delete it when it's hidden."
7690msgstr ""15717msgstr ""
nn15718"En toppnivåbehållare kommer förstås inte läggas till i en annan behållare. "
15719"Programmeraren är ansvarig att förstöra toppnivåbehållaren med en av de "
15720"traditionella C++-teknikerna. Eller så kan du låta <methodname>Gtk::"
15721"Application::make_window_and_run()</methodname> skapa ett toppnivåfönster "
15722"och ta bort det då det döljs."
769115723
7692#. (itstool) path: section/title15724#. (itstool) path: section/title
7693#: C/index-in.docbook:678315725#: C/index-in.docbook:6783
7694msgid "Shared resources"15726msgid "Shared resources"
n7695msgstr ""n15727msgstr "Delade resurser"
769615728
7697#. (itstool) path: section/para15729#. (itstool) path: section/para
7698#: C/index-in.docbook:678515730#: C/index-in.docbook:6785
n7699msgid "Some objects, such as <classname>Gdk::Pixbuf</classname>s and <classname>n15731#, fuzzy
>Pango::Font</classname>s, are obtained from a shared store. Therefore you cannot 
> instantiate your own instances. These classes typically inherit from <classname 
>>Glib::Object</classname>. Rather than requiring you to reference and unreferenc 
>e these objects, <application>gtkmm</application> uses the <classname>Glib::RefP 
>tr&lt;&gt;</classname> smartpointer. Cairomm has its own smartpointer, <classnam 
>e>Cairo::RefPtr&lt;&gt;</classname>." 
15732msgid ""
15733"Some objects, such as <classname>Gdk::Pixbuf</classname>s and "
15734"<classname>Pango::Font</classname>s, are obtained from a shared store. "
15735"Therefore you cannot instantiate your own instances. These classes typically "
15736"inherit from <classname>Glib::Object</classname>. Rather than requiring you "
15737"to reference and unreference these objects, <application>gtkmm</application> "
15738"uses the <classname>Glib::RefPtr&lt;&gt;</classname> smartpointer. Cairomm "
15739"has its own smartpointer, <classname>Cairo::RefPtr&lt;&gt;</classname>."
7700msgstr ""15740msgstr ""
nn15741"Vissa objekt, som <classname>Gdk::Pixbuf</classname> och <classname>Pango::"
15742"Font</classname> erhålls från en delad lagring. Du kan därför inte "
15743"instansiera dina egna instanser. Dessa klasser ärver typiskt från "
15744"<classname>Glib::Object</classname>. Snarare än att kräva att du refererar "
15745"och derefererar dessa objekt använder <application>gtkmm</application> "
15746"smartpekaren <classname>Glib::RefPtr&lt;&gt;</classname>. Cairomm har sin "
15747"egen smartpekare, <classname>Cairo::RefPtr&lt;&gt;</classname>."
770115748
7702#. (itstool) path: section/para15749#. (itstool) path: section/para
7703#: C/index-in.docbook:679515750#: C/index-in.docbook:6795
n7704msgid "Objects such as <classname>Gdk::Pixbuf</classname> can only be instantiatn15751#, fuzzy
>ed with a <methodname>create()</methodname> function. For instance," 
15752msgid ""
15753"Objects such as <classname>Gdk::Pixbuf</classname> can only be instantiated "
15754"with a <methodname>create()</methodname> function. For instance,"
7705msgstr ""15755msgstr ""
nn15756"Objekt som <classname>Gdk::Pixbuf</classname> kan endast instansieras med en "
15757"<methodname>create()</methodname>-funktion. Till exempel,"
770615758
7707#. (itstool) path: section/programlisting15759#. (itstool) path: section/programlisting
7708#: C/index-in.docbook:679915760#: C/index-in.docbook:6799
n7709#, no-wrapn15761#, fuzzy, no-wrap
7710msgid ""15762msgid ""
7711"<code>auto pixbuf = Gdk::Pixbuf::create_from_file(filename);\n"15763"<code>auto pixbuf = Gdk::Pixbuf::create_from_file(filename);\n"
7712"</code>"15764"</code>"
7713msgstr ""15765msgstr ""
nn15766"\n"
15767"auto pixbuf = Gdk::Pixbuf::create_from_file(filnamn);\n"
771415768
7715#. (itstool) path: section/para15769#. (itstool) path: section/para
7716#: C/index-in.docbook:680215770#: C/index-in.docbook:6802
n7717msgid "You have no way of getting a bare <classname>Gdk::Pixbuf</classname>. In n15771#, fuzzy
>the example, <varname>pixbuf</varname> is a smart pointer, so you can do this, m 
>uch like a normal pointer:" 
15772msgid ""
15773"You have no way of getting a bare <classname>Gdk::Pixbuf</classname>. In the "
15774"example, <varname>pixbuf</varname> is a smart pointer, so you can do this, "
15775"much like a normal pointer:"
7718msgstr ""15776msgstr ""
nn15777"Du kan inte erhålla en naken <classname>Gdk::Pixbuf</classname>. I exemplet "
15778"är <varname>pixbuf</varname> en smartpekare, så du kan göra detta i stort "
15779"sett som en vanlig pekare:"
771915780
7720#. (itstool) path: section/programlisting15781#. (itstool) path: section/programlisting
7721#: C/index-in.docbook:680715782#: C/index-in.docbook:6807
n7722#, no-wrapn15783#, fuzzy, no-wrap
15784#| msgid ""
15785#| "\n"
15786#| "auto width = 0;\n"
15787#| "if(pixbuf)\n"
15788#| "{\n"
15789#| "  width = pixbuf-&gt;get_width();\n"
15790#| "}\n"
7723msgid ""15791msgid ""
7724"<code>auto width = 0;\n"15792"<code>auto width = 0;\n"
7725"if(pixbuf)\n"15793"if(pixbuf)\n"
7726"{\n"15794"{\n"
7727"  width = pixbuf-&gt;get_width();\n"15795"  width = pixbuf-&gt;get_width();\n"
7728"}\n"15796"}\n"
7729"</code>"15797"</code>"
7730msgstr ""15798msgstr ""
nn15799"\n"
15800"auto width = 0;\n"
15801"if(pixbuf)\n"
15802"{\n"
15803"  width = pixbuf-&gt;get_width();\n"
15804"}\n"
773115805
7732#. (itstool) path: section/para15806#. (itstool) path: section/para
7733#: C/index-in.docbook:681415807#: C/index-in.docbook:6814
n7734msgid "When <varname>pixbuf</varname> goes out of scope an <methodname>unref()</n15808#, fuzzy
>methodname> will happen in the background and you don't need to worry about it a 
>nymore. There's no <literal>new</literal> so there's no <literal>delete</literal 
>>." 
15809msgid ""
15810"When <varname>pixbuf</varname> goes out of scope an <methodname>unref()</"
15811"methodname> will happen in the background and you don't need to worry about "
15812"it anymore. There's no <literal>new</literal> so there's no <literal>delete</"
15813"literal>."
7735msgstr ""15814msgstr ""
nn15815"När <varname>pixbuf</varname> lämnar räckvidden kommer en "
15816"<methodname>unref()</methodname> hända i bakgrunden så behöver du inte oroa "
15817"dig om det längre. Det finns inget <literal>new</literal>, så det finns "
15818"inget <literal>delete</literal>."
773615819
7737#. (itstool) path: section/para15820#. (itstool) path: section/para
7738#: C/index-in.docbook:682015821#: C/index-in.docbook:6820
nn15822#, fuzzy
15823#| msgid ""
15824#| "You can cast <classname>RefPtr</classname>s to base types, just like "
15825#| "normal pointers."
7739msgid "If you copy a <classname>RefPtr</classname>, for instance"15826msgid "If you copy a <classname>RefPtr</classname>, for instance"
7740msgstr ""15827msgstr ""
nn15828"Du kan typkonvertera <classname>RefPtr</classname>-pekare till bastyper, "
15829"precis som vanliga pekare."
774115830
7742#. (itstool) path: section/programlisting15831#. (itstool) path: section/programlisting
7743#: C/index-in.docbook:682215832#: C/index-in.docbook:6822
n7744#, no-wrapn15833#, fuzzy, no-wrap
15834#| msgid ""
15835#| "\n"
15836#| "auto pixbuf2 = pixbuf;\n"
7745msgid ""15837msgid ""
7746"<code>auto pixbuf2 = pixbuf;\n"15838"<code>auto pixbuf2 = pixbuf;\n"
7747"</code>"15839"</code>"
7748msgstr ""15840msgstr ""
nn15841"\n"
15842"auto pixbuf2 = pixbuf;\n"
774915843
7750#. (itstool) path: section/para15844#. (itstool) path: section/para
7751#: C/index-in.docbook:682415845#: C/index-in.docbook:6824
n7752msgid "or if you pass it as a method argument or a return type, then <classname>n15846#, fuzzy
>RefPtr</classname> will do any necessary referencing to ensure that the instance 
> will not be destroyed until the last <classname>RefPtr</classname> has gone out 
> of scope." 
15847msgid ""
15848"or if you pass it as a method argument or a return type, then "
15849"<classname>RefPtr</classname> will do any necessary referencing to ensure "
15850"that the instance will not be destroyed until the last <classname>RefPtr</"
15851"classname> has gone out of scope."
7753msgstr ""15852msgstr ""
nn15853"Om du kopierar en <classname>RefPtr</classname>, till exempel <_:"
15854"programlisting-1/> , eller om du skickar det som ett metodargument eller en "
15855"returtyp så kommer <classname>RefPtr</classname> göra all nödvändig "
15856"refererering för att säkerställa att instansen inte kommer förstöras innan "
15857"den sista <classname>RefPtr</classname> har lämnat räckvidden."
775415858
7755#. (itstool) path: section/para15859#. (itstool) path: section/para
7756#: C/index-in.docbook:682915860#: C/index-in.docbook:6829
nn15861#, fuzzy
15862msgid ""
7757msgid "See the <link linkend=\"chapter-refptr\">appendix</link> for detailed inf15863"See the <link linkend=\"chapter-refptr\">appendix</link> for detailed "
>ormation about RefPtr." 
15864"information about RefPtr."
7758msgstr ""15865msgstr ""
nn15866"Se <link linkend=\"chapter-refptr\">bilagan</link> för detaljerad "
15867"information om RefPtr."
775915868
7760#. (itstool) path: listitem/para15869#. (itstool) path: listitem/para
7761#: C/index-in.docbook:683415870#: C/index-in.docbook:6834
nn15871msgid ""
7762msgid "Bjarne Stroustrup, \"The C++ Programming Language\" Fourth Edition - sect15872"Bjarne Stroustrup, \"The C++ Programming Language\" Fourth Edition - section "
>ion 34.3" 
15873"34.3"
7763msgstr ""15874msgstr ""
nn15875"Bjarne Stroustrup, ”The C++ Programming Language”, 4:e utgåvan - avsnitt 34.3"
776415876
7765#. (itstool) path: listitem/para15877#. (itstool) path: listitem/para
7766#: C/index-in.docbook:683715878#: C/index-in.docbook:6837
7767msgid "Nicolai M. Josuttis, \"The C++ Standard Library\" - section 4.2"15879msgid "Nicolai M. Josuttis, \"The C++ Standard Library\" - section 4.2"
n7768msgstr ""n15880msgstr "Nicolai M. Josuttis, ”The C++ Standard Library” - avsnitt 4.2"
776915881
7770#. (itstool) path: section/para15882#. (itstool) path: section/para
7771#: C/index-in.docbook:683015883#: C/index-in.docbook:6830
nn15884msgid ""
7772msgid "If you wish to learn more about smartpointers, you might look in these bo15885"If you wish to learn more about smartpointers, you might look in these "
>oks: <_:itemizedlist-1/>" 
15886"books: <_:itemizedlist-1/>"
7773msgstr ""15887msgstr ""
nn15888"Om du vill lära dig mer om smartpekare kan du titta i dessa böcker: <_:"
15889"itemizedlist-1/>"
777415890
7775#. (itstool) path: chapter/title15891#. (itstool) path: chapter/title
7776#: C/index-in.docbook:684815892#: C/index-in.docbook:6848
nn15893#, fuzzy
15894#| msgid "Glade and Gtk::Builder"
7777msgid "Gtk::Builder"15895msgid "Gtk::Builder"
n7778msgstr ""n15896msgstr "Glade och Gtk::Builder"
777915897
7780#. (itstool) path: chapter/para15898#. (itstool) path: chapter/para
7781#: C/index-in.docbook:685015899#: C/index-in.docbook:6850
n7782msgid "Although you can use <phrase role=\"nowrap\">C++</phrase> code to instantn15900#, fuzzy
>iate and arrange widgets, this can soon become tedious and repetitive. And it re 
>quires a recompilation to show changes. The <link xlink:href=\"https://gitlab.gn 
>ome.org/jpu/cambalache\">Cambalache</link> application allows you to layout widg 
>ets on screen and then save an XML description of the arrangement. Your applicat 
>ion can then use the <application>Gtk::Builder</application> API to load that XM 
>L file at runtime and obtain a pointer to specifically named widget instances." 
15901msgid ""
15902"Although you can use <phrase role=\"nowrap\">C++</phrase> code to "
15903"instantiate and arrange widgets, this can soon become tedious and "
15904"repetitive. And it requires a recompilation to show changes. The <link xlink:"
15905"href=\"https://gitlab.gnome.org/jpu/cambalache\">Cambalache</link> "
15906"application allows you to layout widgets on screen and then save an XML "
15907"description of the arrangement. Your application can then use the "
15908"<application>Gtk::Builder</application> API to load that XML file at runtime "
15909"and obtain a pointer to specifically named widget instances."
7783msgstr ""15910msgstr ""
nn15911"Även om du kan använda C++-koden för att instansiera och arrangera "
15912"komponenter kan detta snabbt bli tidskrävande och upprepande. Det kräver "
15913"även en omkompilering för att visa ändringar. Programmet <application>Glade</"
15914"application> låter dig skapa en layout för komponenter på skärmen och sedan "
15915"spara en XML-beskrivning av arrangemanget. Ditt program kan sedan använda "
15916"<application>Gtk::Builder</application>-API:t för att läsa in den XML-filen "
15917"vid körning och erhålla en pekare till specifikt namngivna "
15918"komponentinstanser."
778415919
7785#. (itstool) path: listitem/simpara15920#. (itstool) path: listitem/simpara
7786#: C/index-in.docbook:686315921#: C/index-in.docbook:6863
7787msgid "Less C++ code is required."15922msgid "Less C++ code is required."
n7788msgstr ""n15923msgstr "Mindre C++-kod behöver skrivas."
778915924
7790#. (itstool) path: listitem/simpara15925#. (itstool) path: listitem/simpara
7791#: C/index-in.docbook:686415926#: C/index-in.docbook:6864
7792msgid "UI changes can be seen more quickly, so UIs are able to improve."15927msgid "UI changes can be seen more quickly, so UIs are able to improve."
7793msgstr ""15928msgstr ""
nn15929"Ändringar i användargränssnitten kan ses snabbare, så de kan förbättras."
779415930
7795#. (itstool) path: listitem/simpara15931#. (itstool) path: listitem/simpara
7796#: C/index-in.docbook:686515932#: C/index-in.docbook:6865
7797msgid "Designers without programming skills can create and edit UIs."15933msgid "Designers without programming skills can create and edit UIs."
7798msgstr ""15934msgstr ""
nn15935"Designers utan programmeringskunskap kan skapa och redigera "
15936"användargränssnitt."
779915937
7800#. (itstool) path: chapter/para15938#. (itstool) path: chapter/para
7801#: C/index-in.docbook:686015939#: C/index-in.docbook:6860
7802msgid "This has the following advantages: <_:orderedlist-1/>"15940msgid "This has the following advantages: <_:orderedlist-1/>"
n7803msgstr ""n15941msgstr "Detta har följande fördelar: <_:orderedlist-1/>"
780415942
7805#. (itstool) path: chapter/para15943#. (itstool) path: chapter/para
7806#: C/index-in.docbook:686915944#: C/index-in.docbook:6869
n7807msgid "You still need <phrase role=\"nowrap\">C++</phrase> code to deal with Usen15945#, fuzzy
>r Interface changes triggered by user actions, but using <application>Gtk::Build 
>er</application> for the widget layout allows you to focus on implementing that  
>functionality." 
15946msgid ""
15947"You still need <phrase role=\"nowrap\">C++</phrase> code to deal with User "
15948"Interface changes triggered by user actions, but using <application>Gtk::"
15949"Builder</application> for the widget layout allows you to focus on "
15950"implementing that functionality."
7808msgstr ""15951msgstr ""
nn15952"Du behöver fortfarande C++-kod för att hantera ändringar i "
15953"användargränssnittet som utlöses av användaråtgärder, men att använda "
15954"<application>Gtk::Builder</application> för komponentlayouten låter dig "
15955"fokusera på att implementera den funktionaliteten."
780915956
7810#. (itstool) path: chapter/para15957#. (itstool) path: chapter/para
7811#: C/index-in.docbook:687515958#: C/index-in.docbook:6875
n7812msgid "<application>Cambalache</application> replaces the <application>Glade</apn15959msgid ""
>plication> application. <application>Glade</application> can generate XML files  
>to be used with gtk3/<application>gtkmm</application>3, but it does not support  
>gtk4/<application>gtkmm</application>4." 
15960"<application>Cambalache</application> replaces the <application>Glade</"
15961"application> application. <application>Glade</application> can generate XML "
15962"files to be used with gtk3/<application>gtkmm</application>3, but it does "
15963"not support gtk4/<application>gtkmm</application>4."
7813msgstr ""15964msgstr ""
781415965
7815#. (itstool) path: section/title15966#. (itstool) path: section/title
7816#: C/index-in.docbook:688215967#: C/index-in.docbook:6882
nn15968#, fuzzy
15969#| msgid "Loading the .glade file"
7817msgid "Loading the .ui file"15970msgid "Loading the .ui file"
n7818msgstr ""n15971msgstr "Läsa in .glade-filen"
781915972
7820#. (itstool) path: section/para15973#. (itstool) path: section/para
7821#: C/index-in.docbook:688415974#: C/index-in.docbook:6884
n7822msgid "<classname>Gtk::Builder</classname> must be used via a <classname>Glib::Rn15975#, fuzzy
>efPtr</classname>. Like all such classes, you need to use a <methodname>create() 
></methodname> method to instantiate it. For instance," 
15976#| msgid ""
15977#| "<classname>Gtk::Builder</classname> must be used via a <classname>Glib::"
15978#| "RefPtr</classname>. Like all such classes, you need to use a "
15979#| "<methodname>create()</methodname> method to instantiate it. For instance, "
15980#| "<_:programlisting-1/> This will instantiate the windows defined in the "
15981#| "<filename>.glade</filename> file."
15982msgid ""
15983"<classname>Gtk::Builder</classname> must be used via a <classname>Glib::"
15984"RefPtr</classname>. Like all such classes, you need to use a "
15985"<methodname>create()</methodname> method to instantiate it. For instance,"
7823msgstr ""15986msgstr ""
nn15987"<classname>Gtk::Builder</classname> måste användas via en <classname>Glib::"
15988"RefPtr</classname>. Som alla andra sådana klasser behöver du använda en "
15989"<methodname>create()</methodname>-metod för att instansiera den. Till "
15990"exempel, <_:programlisting-1/> Detta kommer instansiera fönstren som "
15991"definieras i <filename>.glade</filename>-filen."
782415992
7825#. (itstool) path: section/programlisting15993#. (itstool) path: section/programlisting
7826#: C/index-in.docbook:688815994#: C/index-in.docbook:6888
n7827#, no-wrapn15995#, fuzzy, no-wrap
15996#| msgid ""
15997#| "\n"
15998#| "auto builder = Gtk::Builder::create_from_file(\"basic.glade\");\n"
7828msgid ""15999msgid ""
7829"<code>auto builder = Gtk::Builder::create_from_file(\"basic.ui\");\n"16000"<code>auto builder = Gtk::Builder::create_from_file(\"basic.ui\");\n"
7830"</code>"16001"</code>"
7831msgstr ""16002msgstr ""
nn16003"\n"
16004"auto builder = Gtk::Builder::create_from_file(\"basic.glade\");\n"
783216005
7833#. (itstool) path: section/para16006#. (itstool) path: section/para
7834#: C/index-in.docbook:689016007#: C/index-in.docbook:6890
n7835msgid "This will instantiate the windows defined in the <filename class=\"extensn16008msgid ""
>ion\">.ui</filename> file." 
16009"This will instantiate the windows defined in the <filename "
16010"class=\"extension\">.ui</filename> file."
7836msgstr ""16011msgstr ""
783716012
7838#. (itstool) path: section/para16013#. (itstool) path: section/para
7839#: C/index-in.docbook:689316014#: C/index-in.docbook:6893
n7840msgid "To instantiate just one window, or just one of the child widgets, you cann16015msgid ""
> specify the name of a widget as the second parameter. For instance," 
16016"To instantiate just one window, or just one of the child widgets, you can "
16017"specify the name of a widget as the second parameter. For instance,"
7841msgstr ""16018msgstr ""
nn16019"För att bara instansiera ett fönster, eller bara en av de underordnade "
16020"komponenterna, kan du ange namnet på en komponent som den andra parametern. "
16021"Till exempel,"
784216022
7843#. (itstool) path: section/programlisting16023#. (itstool) path: section/programlisting
7844#: C/index-in.docbook:689516024#: C/index-in.docbook:6895
n7845#, no-wrapn16025#, fuzzy, no-wrap
7846msgid ""16026msgid ""
7847"<code>auto builder = Gtk::Builder::create_from_file(\"basic.ui\", \"treeview_pr16027"<code>auto builder = Gtk::Builder::create_from_file(\"basic.ui\", \"treeview_pr
>oducts\");\n">oducts\");\n"
7848"</code>"16028"</code>"
7849msgstr ""16029msgstr ""
nn16030"\n"
16031"auto builder = Gtk::Builder::create_from_file(\"basic.glade\", \"trädvyprodukte
 >r\");\n"
785016032
7851#. (itstool) path: section/title16033#. (itstool) path: section/title
7852#: C/index-in.docbook:690116034#: C/index-in.docbook:6901
7853msgid "Accessing widgets"16035msgid "Accessing widgets"
n7854msgstr ""n16036msgstr "Komma åt komponenter"
785516037
7856#. (itstool) path: section/para16038#. (itstool) path: section/para
7857#: C/index-in.docbook:690316039#: C/index-in.docbook:6903
n7858msgid "To access a widget, for instance to show a dialog, use the <methodname>gen16040#, fuzzy
>t_widget()</methodname> method, providing the widget's name. This name should be 
> specified in the <application>Cambalache</application> window. If the widget co 
>uld not be found, or is of the wrong type, then the pointer will be set to <lite 
>ral>nullptr</literal>." 
16041msgid ""
16042"To access a widget, for instance to show a dialog, use the "
16043"<methodname>get_widget()</methodname> method, providing the widget's name. "
16044"This name should be specified in the <application>Cambalache</application> "
16045"window. If the widget could not be found, or is of the wrong type, then the "
16046"pointer will be set to <literal>nullptr</literal>."
7859msgstr ""16047msgstr ""
nn16048"För att komma åt en komponent, exempelvis för att visa en dialogruta, "
16049"använder du metoden <methodname>get_widget()</methodname> och "
16050"tillhandahåller komponentens namn. Detta namn bör anges i "
16051"<application>Glade</application>s egenskapsfönster. Om komponenten inte "
16052"kunde hittas eller är av fel typ så kommer pekaren sättas till nullptr."
786016053
7861#. (itstool) path: section/para16054#. (itstool) path: section/para
7862#: C/index-in.docbook:691016055#: C/index-in.docbook:6910
n7863msgid "The dialogs in this chapter are derived from <classname>Gtk::Window</clasn16056msgid ""
>sname> because <classname>Gtk::Dialog</classname> is deprecated since <applicati 
>on>gtkmm</application> 4.10." 
16057"The dialogs in this chapter are derived from <classname>Gtk::Window</"
16058"classname> because <classname>Gtk::Dialog</classname> is deprecated since "
16059"<application>gtkmm</application> 4.10."
7864msgstr ""16060msgstr ""
nn16061"Dialogrutorna i detta kapitel härleds från <classname>Gtk::Window</"
16062"classname> eftersom <classname>Gtk::Dialog</classname> är föråldrat sedan "
16063"<application>gtkmm</application> 4.10."
786516064
7866#. (itstool) path: section/programlisting16065#. (itstool) path: section/programlisting
7867#: C/index-in.docbook:691416066#: C/index-in.docbook:6914
n7868#, no-wrapn16067#, fuzzy, no-wrap
7869msgid ""16068msgid ""
7870"<code>auto pDialog = builder-&gt;get_widget&lt;Gtk::Window&gt;(\"DialogBasic\")16069"<code>auto pDialog = builder-&gt;get_widget&lt;Gtk::Window&gt;(\"DialogBasic\")
>;\n">;\n"
7871"</code>"16070"</code>"
7872msgstr ""16071msgstr ""
nn16072"\n"
16073"auto pDialog = builder-&gt;get_widget&lt;Gtk::Dialog&gt;(\"DialogBasic\");\n"
787316074
7874#. (itstool) path: section/para16075#. (itstool) path: section/para
7875#: C/index-in.docbook:691716076#: C/index-in.docbook:6917
n7876msgid "<classname>Gtk::Builder</classname> checks for a null pointer, and checksn16077#, fuzzy
> that the widget is of the expected type, and will show warnings on the command  
>line about these." 
16078msgid ""
16079"<classname>Gtk::Builder</classname> checks for a null pointer, and checks "
16080"that the widget is of the expected type, and will show warnings on the "
16081"command line about these."
7877msgstr ""16082msgstr ""
nn16083"<classname>Gtk::Builder</classname> tittar efter en null-pekare, och "
16084"kontrollerar att komponenten är av förväntad typ, och kommer visa varningar "
16085"på kommandoraden om dessa."
787816086
7879#. (itstool) path: section/para16087#. (itstool) path: section/para
7880#: C/index-in.docbook:692316088#: C/index-in.docbook:6923
n7881msgid "Remember that you are not instantiating a widget with <methodname>get_widn16089#, fuzzy
>get()</methodname>, you are just obtaining a pointer to one that already exists. 
> You will always receive a pointer to the same instance when you call <methodnam 
>e>get_widget()</methodname> on the same <classname>Gtk::Builder</classname>, wit 
>h the same widget name. The widgets are instantiated during <methodname>Gtk::Bui 
>lder::create_from_file()</methodname>." 
16090msgid ""
16091"Remember that you are not instantiating a widget with "
16092"<methodname>get_widget()</methodname>, you are just obtaining a pointer to "
16093"one that already exists. You will always receive a pointer to the same "
16094"instance when you call <methodname>get_widget()</methodname> on the same "
16095"<classname>Gtk::Builder</classname>, with the same widget name. The widgets "
16096"are instantiated during <methodname>Gtk::Builder::create_from_file()</"
16097"methodname>."
7882msgstr ""16098msgstr ""
nn16099"Kom ihåg att du inte instansierar en komponent med <methodname>get_widget()</"
16100"methodname>, utan bara erhållare en pekare till en som redan finns. Du "
16101"kommer alltid erhålla en pekare till samma instans när du anropar "
16102"<methodname>get_widget()</methodname> på samma <classname>Gtk::Builder</"
16103"classname> med samma komponentnamn. Komponenterna instansieras under "
16104"<methodname>Gtk::Builder::create_from_file()</methodname>."
788316105
7884#. (itstool) path: section/para16106#. (itstool) path: section/para
7885#: C/index-in.docbook:693216107#: C/index-in.docbook:6932
n7886msgid "<methodname>get_widget()</methodname> returns child widgets that are <funn16108#, fuzzy
>ction>manage()</function>ed (see the <link linkend=\"chapter-memory\">Memory Man 
>agement</link> chapter), so they will be deleted when their parent container is  
>deleted. <classname>Window</classname>s (such as <classname>Dialog</classname>s) 
> cannot be managed because they have no parent container, so you must delete the 
>m at some point. The documentation of <classname>Gtk::Builder</classname> has mo 
>re to say about the memory management of different kinds of objects." 
16109msgid ""
16110"<methodname>get_widget()</methodname> returns child widgets that are "
16111"<function>manage()</function>ed (see the <link linkend=\"chapter-"
16112"memory\">Memory Management</link> chapter), so they will be deleted when "
16113"their parent container is deleted. <classname>Window</classname>s (such as "
16114"<classname>Dialog</classname>s) cannot be managed because they have no "
16115"parent container, so you must delete them at some point. The documentation "
16116"of <classname>Gtk::Builder</classname> has more to say about the memory "
16117"management of different kinds of objects."
7887msgstr ""16118msgstr ""
nn16119"<methodname>get_widget()</methodname> returnerar underordnade komponenter "
16120"som hanteras med <function>manage()</function> (se kapitlet <link "
16121"linkend=\"chapter-memory\">Minneshantering</link>), så de kommer tas bort "
16122"när den överordnade behållaren tas bort. <classname>Window</classname> (som "
16123"<classname>Dialog</classname>) kan inte hanteras för de har ingen överordnad "
16124"behållare, så du måste ta bort dem vid något tillfälle. Dokumentationen för "
16125"<classname>Gtk::Builder</classname> har mer att säga om minneshanteringen "
16126"för olika sorters objekt."
788816127
7889#. (itstool) path: section/para16128#. (itstool) path: section/para
7890#: C/index-in.docbook:694216129#: C/index-in.docbook:6942
n7891msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n16130msgid ""
>1Builder.html\">Reference</link>" 
16131"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
16132"classGtk_1_1Builder.html\">Reference</link>"
7892msgstr ""16133msgstr ""
nn16134"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
16135"classGtk_1_1Builder.html\">Referens</link>"
789316136
7894#. (itstool) path: section/para16137#. (itstool) path: section/para
7895#: C/index-in.docbook:694716138#: C/index-in.docbook:6947
n7896msgid "This simple example shows how to load a <filename class=\"extension\">.uin16139#, fuzzy
></filename> file at runtime and access the widgets with <classname>Gtk::Builder< 
>/classname>." 
16140msgid ""
16141"This simple example shows how to load a <filename class=\"extension\">.ui</"
16142"filename> file at runtime and access the widgets with <classname>Gtk::"
16143"Builder</classname>."
7897msgstr ""16144msgstr ""
nn16145"Detta enkla exempel visar hur du läser in en <application>Glade</"
16146"application>-fil vid körning och kommer åt komponenterna med "
16147"<application>Gtk::Builder</application>."
789816148
7899#. (itstool) path: section/para16149#. (itstool) path: section/para
7900#: C/index-in.docbook:695216150#: C/index-in.docbook:6952
n7901msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren16151msgid ""
>e/master/examples/book/builder/basic\">Source Code</link>" 
16152"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
16153"master/examples/book/builder/basic\">Source Code</link>"
7902msgstr ""16154msgstr ""
nn16155"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
16156"master/examples/book/builder/basic\">Källkod</link>"
790316157
7904#. (itstool) path: section/title16158#. (itstool) path: section/title
7905#: C/index-in.docbook:695916159#: C/index-in.docbook:6959
7906msgid "Using derived widgets"16160msgid "Using derived widgets"
n7907msgstr ""n16161msgstr "Använda härledda komponenter"
790816162
7909#. (itstool) path: section/para16163#. (itstool) path: section/para
7910#: C/index-in.docbook:696116164#: C/index-in.docbook:6961
n7911msgid "You can use <application>Cambalache</application> and <classname>Gtk::Buin16165#, fuzzy
>lder</classname> to layout your own custom widgets derived from <application>gtk 
>mm</application> widget classes. This keeps your code organized and encapsulated 
>, separating declarative presentation from business logic, avoiding having most  
>of your source just be setting properties and packing in containers." 
16166msgid ""
16167"You can use <application>Cambalache</application> and <classname>Gtk::"
16168"Builder</classname> to layout your own custom widgets derived from "
16169"<application>gtkmm</application> widget classes. This keeps your code "
16170"organized and encapsulated, separating declarative presentation from "
16171"business logic, avoiding having most of your source just be setting "
16172"properties and packing in containers."
7912msgstr ""16173msgstr ""
nn16174"Du kan använda<classname>Gtk::Builder</classname> och <application>Glade</"
16175"application> för att göra en layout för dina egna anpassade komponenter "
16176"härledda från <application>gtkmm</application>-komponentklasser. Detta "
16177"håller din kod organiserad och inkapslad, skiljer på deklarativ presentation "
16178"från affärslogik, och undviker att det mesta av din kod bara ställer in "
16179"egenskaper och packning i behållare."
791316180
7914#. (itstool) path: section/para16181#. (itstool) path: section/para
7915#: C/index-in.docbook:696916182#: C/index-in.docbook:6969
nn16183#, fuzzy
16184msgid ""
7916msgid "Use <methodname>Gtk::Builder::get_widget_derived()</methodname> like so:"16185"Use <methodname>Gtk::Builder::get_widget_derived()</methodname> like so:"
7917msgstr ""16186msgstr ""
nn16187"Använd <methodname>Gtk::Builder::get_widget_derived()</methodname> så här:"
791816188
7919#. (itstool) path: section/programlisting16189#. (itstool) path: section/programlisting
7920#: C/index-in.docbook:697116190#: C/index-in.docbook:6971
n7921#, no-wrapn16191#, fuzzy, no-wrap
7922msgid ""16192msgid ""
7923"<code>auto pDialog = Gtk::Builder::get_widget_derived&lt;DerivedDialog&gt;(buil16193"<code>auto pDialog = Gtk::Builder::get_widget_derived&lt;DerivedDialog&gt;(buil
>der, \"DialogDerived\");\n">der, \"DialogDerived\");\n"
7924"</code>"16194"</code>"
7925msgstr ""16195msgstr ""
nn16196"\n"
16197"auto pDialog = Gtk::Builder::get_widget_derived&lt;DerivedDialog&gt;(builder, \
 >"DialogDerived\");\n"
792616198
7927#. (itstool) path: section/para16199#. (itstool) path: section/para
7928#: C/index-in.docbook:697416200#: C/index-in.docbook:6974
n7929msgid "Your derived class must have a constructor that takes a pointer to the unn16201#, fuzzy
>derlying C type, and the <classname>Gtk::Builder</classname> instance. All relev 
>ant classes of <application>gtkmm</application> typedef their underlying C type  
>as <classname>BaseObjectType</classname> (<classname>Gtk::Window</classname> typ 
>edefs <classname>BaseObjectType</classname> as <type>GtkWindow</type>, for insta 
>nce)." 
16202msgid ""
16203"Your derived class must have a constructor that takes a pointer to the "
16204"underlying C type, and the <classname>Gtk::Builder</classname> instance. All "
16205"relevant classes of <application>gtkmm</application> typedef their "
16206"underlying C type as <classname>BaseObjectType</classname> (<classname>Gtk::"
16207"Window</classname> typedefs <classname>BaseObjectType</classname> as "
16208"<type>GtkWindow</type>, for instance)."
7930msgstr ""16209msgstr ""
nn16210"Din härledda klass måste ha en konstruktor som tar en pekare till den "
16211"underliggande C-typen och <classname>Gtk::Builder</classname>-instansen. "
16212"Alla relevanta klasser av <application>gtkmm</application> typdefinierar "
16213"deras underliggande C-typ som <classname>BaseObjectType</classname> "
16214"(<classname>Gtk::Dialog</classname> typdefinierar exempelvis "
16215"<classname>BaseObjectType</classname> som <type>GtkDialog</type>)."
793116216
7932#. (itstool) path: section/para16217#. (itstool) path: section/para
7933#: C/index-in.docbook:698116218#: C/index-in.docbook:6981
nn16219msgid ""
7934msgid "You must call the base class's constructor in the initialization list, pr16220"You must call the base class's constructor in the initialization list, "
>oviding the C pointer. For instance," 
16221"providing the C pointer. For instance,"
7935msgstr ""16222msgstr ""
nn16223"Du måste anropa basklassens konstruktor i initieringslistan och "
16224"tillhandahålla C-pekaren. Till exempel,"
793616225
7937#. (itstool) path: section/programlisting16226#. (itstool) path: section/programlisting
7938#: C/index-in.docbook:698516227#: C/index-in.docbook:6985
n7939#, no-wrapn16228#, fuzzy, no-wrap
16229#| msgid ""
16230#| "\n"
16231#| "DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;
 >Gtk::Builder&gt;&amp; builder)\n"
16232#| ": Gtk::Dialog(cobject)\n"
16233#| "{\n"
16234#| "}\n"
7940msgid ""16235msgid ""
7941"<code>DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&16236"<code>DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&
>lt;Gtk::Builder&gt;&amp; builder)\n">lt;Gtk::Builder&gt;&amp; builder)\n"
7942": Gtk::Window(cobject)\n"16237": Gtk::Window(cobject)\n"
7943"{\n"16238"{\n"
7944"}\n"16239"}\n"
7945"</code>"16240"</code>"
7946msgstr ""16241msgstr ""
nn16242"\n"
16243"DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk
 >::Builder&gt;&amp; builder)\n"
16244": Gtk::Dialog(cobject)\n"
16245"{\n"
16246"}\n"
794716247
7948#. (itstool) path: section/para16248#. (itstool) path: section/para
7949#: C/index-in.docbook:699116249#: C/index-in.docbook:6991
n7950msgid "You could then encapsulate the manipulation of the child widgets in the cn16250#, fuzzy
>onstructor of the derived class, maybe using <methodname>get_widget()</methodnam 
>e> or <methodname>get_widget_derived()</methodname> again. For instance," 
16251msgid ""
16252"You could then encapsulate the manipulation of the child widgets in the "
16253"constructor of the derived class, maybe using <methodname>get_widget()</"
16254"methodname> or <methodname>get_widget_derived()</methodname> again. For "
16255"instance,"
7951msgstr ""16256msgstr ""
nn16257"Du kan sedan kapsla in manipuleringen av de underordnade komponenterna i "
16258"konstruktorn av den härledda klassen, kanske genom att använda "
16259"<methodname>get_widget()</methodname> eller "
16260"<methodname>get_widget_derived()</methodname> igen. Till exempel,"
795216261
7953#. (itstool) path: section/programlisting16262#. (itstool) path: section/programlisting
7954#: C/index-in.docbook:699616263#: C/index-in.docbook:6996
n7955#, no-wrapn16264#, fuzzy, no-wrap
7956msgid ""16265msgid ""
7957"<code>DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&16266"<code>DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&
>lt;Gtk::Builder&gt;&amp; builder)\n">lt;Gtk::Builder&gt;&amp; builder)\n"
7958": Gtk::Window(cobject),\n"16267": Gtk::Window(cobject),\n"
7959"  m_builder(builder),\n"16268"  m_builder(builder),\n"
7960"  // Get the GtkBuilder-instantiated Button, and connect a signal handler:\n"16269"  // Get the GtkBuilder-instantiated Button, and connect a signal handler:\n"
7965"    m_pButton-&gt;signal_clicked().connect( sigc::mem_fun(*this, &amp;DerivedDi16274"    m_pButton-&gt;signal_clicked().connect( sigc::mem_fun(*this, &amp;DerivedDi
>alog::on_button_quit) );\n">alog::on_button_quit) );\n"
7966"  }\n"16275"  }\n"
7967"}\n"16276"}\n"
7968"</code>"16277"</code>"
7969msgstr ""16278msgstr ""
nn16279"\n"
16280"DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk
 >::Builder&gt;&amp; builder)\n"
16281": Gtk::Dialog(cobject),\n"
16282"  m_builder(builder),\n"
16283"  //Få Glade-instansierad Button, och anslut en signalhanterare:\n"
16284"  m_pButton(m_builder-&gt;get_widget&lt;Gtk::Button&gt;(\"quit_button\"))\n"
16285"{\n"
16286"  if(m_pButton)\n"
16287"  {\n"
16288"    m_pButton-&gt;signal_clicked().connect( sigc::mem_fun(*this, &amp;DerivedDi
 >alog::on_button_quit) );\n"
16289"  }\n"
16290"}\n"
797016291
7971#. (itstool) path: section/para16292#. (itstool) path: section/para
7972#: C/index-in.docbook:700916293#: C/index-in.docbook:7009
n7973msgid "It's possible to pass additional arguments from <methodname>get_widget_den16294#, fuzzy
>rived()</methodname> to the constructor of the derived widget. For instance, thi 
>s call to <methodname>get_widget_derived()</methodname>" 
16295#| msgid ""
16296#| "It's possible to pass additional arguments from "
16297#| "<methodname>get_widget_derived()</methodname> to the constructor of the "
16298#| "derived widget. For instance, this call to "
16299#| "<methodname>get_widget_derived()</methodname> <_:programlisting-1/> can "
16300#| "invoke this constructor"
16301msgid ""
16302"It's possible to pass additional arguments from "
16303"<methodname>get_widget_derived()</methodname> to the constructor of the "
16304"derived widget. For instance, this call to <methodname>get_widget_derived()</"
16305"methodname>"
7974msgstr ""16306msgstr ""
nn16307"Det är möjligt att skicka ytterligare argument från "
16308"<methodname>get_widget_derived()</methodname> till konstruktorn för den "
16309"härledda komponenten. Exempelvis kan detta anrop till "
16310"<methodname>get_widget_derived()</methodname> <_:programlisting-1/> starta "
16311"denna konstruktor"
797516312
7976#. (itstool) path: section/programlisting16313#. (itstool) path: section/programlisting
7977#: C/index-in.docbook:701416314#: C/index-in.docbook:7014
n7978#, no-wrapn16315#, fuzzy, no-wrap
7979msgid ""16316msgid ""
7980"<code>auto pDialog = Gtk::Builder::get_widget_derived&lt;DerivedDialog&gt;(buil16317"<code>auto pDialog = Gtk::Builder::get_widget_derived&lt;DerivedDialog&gt;(buil
>der, \"DialogDerived\", true);\n">der, \"DialogDerived\", true);\n"
7981"</code>"16318"</code>"
7982msgstr ""16319msgstr ""
nn16320"\n"
16321"auto pDialog = Gtk::Builder::get_widget_derived&lt;DerivedDialog&gt;(builder, \
 >"DialogDerived\", true);\n"
798316322
7984#. (itstool) path: section/para16323#. (itstool) path: section/para
7985#: C/index-in.docbook:701616324#: C/index-in.docbook:7016
nn16325#, fuzzy
16326#| msgid "Hand-coding constructors"
7986msgid "can invoke this constructor"16327msgid "can invoke this constructor"
n7987msgstr ""n16328msgstr "Koda konstruktorer för hand"
798816329
7989#. (itstool) path: section/programlisting16330#. (itstool) path: section/programlisting
7990#: C/index-in.docbook:701816331#: C/index-in.docbook:7018
n7991#, no-wrapn16332#, fuzzy, no-wrap
7992msgid ""16333msgid ""
7993"<code>DerivedDialog::DerivedDialog(BaseObjectType* cobject,\n"16334"<code>DerivedDialog::DerivedDialog(BaseObjectType* cobject,\n"
7994"  const Glib::RefPtr&lt;Gtk::Builder&gt;&amp; builder, bool warning)\n"16335"  const Glib::RefPtr&lt;Gtk::Builder&gt;&amp; builder, bool warning)\n"
7995": Gtk::Window(cobject),\n"16336": Gtk::Window(cobject),\n"
7996"  m_builder(builder),\n"16337"  m_builder(builder),\n"
7998"{\n"16339"{\n"
7999"  // ....\n"16340"  // ....\n"
8000"}\n"16341"}\n"
8001"</code>"16342"</code>"
8002msgstr ""16343msgstr ""
nn16344"\n"
16345"DerivedDialog::DerivedDialog(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk
 >::Builder&gt;&amp; builder, bool warning)\n"
16346": Gtk::Dialog(cobject),\n"
16347"  m_builder(builder),\n"
16348"  m_pButton(m_builder-&gt;get_widget&lt;Gtk::Button&gt;(\"quit_button\"))\n"
16349"{\n"
16350"  // ....\n"
16351"}\n"
800316352
8004#. (itstool) path: section/title16353#. (itstool) path: section/title
8005#: C/index-in.docbook:702916354#: C/index-in.docbook:7029
8006msgid "Gtk::Builder and Glib::Property"16355msgid "Gtk::Builder and Glib::Property"
n8007msgstr ""n16356msgstr "Gtk::Builder och Glib::Property"
800816357
8009#. (itstool) path: section/para16358#. (itstool) path: section/para
8010#: C/index-in.docbook:703116359#: C/index-in.docbook:7031
n8011msgid "If your derived widget uses <classname>Glib::Property</classname>, it becn16360#, fuzzy
>omes slightly more complicated. A derived widget that contains <classname>Glib:: 
>Property</classname> members must be registered with its own name in the <type>G 
>Type</type> system. It must be registered before any of the <methodname>create_f 
>rom_*()</methodname> or <methodname>add_from_*()</methodname> methods are called 
>, meaning that you may have to create an instance of your derived widget just to 
> have its class registered. Your derived widget must have a constructor that has 
> the parameters required by <methodname>get_widget_derived()</methodname> and ca 
>lls the <classname>Glib::ObjectBase</classname> constructor to register the <typ 
>e>GType</type>." 
16361msgid ""
16362"If your derived widget uses <classname>Glib::Property</classname>, it "
16363"becomes slightly more complicated. A derived widget that contains "
16364"<classname>Glib::Property</classname> members must be registered with its "
16365"own name in the <type>GType</type> system. It must be registered before any "
16366"of the <methodname>create_from_*()</methodname> or <methodname>add_from_*()</"
16367"methodname> methods are called, meaning that you may have to create an "
16368"instance of your derived widget just to have its class registered. Your "
16369"derived widget must have a constructor that has the parameters required by "
16370"<methodname>get_widget_derived()</methodname> and calls the <classname>Glib::"
16371"ObjectBase</classname> constructor to register the <type>GType</type>."
8012msgstr ""16372msgstr ""
nn16373"Om din härledda komponent använder <classname>Glib::Property</classname> "
16374"blir det lite mer komplicerat. En härledd komponent som innehåller "
16375"<classname>Glib::Property</classname>-medlemmar måste registreras med sitt "
16376"eget namn i <type>GType</type>-systemet. Den måste registreras innan någon "
16377"av <methodname>create_from_*()</methodname>- eller <methodname>add_from_*()</"
16378"methodname>-metoderna anropas, vilket betyder att du kan behöva skapa en "
16379"instans av din härledda komponent bara för att dess klass ska registreras. "
16380"Din härledda komponent måste ha en konstruktor som har parametrarna som "
16381"krävs av <methodname>get_widget_derived()</methodname> och anropar "
16382"<classname>Glib::ObjectBase</classname>-konstruktorn för att registrera "
16383"<type>GType</type>-typen."
801316384
8014#. (itstool) path: section/programlisting16385#. (itstool) path: section/programlisting
8015#: C/index-in.docbook:704216386#: C/index-in.docbook:7042
n8016#, no-wrapn16387#, fuzzy, no-wrap
8017msgid ""16388msgid ""
8018"<code>DerivedButton::DerivedButton(BaseObjectType* cobject, const Glib::RefPtr&16389"<code>DerivedButton::DerivedButton(BaseObjectType* cobject, const Glib::RefPtr&
>lt;Gtk::Builder&gt;&amp; builder)\n">lt;Gtk::Builder&gt;&amp; builder)\n"
8019": Glib::ObjectBase(\"MyButton\"), // The GType name will be gtkmm__CustomObject16390": Glib::ObjectBase(\"MyButton\"), // The GType name will be gtkmm__CustomObject
>_MyButton.\n">_MyButton.\n"
8020"  Gtk::Button(cobject),\n"16391"  Gtk::Button(cobject),\n"
8021"  prop_ustring(*this, \"button-ustring\"),\n"16392"  prop_ustring(*this, \"button-ustring\"),\n"
8023"{\n"16394"{\n"
8024"  // ....\n"16395"  // ....\n"
8025"}\n"16396"}\n"
8026"</code>"16397"</code>"
8027msgstr ""16398msgstr ""
nn16399"\n"
16400"DerivedButton::DerivedButton(BaseObjectType* cobject, const Glib::RefPtr&lt;Gtk
 >::Builder&gt;&amp; builder)\n"
16401": Glib::ObjectBase(\"MyButton\"), // GType-namnet kommer vara gtkmm__CustomObje
 >ct_MyButton.\n"
16402"  Gtk::Button(cobject),\n"
16403"  prop_ustring(*this, \"button-ustring\"),\n"
16404"  prop_int(*this, \"button-int\", 10)\n"
16405"{\n"
16406"  // ....\n"
16407"}\n"
802816408
nn16409# TODO: recognize
8029#. (itstool) path: section/para16410#. (itstool) path: section/para
8030#: C/index-in.docbook:705116411#: C/index-in.docbook:7051
n8031msgid "It is possible also to specify properties of derived widgets, declared inn16412#, fuzzy
> <phrase role=\"nowrap\">C++</phrase> using <application>gtkmm</application>, wi 
>thin <filename class=\"extension\">.ui</filename> files and load/set these using 
> <classname>Gtk::Builder</classname>. See the documentation of <classname>Gtk::B 
>uilder</classname> for more details on how to achieve this. <application>Cambala 
>che</application> won’t recognize such properties as-is, but you should be able  
>to add a few lines of hand-coded XML to the XML code generated by <application>C 
>ambalache</application>." 
16413msgid ""
16414"It is possible also to specify properties of derived widgets, declared in "
16415"<phrase role=\"nowrap\">C++</phrase> using <application>gtkmm</application>, "
16416"within <filename class=\"extension\">.ui</filename> files and load/set these "
16417"using <classname>Gtk::Builder</classname>. See the documentation of "
16418"<classname>Gtk::Builder</classname> for more details on how to achieve this. "
16419"<application>Cambalache</application> won’t recognize such properties as-is, "
16420"but you should be able to add a few lines of hand-coded XML to the XML code "
16421"generated by <application>Cambalache</application>."
8032msgstr ""16422msgstr ""
nn16423"När <application>gtkmm</application> används med en version av "
16424"<application>glibmm</application> som är 2.62 och högre är det även möjligt "
16425"att ange egenskaper för härledda komponenter, deklarerade i C++ med "
16426"<application>gtkmm</application>, i <filename>.glade</filename>-filer och "
16427"läsa in/sätta dessa med <classname>Gtk::Builder</classname>. Se "
16428"dokumentationen för <classname>Gtk::Builder</classname> för mer detaljer om "
16429"hur detta kan uppnås. Glade kommer inte känna igen sådana egenskaper som de "
16430"är, men bör kunna göra det genom användning av <link xlink:href=\"https://"
16431"developer-old.gnome.org/gladeui/stable/properties.html\"> "
16432"egenskapsklassdefinitioner</link> och en katalog som deklarerar dessa nya "
16433"egenskaper."
803316434
8034#. (itstool) path: section/para16435#. (itstool) path: section/para
8035#: C/index-in.docbook:706516436#: C/index-in.docbook:7065
n8036msgid "This example shows how to load a <filename class=\"extension\">.ui</filenn16437#, fuzzy
>ame> file at runtime and access the widgets via derived classes." 
16438#| msgid ""
16439#| "This example shows how to load a <application>Glade</application> file at "
16440#| "runtime and access the widgets via derived classes."
16441msgid ""
16442"This example shows how to load a <filename class=\"extension\">.ui</"
16443"filename> file at runtime and access the widgets via derived classes."
8037msgstr ""16444msgstr ""
nn16445"Detta exempel visar hur du läser in en <application>Glade</application>-fil "
16446"vid körning och kommer åt komponenterna genom härledda klasser."
803816447
8039#. (itstool) path: section/para16448#. (itstool) path: section/para
8040#: C/index-in.docbook:707016449#: C/index-in.docbook:7070
n8041msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren16450msgid ""
>e/master/examples/book/builder/derived\">Source Code</link>" 
16451"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
16452"master/examples/book/builder/derived\">Source Code</link>"
8042msgstr ""16453msgstr ""
nn16454"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
16455"master/examples/book/builder/derived\">Källkod</link>"
804316456
8044#. (itstool) path: chapter/title16457#. (itstool) path: chapter/title
8045#: C/index-in.docbook:707916458#: C/index-in.docbook:7079
8046msgid "Internationalization and Localization"16459msgid "Internationalization and Localization"
n8047msgstr ""n16460msgstr "Internationalisering och lokalisering"
804816461
8049#. (itstool) path: chapter/para16462#. (itstool) path: chapter/para
8050#: C/index-in.docbook:708116463#: C/index-in.docbook:7081
n8051msgid "<application>gtkmm</application> applications can easily support multiplen16464msgid ""
> languages, including non-European languages such as Chinese and right-to-left l 
>anguages such as Arabic. An appropriately-written and translated <application>gt 
>kmm</application> application will use the appropriate language at runtime based 
> on the user's environment." 
16465"<application>gtkmm</application> applications can easily support multiple "
16466"languages, including non-European languages such as Chinese and right-to-"
16467"left languages such as Arabic. An appropriately-written and translated "
16468"<application>gtkmm</application> application will use the appropriate "
16469"language at runtime based on the user's environment."
8052msgstr ""16470msgstr ""
nn16471"<application>gtkmm</application>-program kan lätt stöda flera språk, "
16472"inklusive icke-europeiska språk som kinesiska och höger-till-vänster-språk "
16473"som arabiska. Ett korrekt skrivet och översatt <application>gtkmm</"
16474"application>-program kommer använda lämpligt språk vid körning beroende på "
16475"användarens miljö."
805316476
8054#. (itstool) path: chapter/para16477#. (itstool) path: chapter/para
8055#: C/index-in.docbook:708716478#: C/index-in.docbook:7087
n8056msgid "You might not anticipate the need to support additional languages, but yon16479msgid ""
>u can never rule it out. And it's easier to develop the application properly in  
>the first place rather than retrofitting later." 
16480"You might not anticipate the need to support additional languages, but you "
16481"can never rule it out. And it's easier to develop the application properly "
16482"in the first place rather than retrofitting later."
8057msgstr ""16483msgstr ""
nn16484"Du kanske inte förutser något behov av att stödja ytterligare språk, men du "
16485"kan aldrig utesluta det. Det är även lättare att utveckla programmet korrekt "
16486"till att börja med än att skriva om det senare."
805816487
8059#. (itstool) path: chapter/para16488#. (itstool) path: chapter/para
8060#: C/index-in.docbook:709316489#: C/index-in.docbook:7093
n8061msgid "The process of writing source code that allows for translation is called n16490#, fuzzy
><literal>internationalization</literal>, often abbreviated to <literal>i18n</lit 
>eral>. The <literal>Localization</literal> process, sometimes abbreviated as <li 
>teral>l10n</literal>, provides translated text for other languages, based on tha 
>t source code." 
16491msgid ""
16492"The process of writing source code that allows for translation is called "
16493"<literal>internationalization</literal>, often abbreviated to <literal>i18n</"
16494"literal>. The <literal>Localization</literal> process, sometimes abbreviated "
16495"as <literal>l10n</literal>, provides translated text for other languages, "
16496"based on that source code."
8062msgstr ""16497msgstr ""
nn16498"Processen med att skriva källkod som tillåter översättning kallas "
16499"<literal>internationalisering</literal>, ofta förkortat till <literal>i18n</"
16500"literal>. Processen med <literal>lokalisering</literal>, ibland förkortad "
16501"som <literal>l10n</literal>, tillhandahåller översatt text för andra språk, "
16502"baserat på den källkoden."
806316503
8064#. (itstool) path: chapter/para16504#. (itstool) path: chapter/para
8065#: C/index-in.docbook:710116505#: C/index-in.docbook:7101
n8066msgid "The main activity in the internationalization process is finding strings n16506#, fuzzy
>seen by users and marking them for translation. You do not need to do it all at  
>once - if you set up the necessary project infrastructure correctly then your ap 
>plication will work normally regardless of how many strings you've covered." 
16507msgid ""
16508"The main activity in the internationalization process is finding strings "
16509"seen by users and marking them for translation. You do not need to do it all "
16510"at once - if you set up the necessary project infrastructure correctly then "
16511"your application will work normally regardless of how many strings you've "
16512"covered."
8067msgstr ""16513msgstr ""
nn16514"Huvudaktiviteten i internationaliseringsprocessen är att hitta strängar som "
16515"användare ser och markera dem för översättning. Du behöver inte göra allt på "
16516"en gång - om du konfigurerar den nödvändiga projektinfrastrukturen rätt "
16517"kommer ditt program fungera som vanligt oavsett hur många strängar du täckt."
806816518
8069#. (itstool) path: chapter/para16519#. (itstool) path: chapter/para
8070#: C/index-in.docbook:710916520#: C/index-in.docbook:7109
n8071msgid "String literals should be typed in the source code in English, but surroun16521#, fuzzy
>nded by a macro. The <application>gettext</application> (or intltool) utility ca 
>n then extract the marked strings for translation, and substitute the translated 
> text at runtime." 
16522msgid ""
16523"String literals should be typed in the source code in English, but "
16524"surrounded by a macro. The <application>gettext</application> (or intltool) "
16525"utility can then extract the marked strings for translation, and substitute "
16526"the translated text at runtime."
8072msgstr ""16527msgstr ""
nn16528"Stränglitteraler bör skrivas in i källkoden på engelska, men omges av ett "
16529"makro. Verktyget <application>gettext</application> (eller intltool) kan "
16530"sedan extrahera de markerade strängarna för översättning, och ersätta den "
16531"översatta texten vid körning."
807316532
8074#. (itstool) path: section/title16533#. (itstool) path: section/title
8075#: C/index-in.docbook:711716534#: C/index-in.docbook:7117
8076msgid "Preparing your project"16535msgid "Preparing your project"
n8077msgstr ""n16536msgstr "Förbereda ditt projekt"
807816537
8079#. (itstool) path: note/para16538#. (itstool) path: note/para
8080#: C/index-in.docbook:712016539#: C/index-in.docbook:7120
n8081msgid "In the instructions below we will assume that you will not be using <appln16540#, fuzzy
>ication>gettext</application> directly, but <application>intltool</application>, 
> which was written specifically for <literal>GNOME</literal>. <application>intlt 
>ool</application> uses <function>gettext()</function>, which extracts strings fr 
>om source code, but <application>intltool</application> can also combine strings 
> from other files, for example from desktop menu details, and GUI resource files 
> such as <filename class=\"extension\">.ui</filename> files, into standard <appl 
>ication>gettext</application> <filename>.pot/.po</filename> files." 
16541msgid ""
16542"In the instructions below we will assume that you will not be using "
16543"<application>gettext</application> directly, but <application>intltool</"
16544"application>, which was written specifically for <literal>GNOME</literal>. "
16545"<application>intltool</application> uses <function>gettext()</function>, "
16546"which extracts strings from source code, but <application>intltool</"
16547"application> can also combine strings from other files, for example from "
16548"desktop menu details, and GUI resource files such as <filename "
16549"class=\"extension\">.ui</filename> files, into standard "
16550"<application>gettext</application> <filename>.pot/.po</filename> files."
8082msgstr ""16551msgstr ""
nn16552"I instruktionerna nedan kommer vi anta att du inte kommer använda "
16553"<application>gettext</application> direkt, utan <application>intltool</"
16554"application> som skrevs specifikt för <literal>GNOME</literal>. "
16555"<application>intltool</application> använder <function>gettext()</function> "
16556"vilket extraherar strängar från källkod, men <application>intltool</"
16557"application> kan också kombinera strängar från andra filer, exempelvis från "
16558"skrivbordsmenydetaljer, och GUI-resursfiler som <application>Glade</"
16559"application>-files, till <application>gettext</application>s <filename>.pot/."
16560"po</filename>-standardfiler."
808316561
8084#. (itstool) path: note/para16562#. (itstool) path: note/para
8085#: C/index-in.docbook:713116563#: C/index-in.docbook:7131
n8086msgid "We also assume that you are using autotools (<application>automake</applin16564#, fuzzy
>cation> and <application>autoconf</application>) to build your project (although 
> autotools is not recommended for new applications), and that you are using <lin 
>k xlink:href=\"https://gitlab.gnome.org/Archive/gnome-common/-/blob/master/autog 
>en.sh\"> <literal>./autogen.sh</literal> from <application>gnome-common</applica 
>tion></link> or a similar <literal>autogen.sh</literal> file, which, among other 
> things, takes care of some <application>intltool</application> initialization." 
16565msgid ""
16566"We also assume that you are using autotools (<application>automake</"
16567"application> and <application>autoconf</application>) to build your project "
16568"(although autotools is not recommended for new applications), and that you "
16569"are using <link xlink:href=\"https://gitlab.gnome.org/Archive/gnome-common/-/"
16570"blob/master/autogen.sh\"> <literal>./autogen.sh</literal> from "
16571"<application>gnome-common</application></link> or a similar <literal>autogen."
16572"sh</literal> file, which, among other things, takes care of some "
16573"<application>intltool</application> initialization."
8087msgstr ""16574msgstr ""
nn16575"Vi antar också att du använder autotools (<application>automake</"
16576"application> och <application>autoconf</application>) för att bygga ditt "
16577"projekt (även om autotools inte rekommenderas för nya program), och att du "
16578"använder <link xlink:href=\"https://gitlab.gnome.org/GNOME/gnome-common/blob/"
16579"master/autogen.sh\"> <literal>./autogen.sh</literal> från <application>gnome-"
16580"common</application></link> eller en liknande <literal>autogen.sh</literal>-"
16581"fil som bland annat tar hand om viss <application>intltool</application>-"
16582"initiering."
808816583
nn16584# TODO: Suggest "Localization" upstream?
8089#. (itstool) path: note/para16585#. (itstool) path: note/para
8090#: C/index-in.docbook:714316586#: C/index-in.docbook:7143
n8091msgid "If you are using <application>meson</application> (recommended), see the n16587msgid ""
><link xlink:href=\"https://mesonbuild.com/Localisation.html\">Localisation</link 
>> chapter in Meson's manual. You can then skip this section." 
16588"If you are using <application>meson</application> (recommended), see the "
16589"<link xlink:href=\"https://mesonbuild.com/Localisation.html\">Localisation</"
16590"link> chapter in Meson's manual. You can then skip this section."
8092msgstr ""16591msgstr ""
nn16592"Om du använder <application>meson</application> (rekommenderas), se kapitlet "
16593"<link xlink:href=\"https://mesonbuild.com/Localisation.html\">Lokalisering</"
16594"link> i handboken för Meson. Du kan sedan hoppa över detta avsnitt."
809316595
8094#. (itstool) path: section/para16596#. (itstool) path: section/para
8095#: C/index-in.docbook:715016597#: C/index-in.docbook:7150
nn16598msgid ""
8096msgid "An alternative to <application>gnome-common</application>'s <literal>auto16599"An alternative to <application>gnome-common</application>'s <literal>autogen."
>gen.sh</literal> may look like this:" 
16600"sh</literal> may look like this:"
8097msgstr ""16601msgstr ""
nn16602"Ett alternativ till <literal>autogen.sh</literal> från <application>gnome-"
16603"common</application> kan se ut så här:"
809816604
8099#. (itstool) path: section/programlisting16605#. (itstool) path: section/programlisting
8100#: C/index-in.docbook:715416606#: C/index-in.docbook:7154
n8101#, no-wrapn16607#, fuzzy, no-wrap
16608#| msgid ""
16609#| "#! /bin/sh -e\n"
16610#| "test -n \"$srcdir\" || srcdir=`dirname \"$0\"`\n"
16611#| "test -n \"$srcdir\" || srcdir=.\n"
16612#| "\n"
16613#| "autoreconf --force --install --verbose --warnings=all \"$srcdir\"\n"
16614#| "echo \"Running intltoolize --copy --force --automake\"\n"
16615#| "intltoolize --copy --force --automake\n"
16616#| "test -n \"$NOCONFIGURE\" || \"$srcdir/configure\" \"$@\""
8102msgid ""16617msgid ""
8103"<code>#! /bin/sh -e\n"16618"<code>#! /bin/sh -e\n"
8104"test -n \"$srcdir\" || srcdir=`dirname \"$0\"`\n"16619"test -n \"$srcdir\" || srcdir=`dirname \"$0\"`\n"
8105"test -n \"$srcdir\" || srcdir=.\n"16620"test -n \"$srcdir\" || srcdir=.\n"
8106"\n"16621"\n"
8107"autoreconf --force --install --verbose --warnings=all \"$srcdir\"\n"16622"autoreconf --force --install --verbose --warnings=all \"$srcdir\"\n"
8108"echo \"Running intltoolize --copy --force --automake\"\n"16623"echo \"Running intltoolize --copy --force --automake\"\n"
8109"intltoolize --copy --force --automake\n"16624"intltoolize --copy --force --automake\n"
8110"test -n \"$NOCONFIGURE\" || \"$srcdir/configure\" \"$@\"</code>"16625"test -n \"$NOCONFIGURE\" || \"$srcdir/configure\" \"$@\"</code>"
8111msgstr ""16626msgstr ""
nn16627"#! /bin/sh -e\n"
16628"test -n \"$srcdir\" || srcdir=`dirname \"$0\"`\n"
16629"test -n \"$srcdir\" || srcdir=.\n"
16630"\n"
16631"autoreconf --force --install --verbose --warnings=all \"$srcdir\"\n"
16632"echo \"Running intltoolize --copy --force --automake\"\n"
16633"intltoolize --copy --force --automake\n"
16634"test -n \"$NOCONFIGURE\" || \"$srcdir/configure\" \"$@\""
811216635
8113#. (itstool) path: section/para16636#. (itstool) path: section/para
8114#: C/index-in.docbook:716316637#: C/index-in.docbook:7163
n8115msgid "Create a sub-directory named <literal>po</literal> in your project's rootn16638#, fuzzy
> directory. This directory will eventually contain all of your translations. Wit 
>hin it, create a file named <literal>LINGUAS</literal> and a file named <literal 
>>POTFILES.in</literal>." 
16639msgid ""
16640"Create a sub-directory named <literal>po</literal> in your project's root "
16641"directory. This directory will eventually contain all of your translations. "
16642"Within it, create a file named <literal>LINGUAS</literal> and a file named "
16643"<literal>POTFILES.in</literal>."
8116msgstr ""16644msgstr ""
nn16645"Skapa en underkatalog med namnet <literal>po</literal> i ditt projekts "
16646"rotkatalog. Denna katalog kommer i slutändan innehålla alla dina "
16647"översättningar. Skapa i den en fil med namnet <literal>LINGUAS</literal> och "
16648"en fil med namnet <literal>POTFILES.in</literal>. Det är även även vanligt "
16649"att skapa en <literal>ChangeLog</literal>-fil i <literal>po</literal>-"
16650"katalogen så att översättningar kan hålla koll på översättningsändringar."
811716651
8118#. (itstool) path: section/para16652#. (itstool) path: section/para
8119#: C/index-in.docbook:717016653#: C/index-in.docbook:7170
n8120msgid "<literal>LINGUAS</literal> contains an alphabetically sorted list of coden16654msgid ""
>s identifying the languages for which your program is translated (comment lines  
>starting with a <literal>#</literal> are ignored). Each language code listed in  
>the <literal>LINGUAS</literal> file must have a corresponding <literal>.po</lite 
>ral> file. So, if your program has German and Japanese translations, your <liter 
>al>LINGUAS</literal> file would look like this:" 
16655"<literal>LINGUAS</literal> contains an alphabetically sorted list of codes "
16656"identifying the languages for which your program is translated (comment "
16657"lines starting with a <literal>#</literal> are ignored). Each language code "
16658"listed in the <literal>LINGUAS</literal> file must have a corresponding "
16659"<literal>.po</literal> file. So, if your program has German and Japanese "
16660"translations, your <literal>LINGUAS</literal> file would look like this:"
8121msgstr ""16661msgstr ""
nn16662"<literal>LINGUAS</literal> innehåller en alfabetiskt sorterad lista med "
16663"koder som identifierar språken som ditt program översatts till "
16664"(kommentarsrader startar med <literal>#</literal> och ignoreras). Varje "
16665"språkkod som listas i <literal>LINGUAS</literal>-filen måste ha en "
16666"motsvarande <literal>.po</literal>-fil. Så om ditt program har tyska och "
16667"japanska översättningar så skulle din <literal>LINGUAS</literal>-fil se ut "
16668"så här:"
812216669
8123#. (itstool) path: section/programlisting16670#. (itstool) path: section/programlisting
8124#: C/index-in.docbook:717916671#: C/index-in.docbook:7179
n8125#, no-wrapn16672#, fuzzy, no-wrap
16673#| msgid ""
16674#| "# keep this file sorted alphabetically, one language code per line\n"
16675#| "de\n"
16676#| "ja"
8126msgid ""16677msgid ""
8127"<code># keep this file sorted alphabetically, one language code per line\n"16678"<code># keep this file sorted alphabetically, one language code per line\n"
8128"de\n"16679"de\n"
8129"ja</code>"16680"ja</code>"
8130msgstr ""16681msgstr ""
nn16682"# keep this file sorted alphabetically, one language code per line\n"
16683"de\n"
16684"ja"
813116685
8132#. (itstool) path: section/para16686#. (itstool) path: section/para
8133#: C/index-in.docbook:718216687#: C/index-in.docbook:7182
n8134msgid "(In addition, you'd have the files <literal>de.po</literal> and <literal>n16688msgid ""
>ja.po</literal> in your <literal>po</literal> directory which contain the German 
> and Japanese translations, respectively.)" 
16689"(In addition, you'd have the files <literal>de.po</literal> and <literal>ja."
16690"po</literal> in your <literal>po</literal> directory which contain the "
16691"German and Japanese translations, respectively.)"
8135msgstr ""16692msgstr ""
nn16693"(Dessutom skulle du ha filerna <literal>de.po</literal> och <literal>ja.po</"
16694"literal> i din <literal>po</literal>-katalog som innehåller de tyska "
16695"respektive japanska översättningarna.)"
813616696
8137#. (itstool) path: section/para16697#. (itstool) path: section/para
8138#: C/index-in.docbook:718916698#: C/index-in.docbook:7189
n8139msgid "<literal>POTFILES.in</literal> is a list of paths to all files which contn16699msgid ""
>ain strings marked up for translation, starting from the project root directory. 
> So for example, if your project sources were located in a subdirectory named <l 
>iteral>src</literal>, and you had two files that contained strings that should b 
>e translated, your <literal>POTFILES.in</literal> file might look like this:" 
16700"<literal>POTFILES.in</literal> is a list of paths to all files which contain "
16701"strings marked up for translation, starting from the project root directory. "
16702"So for example, if your project sources were located in a subdirectory named "
16703"<literal>src</literal>, and you had two files that contained strings that "
16704"should be translated, your <literal>POTFILES.in</literal> file might look "
16705"like this:"
8140msgstr ""16706msgstr ""
nn16707"<literal>POTFILES.in</literal> är en lista över sökvägar till alla filer som "
16708"innehåller strängar som markerats för översättning, med start i projektets "
16709"rotkatalog. Så om ditt projekts källkod fanns i en underkatalog med namnet "
16710"<literal>src</literal>, och du hade två filer som innehöll strängar som ska "
16711"översättas, så skulle din <literal>POTFILES.in</literal>-fil kunna se ut så "
16712"här:"
814116713
8142#. (itstool) path: section/programlisting16714#. (itstool) path: section/programlisting
8143#: C/index-in.docbook:719816715#: C/index-in.docbook:7198
n8144#, no-wrapn16716#, fuzzy, no-wrap
16717#| msgid ""
16718#| "src/main.cc\n"
16719#| "src/other.cc"
8145msgid ""16720msgid ""
8146"<code>src/main.cc\n"16721"<code>src/main.cc\n"
8147"src/other.cc</code>"16722"src/other.cc</code>"
8148msgstr ""16723msgstr ""
nn16724"src/main.cc\n"
16725"src/other.cc"
814916726
8150#. (itstool) path: section/para16727#. (itstool) path: section/para
8151#: C/index-in.docbook:720116728#: C/index-in.docbook:7201
n8152msgid "If you are using <application>gettext</application> directly, you can onln16729#, fuzzy
>y mark strings for translation if they are in source code file. However, if you  
>use <application>intltool</application>, you can mark strings for translation in 
> a variety of other file formats, including <filename class=\"extension\">.ui</f 
>ilename> files, xml, <link xlink:href=\"http://standards.freedesktop.org/desktop 
>-entry-spec/latest/\">.desktop files</link> and several more. So, if you have de 
>signed some of the application UI in xml files then also add your <filename clas 
>s=\"extension\">.ui</filename> files to the list in <literal>POTFILES.in</litera 
>l>." 
16730msgid ""
16731"If you are using <application>gettext</application> directly, you can only "
16732"mark strings for translation if they are in source code file. However, if "
16733"you use <application>intltool</application>, you can mark strings for "
16734"translation in a variety of other file formats, including <filename "
16735"class=\"extension\">.ui</filename> files, xml, <link xlink:href=\"http://"
16736"standards.freedesktop.org/desktop-entry-spec/latest/\">.desktop files</link> "
16737"and several more. So, if you have designed some of the application UI in xml "
16738"files then also add your <filename class=\"extension\">.ui</filename> files "
16739"to the list in <literal>POTFILES.in</literal>."
8153msgstr ""16740msgstr ""
nn16741"Om du använder <application>gettext</application> direkt kan du endast "
16742"markera strängar för översättning om de är i källkodsfiler. Om du använder "
16743"<application>intltool</application> kan du dock markera strängar för "
16744"översättning i ett antal andra filformat, inklusive <application>Glade</"
16745"application>s UI-filer, xml, <link xlink:href=\"http://standards.freedesktop."
16746"org/desktop-entry-spec/latest/\">.desktop-filer</link> och flera till. Så om "
16747"du har designat delar av programmets användargränssnitt i "
16748"<application>Glade</application> så lägger du också till dina <filename>."
16749"glade</filename>-filer till listan i <literal>POTFILES.in</literal>."
815416750
8155#. (itstool) path: section/para16751#. (itstool) path: section/para
8156#: C/index-in.docbook:721416752#: C/index-in.docbook:7214
n8157msgid "Now that there is a place to put your translations, you need to initializn16753msgid ""
>e <application>intltool</application> and <application>gettext</application>. Ad 
>d the following code to your <literal>configure.ac</literal>, substituting 'prog 
>ramname' with the name of your program:" 
16754"Now that there is a place to put your translations, you need to initialize "
16755"<application>intltool</application> and <application>gettext</application>. "
16756"Add the following code to your <literal>configure.ac</literal>, substituting "
16757"'programname' with the name of your program:"
8158msgstr ""16758msgstr ""
nn16759"Nu då det finns en plats att lägga dina översättningar behöver du initiera "
16760"<application>intltool</application> och <application>gettext</application>. "
16761"Lägg till följande kod till din <literal>configure.ac</literal> och ersätt "
16762"”programnamn” med namnet på ditt program:"
815916763
8160#. (itstool) path: section/programlisting16764#. (itstool) path: section/programlisting
8161#: C/index-in.docbook:722116765#: C/index-in.docbook:7221
n8162#, no-wrapn16766#, fuzzy, no-wrap
8163msgid ""16767msgid ""
8164"<code>IT_PROG_INTLTOOL([0.35.0])\n"16768"<code>IT_PROG_INTLTOOL([0.35.0])\n"
8165"\n"16769"\n"
8166"GETTEXT_PACKAGE=programname\n"16770"GETTEXT_PACKAGE=programname\n"
8167"AC_SUBST(GETTEXT_PACKAGE)\n"16771"AC_SUBST(GETTEXT_PACKAGE)\n"
8171"AM_GNU_GETTEXT_VERSION([0.17])\n"16775"AM_GNU_GETTEXT_VERSION([0.17])\n"
8172"\n"16776"\n"
8173"PROGRAMNAME_LOCALEDIR=[${datadir}/locale]\n"16777"PROGRAMNAME_LOCALEDIR=[${datadir}/locale]\n"
8174"AC_SUBST(PROGRAMNAME_LOCALEDIR)</code>"16778"AC_SUBST(PROGRAMNAME_LOCALEDIR)</code>"
8175msgstr ""16779msgstr ""
nn16780"IT_PROG_INTLTOOL([0.35.0])\n"
16781"\n"
16782"GETTEXT_PACKAGE=programnamn\n"
16783"AC_SUBST(GETTEXT_PACKAGE)\n"
16784"AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], [\"$GETTEXT_PACKAGE\"],\n"
16785"                   [Domänen att använda med gettext])\n"
16786"AM_GNU_GETTEXT([external])\n"
16787"AM_GNU_GETTEXT_VERSION([0.17])\n"
16788"\n"
16789"PROGRAMNAME_LOCALEDIR=[${datadir}/locale]\n"
16790"AC_SUBST(PROGRAMNAME_LOCALEDIR)"
817616791
8177#. (itstool) path: section/para16792#. (itstool) path: section/para
8178#: C/index-in.docbook:723316793#: C/index-in.docbook:7233
n8179msgid "This <varname>PROGRAMNAME_LOCALEDIR</varname> variable will be used latern16794#, fuzzy
> in the <literal>Makefile.am</literal> file, to define a macro that will be used 
> when you initialize <application>gettext</application> in your source code." 
16795msgid ""
16796"This <varname>PROGRAMNAME_LOCALEDIR</varname> variable will be used later in "
16797"the <literal>Makefile.am</literal> file, to define a macro that will be used "
16798"when you initialize <application>gettext</application> in your source code."
8180msgstr ""16799msgstr ""
nn16800"Denna variabel <varname>PROGRAMNAME_LOCALEDIR</varname> kommer användas "
16801"senare i <literal>Makefile.am</literal>-filen för att definiera ett makro "
16802"som kommer användas när du initierar <application>gettext</application> i "
16803"din källkod."
818116804
8182#. (itstool) path: section/para16805#. (itstool) path: section/para
8183#: C/index-in.docbook:724016806#: C/index-in.docbook:7240
n8184msgid "<literal>AM_GLIB_GNU_GETTEXT</literal> has been an alternative to <literan16807msgid ""
>l>AM_GNU_GETTEXT</literal> and <literal>AM_GNU_GETTEXT_VERSION</literal>, but <l 
>iteral>AM_GLIB_GNU_GETTEXT</literal> is now deprecated, and shall not be used in 
> new code." 
16808"<literal>AM_GLIB_GNU_GETTEXT</literal> has been an alternative to "
16809"<literal>AM_GNU_GETTEXT</literal> and <literal>AM_GNU_GETTEXT_VERSION</"
16810"literal>, but <literal>AM_GLIB_GNU_GETTEXT</literal> is now deprecated, and "
16811"shall not be used in new code."
8185msgstr ""16812msgstr ""
nn16813"<literal>AM_GLIB_GNU_GETTEXT</literal> har varit ett alternativ till "
16814"<literal>AM_GNU_GETTEXT</literal> och <literal>AM_GNU_GETTEXT_VERSION</"
16815"literal>, men <literal>AM_GLIB_GNU_GETTEXT</literal> är nu föråldrat, och "
16816"ska inte användas i ny kod."
818616817
8187#. (itstool) path: listitem/para16818#. (itstool) path: listitem/para
8188#: C/index-in.docbook:725116819#: C/index-in.docbook:7251
n8189msgid "Add <literal>po</literal> to the <literal>SUBDIRS</literal> variable. Witn16820msgid ""
>hout this, your translations won't get built and installed when you build the pr 
>ogram" 
16821"Add <literal>po</literal> to the <literal>SUBDIRS</literal> variable. "
16822"Without this, your translations won't get built and installed when you build "
16823"the program"
8190msgstr ""16824msgstr ""
nn16825"Lägg till <literal>po</literal> till variabeln <literal>SUBDIRS</literal>. "
16826"Utan detta kommer dina översättningar inte byggas och installeras när du "
16827"bygger programmet"
819116828
8192#. (itstool) path: listitem/para16829#. (itstool) path: listitem/para
8193#: C/index-in.docbook:725616830#: C/index-in.docbook:7256
nn16831#, fuzzy
16832#| msgid "Define <literal>INTLTOOL_FILES</literal> as: <_:programlisting-1/>"
8194msgid "Define <literal>INTLTOOL_FILES</literal> as:"16833msgid "Define <literal>INTLTOOL_FILES</literal> as:"
n8195msgstr ""n16834msgstr "Definiera <literal>INTLTOOL_FILES</literal> som: <_:programlisting-1/>"
819616835
8197#. (itstool) path: listitem/programlisting16836#. (itstool) path: listitem/programlisting
8198#: C/index-in.docbook:725816837#: C/index-in.docbook:7258
n8199#, no-wrapn16838#, fuzzy, no-wrap
16839#| msgid ""
16840#| "INTLTOOL_FILES = intltool-extract.in \\\n"
16841#| "                 intltool-merge.in \\\n"
16842#| "                 intltool-update.in"
8200msgid ""16843msgid ""
8201"<code>INTLTOOL_FILES = intltool-extract.in \\\n"16844"<code>INTLTOOL_FILES = intltool-extract.in \\\n"
8202"                 intltool-merge.in \\\n"16845"                 intltool-merge.in \\\n"
8203"                 intltool-update.in</code>"16846"                 intltool-update.in</code>"
8204msgstr ""16847msgstr ""
nn16848"INTLTOOL_FILES = intltool-extract.in \\\n"
16849"                 intltool-merge.in \\\n"
16850"                 intltool-update.in"
820516851
8206#. (itstool) path: listitem/para16852#. (itstool) path: listitem/para
8207#: C/index-in.docbook:726316853#: C/index-in.docbook:7263
n8208msgid "Add <literal>INTLTOOL_FILES</literal> to the <literal>EXTRA_DIST</literaln16854#, fuzzy
>> list of files. This ensures that when you do a <command>make dist</command>, t 
>hese files will be included in the source tarball." 
16855msgid ""
16856"Add <literal>INTLTOOL_FILES</literal> to the <literal>EXTRA_DIST</literal> "
16857"list of files. This ensures that when you do a <command>make dist</command>, "
16858"these files will be included in the source tarball."
8209msgstr ""16859msgstr ""
nn16860"Lägg till <literal>INTLTOOL_FILES</literal> till fillistan "
16861"<literal>EXTRA_DIST</literal>. Detta säkerställer att när du kör "
16862"<command>make dist</command> så kommer dessa filer inkluderas i käll-"
16863"tarbollen."
821016864
8211#. (itstool) path: listitem/para16865#. (itstool) path: listitem/para
8212#: C/index-in.docbook:727116866#: C/index-in.docbook:7271
nn16867#, fuzzy
16868#| msgid "Update your <literal>DISTCLEANFILES</literal>: <_:programlisting-1/>"
8213msgid "Update your <literal>DISTCLEANFILES</literal>:"16869msgid "Update your <literal>DISTCLEANFILES</literal>:"
n8214msgstr ""n16870msgstr "Uppdatera din <literal>DISTCLEANFILES</literal>: <_:programlisting-1/>"
821516871
8216#. (itstool) path: listitem/programlisting16872#. (itstool) path: listitem/programlisting
8217#: C/index-in.docbook:727316873#: C/index-in.docbook:7273
n8218#, no-wrapn16874#, fuzzy, no-wrap
16875#| msgid ""
16876#| "DISTCLEANFILES = ... intltool-extract \\\n"
16877#| "                 intltool-merge \\\n"
16878#| "                 intltool-update \\\n"
16879#| "                 po/.intltool-merge-cache"
8219msgid ""16880msgid ""
8220"<code>DISTCLEANFILES = ... intltool-extract \\\n"16881"<code>DISTCLEANFILES = ... intltool-extract \\\n"
8221"                 intltool-merge \\\n"16882"                 intltool-merge \\\n"
8222"                 intltool-update \\\n"16883"                 intltool-update \\\n"
8223"                 po/.intltool-merge-cache</code>"16884"                 po/.intltool-merge-cache</code>"
8224msgstr ""16885msgstr ""
nn16886"DISTCLEANFILES = ... intltool-extract \\\n"
16887"                 intltool-merge \\\n"
16888"                 intltool-update \\\n"
16889"                 po/.intltool-merge-cache"
822516890
8226#. (itstool) path: listitem/para16891#. (itstool) path: listitem/para
8227#: C/index-in.docbook:727916892#: C/index-in.docbook:7279
nn16893#, fuzzy
16894#| msgid ""
16895#| "Depending on the types of files that contain translatable strings, add "
16896#| "code such as <_:programlisting-1/>"
16897msgid ""
8228msgid "Depending on the types of files that contain translatable strings, add co16898"Depending on the types of files that contain translatable strings, add code "
>de such as" 
16899"such as"
8229msgstr ""16900msgstr ""
nn16901"Beroende på typerna av filer som innehåller översättbara strängar lägger du "
16902"till kod som <_:programlisting-1/>"
823016903
8231#. (itstool) path: listitem/programlisting16904#. (itstool) path: listitem/programlisting
8232#: C/index-in.docbook:728216905#: C/index-in.docbook:7282
n8233#, no-wrapn16906#, fuzzy, no-wrap
8234msgid ""16907msgid ""
8235"<code>desktopdir = $(datadir)/applications\n"16908"<code>desktopdir = $(datadir)/applications\n"
8236"desktop_in_files = programname.desktop.in\n"16909"desktop_in_files = programname.desktop.in\n"
8237"desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)\n"16910"desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)\n"
8238"@INTLTOOL_DESKTOP_RULE@</code>"16911"@INTLTOOL_DESKTOP_RULE@</code>"
8239msgstr ""16912msgstr ""
nn16913"desktopdir = $(datadir)/applications\n"
16914"desktop_in_files = programnamn.desktop.in\n"
16915"desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)\n"
16916"@INTLTOOL_DESKTOP_RULE@"
824016917
8241#. (itstool) path: section/para16918#. (itstool) path: section/para
8242#: C/index-in.docbook:724716919#: C/index-in.docbook:7247
8243msgid "In the top-level Makefile.am: <_:itemizedlist-1/>"16920msgid "In the top-level Makefile.am: <_:itemizedlist-1/>"
n8244msgstr ""n16921msgstr "I Makefile.am på toppnivån: <_:itemizedlist-1/>"
824516922
8246#. (itstool) path: section/para16923#. (itstool) path: section/para
8247#: C/index-in.docbook:729016924#: C/index-in.docbook:7290
n8248msgid "In your <literal>src/Makefile.am</literal>, update your <literal>AM_CPPFLn16925#, fuzzy
>AGS</literal> to add the following preprocessor macro definition:" 
16926msgid ""
16927"In your <literal>src/Makefile.am</literal>, update your "
16928"<literal>AM_CPPFLAGS</literal> to add the following preprocessor macro "
16929"definition:"
8249msgstr ""16930msgstr ""
nn16931"Uppdatera <literal>AM_CPPFLAGS</literal> i din <literal>src/Makefile.am</"
16932"literal> så att du lägger till följande preprocessormakrodefinition:"
825016933
8251#. (itstool) path: section/programlisting16934#. (itstool) path: section/programlisting
8252#: C/index-in.docbook:729516935#: C/index-in.docbook:7295
n8253#, no-wrapn16936#, fuzzy, no-wrap
8254msgid ""
8255"<code>AM_CPPFLAGS = ... -DPROGRAMNAME_LOCALEDIR=\\\"${PROGRAMNAME_LOCALEDIR}\\\16937msgid "<code>AM_CPPFLAGS = ... -DPROGRAMNAME_LOCALEDIR=\\\"${PROGRAMNAME_LOCALED
>"</code>">IR}\\\"</code>"
8256msgstr ""16938msgstr "AM_CPPFLAGS = ... -DPROGRAMNAME_LOCALEDIR=\\\"${PROGRAMNAMN_LOCALEDIR}\\
 >\""
825716939
8258#. (itstool) path: section/para16940#. (itstool) path: section/para
8259#: C/index-in.docbook:729616941#: C/index-in.docbook:7296
nn16942msgid ""
8260msgid "This macro will be used when you initialize <literal>gettext</literal> in16943"This macro will be used when you initialize <literal>gettext</literal> in "
> your source code." 
16944"your source code."
8261msgstr ""16945msgstr ""
nn16946"Detta makro kommer användas när du initierar <literal>gettext</literal> i "
16947"din källkod."
826216948
8263#. (itstool) path: section/title16949#. (itstool) path: section/title
8264#: C/index-in.docbook:730316950#: C/index-in.docbook:7303
8265msgid "Marking strings for translation"16951msgid "Marking strings for translation"
n8266msgstr ""n16952msgstr "Markera strängar för översättning"
826716953
8268#. (itstool) path: section/para16954#. (itstool) path: section/para
8269#: C/index-in.docbook:730516955#: C/index-in.docbook:7305
n8270msgid "String literals should be typed in the source code in English, but they sn16956#, fuzzy
>hould be surrounded by a call to the <function>gettext()</function> function. Th 
>ese strings will be extracted for translation and the translations may be used a 
>t runtime instead of the original English strings." 
16957msgid ""
16958"String literals should be typed in the source code in English, but they "
16959"should be surrounded by a call to the <function>gettext()</function> "
16960"function. These strings will be extracted for translation and the "
16961"translations may be used at runtime instead of the original English strings."
8271msgstr ""16962msgstr ""
nn16963"Stränglitterarer bör typas i källkoden på engelska, men de bör omgärdas av "
16964"ett anrop till <function>gettext()</function>-funktionen. Dessa strängar "
16965"kommer extraheras för översättning och översättningarna kan användas vid "
16966"körning i stället för de ursprungliga engelska strängarna."
827216967
8273#. (itstool) path: section/para16968#. (itstool) path: section/para
8274#: C/index-in.docbook:731316969#: C/index-in.docbook:7313
n8275msgid "The <application>GNU gettext</application> package allows you to mark strn16970msgid ""
>ings in source code, extract those strings for translation, and use the translat 
>ed strings in your application." 
16971"The <application>GNU gettext</application> package allows you to mark "
16972"strings in source code, extract those strings for translation, and use the "
16973"translated strings in your application."
8276msgstr ""16974msgstr ""
nn16975"Paketet <application>GNU gettext</application> låter dig markera strängar i "
16976"källkod, extrahera dessa strängar för översättning, och använda de översatta "
16977"strängarna i ditt program."
827716978
8278#. (itstool) path: section/para16979#. (itstool) path: section/para
8279#: C/index-in.docbook:731916980#: C/index-in.docbook:7319
n8280msgid "However, <application>Glib</application> defines <function>gettext()</funn16981#, fuzzy
>ction> support macros which are shorter wrappers in an easy-to-use form. To use  
>these macros, include <literal>&lt;glibmm/i18n.h&gt;</literal>, and then, for ex 
>ample, substitute:" 
16982msgid ""
16983"However, <application>Glib</application> defines <function>gettext()</"
16984"function> support macros which are shorter wrappers in an easy-to-use form. "
16985"To use these macros, include <literal>&lt;glibmm/i18n.h&gt;</literal>, and "
16986"then, for example, substitute:"
8281msgstr ""16987msgstr ""
nn16988"<application>Glib</application> definierar dock <function>gettext()</"
16989"function>-stödmakron som är kortare omslag i en lättanvänd form. För att "
16990"använda dessa makron inkluderar du <literal>&lt;glibmm/i18n.h&gt;</literal> "
16991"och ersätter exempelvis: <_:programlisting-1/> med: <_:programlisting-2/>"
828216992
8283#. (itstool) path: section/programlisting16993#. (itstool) path: section/programlisting
8284#: C/index-in.docbook:732516994#: C/index-in.docbook:7325
n8285#, no-wrapn16995#, fuzzy, no-wrap
8286msgid ""
8287"<code>display_message(\"Getting ready for i18n.\");</code>"16996msgid "<code>display_message(\"Getting ready for i18n.\");</code>"
8288msgstr ""16997msgstr "display_message(\"Getting ready for i18n.\");"
828916998
8290#. (itstool) path: section/para16999#. (itstool) path: section/para
8291#: C/index-in.docbook:732617000#: C/index-in.docbook:7326
8292msgid "with:"17001msgid "with:"
8293msgstr ""17002msgstr ""
829417003
8295#. (itstool) path: section/programlisting17004#. (itstool) path: section/programlisting
8296#: C/index-in.docbook:732717005#: C/index-in.docbook:7327
n8297#, no-wrapn17006#, fuzzy, no-wrap
8298msgid ""
8299"<code>display_message(_(\"Getting ready for i18n.\"));</code>"17007msgid "<code>display_message(_(\"Getting ready for i18n.\"));</code>"
8300msgstr ""17008msgstr "display_message(_(\"Getting ready for i18n.\"));"
830117009
8302#. (itstool) path: section/para17010#. (itstool) path: section/para
8303#: C/index-in.docbook:732917011#: C/index-in.docbook:7329
n8304msgid "For reference, it is possible to generate a file which contains all strinn17012#, fuzzy
>gs which appear in your code, even if they are not marked for translation, toget 
>her with file name and line number references. To generate such a file named <li 
>teral>my-strings</literal>, execute the following command, within the source cod 
>e directory:" 
17013msgid ""
17014"For reference, it is possible to generate a file which contains all strings "
17015"which appear in your code, even if they are not marked for translation, "
17016"together with file name and line number references. To generate such a file "
17017"named <literal>my-strings</literal>, execute the following command, within "
17018"the source code directory:"
8305msgstr ""17019msgstr ""
nn17020"För referens är det möjligt att generera en fil som innehåller alla strängar "
17021"som dyker upp i din kod även om de inte markerats för översättning, "
17022"tillsammans med referenser till filnamn och radnummer. För att generera en "
17023"sådan fil med namnet <literal>my-strings</literal> kör du följande kommando "
17024"i källkodskatalogen:"
830617025
8307#. (itstool) path: section/programlisting17026#. (itstool) path: section/programlisting
8308#: C/index-in.docbook:733817027#: C/index-in.docbook:7338
n8309#, no-wrapn17028#, fuzzy, no-wrap
8310msgid ""
8311"<code>xgettext -a -o my-strings --omit-header *.cc *.h</code>"17029msgid "<code>xgettext -a -o my-strings --omit-header *.cc *.h</code>"
8312msgstr ""17030msgstr "xgettext -a -o my-strings --omit-header *.cc *.h"
831317031
8314#. (itstool) path: section/para17032#. (itstool) path: section/para
8315#: C/index-in.docbook:734017033#: C/index-in.docbook:7340
n8316msgid "Finally, to let your program use the translation for the current locale, n17034msgid ""
>add this code to the beginning of your <filename>main.cc</filename> file, to ini 
>tialize gettext." 
17035"Finally, to let your program use the translation for the current locale, add "
17036"this code to the beginning of your <filename>main.cc</filename> file, to "
17037"initialize gettext."
8317msgstr ""17038msgstr ""
nn17039"För att slutligen låta ditt program använda översättningen för aktuell lokal "
17040"lägger du till denna kod i början av din <filename>main.cc</filename>-fil "
17041"för att initiera gettext."
831817042
8319#. (itstool) path: section/programlisting17043#. (itstool) path: section/programlisting
8320#: C/index-in.docbook:734517044#: C/index-in.docbook:7345
n8321#, no-wrapn17045#, fuzzy, no-wrap
8322msgid ""17046msgid ""
8323"<code>bindtextdomain(GETTEXT_PACKAGE, PROGRAMNAME_LOCALEDIR);\n"17047"<code>bindtextdomain(GETTEXT_PACKAGE, PROGRAMNAME_LOCALEDIR);\n"
8324"bind_textdomain_codeset(GETTEXT_PACKAGE, \"UTF-8\");\n"17048"bind_textdomain_codeset(GETTEXT_PACKAGE, \"UTF-8\");\n"
8325"textdomain(GETTEXT_PACKAGE);</code>"17049"textdomain(GETTEXT_PACKAGE);</code>"
8326msgstr ""17050msgstr ""
nn17051"bindtextdomain(GETTEXT_PACKAGE, PROGRAMNAME_LOCALEDIR);\n"
17052"bind_textdomain_codeset(GETTEXT_PACKAGE, \"UTF-8\");\n"
17053"textdomain(GETTEXT_PACKAGE);"
832717054
8328#. (itstool) path: section/title17055#. (itstool) path: section/title
8329#: C/index-in.docbook:735017056#: C/index-in.docbook:7350
8330msgid "How gettext works"17057msgid "How gettext works"
n8331msgstr ""n17058msgstr "Hur gettext fungerar"
833217059
8333#. (itstool) path: section/para17060#. (itstool) path: section/para
8334#: C/index-in.docbook:735217061#: C/index-in.docbook:7352
n8335msgid "The <application>intltool-update</application> or <application>xgettext</n17062#, fuzzy
>application> script extracts the strings and puts them in a <filename>mypackage. 
>pot</filename> file. The translators of your application create their translatio 
>ns by first copying this <filename>.pot</filename> file to a <filename>localenam 
>e.po</filename> file. A locale identifies a language and an encoding for that la 
>nguage, including date and numerical formats. Later, when the text in your sourc 
>e code has changed, the <application>msgmerge</application> or <application>intl 
>tool-update</application> script is used to update the <filename>localename.po</ 
>filename> files from the regenerated <filename>.pot</filename> file." 
17063msgid ""
17064"The <application>intltool-update</application> or <application>xgettext</"
17065"application> script extracts the strings and puts them in a "
17066"<filename>mypackage.pot</filename> file. The translators of your application "
17067"create their translations by first copying this <filename>.pot</filename> "
17068"file to a <filename>localename.po</filename> file. A locale identifies a "
17069"language and an encoding for that language, including date and numerical "
17070"formats. Later, when the text in your source code has changed, the "
17071"<application>msgmerge</application> or <application>intltool-update</"
17072"application> script is used to update the <filename>localename.po</filename> "
17073"files from the regenerated <filename>.pot</filename> file."
8336msgstr ""17074msgstr ""
nn17075"Skripten <application>intltool-update</application> eller "
17076"<application>xgettext</application> extraherar strängarna och stoppar dem i "
17077"en fil <filename>mypackage.pot</filename>. Översättarna av ditt program "
17078"skapar sina översättningar genom att först kopiera denna <filename>.pot</"
17079"filename>-fil till en fil <filename>lokalnamn.po</filename>. En lokal "
17080"identifierar ett språk och en kodning för det språket, inklusive datumformat "
17081"och numeriska format. Senare när texten i din källkod har ändrats används "
17082"skripten <application>msgmerge</application> eller <application>intltool-"
17083"update</application> för att uppdatera <filename>lokalnamn.po</filename>-"
17084"filerna från den på nytt genererade <filename>.pot</filename>-filen."
833717085
8338#. (itstool) path: section/para17086#. (itstool) path: section/para
8339#: C/index-in.docbook:736617087#: C/index-in.docbook:7366
n8340msgid "At install time, the <filename>.po</filename> files are converted to a bin17088#, fuzzy
>nary format (with the extension <filename>.mo</filename>) and placed in a system 
>-wide directory for locale files, for example <filename>/usr/share/locale/</file 
>name>." 
17089msgid ""
17090"At install time, the <filename>.po</filename> files are converted to a "
17091"binary format (with the extension <filename>.mo</filename>) and placed in a "
17092"system-wide directory for locale files, for example <filename>/usr/share/"
17093"locale/</filename>."
8341msgstr ""17094msgstr ""
nn17095"Vid installeringstid konverteras <filename>.po</filename>-filerna till ett "
17096"binärt format (med ändelsen <filename>.mo</filename>) och placeras i en "
17097"systemomfattande katalog för lokalfiler, exempelvis <filename>/usr/share/"
17098"locale/</filename>."
834217099
8343#. (itstool) path: section/para17100#. (itstool) path: section/para
8344#: C/index-in.docbook:737317101#: C/index-in.docbook:7373
n8345msgid "When the application runs, the <application>gettext</application> libraryn17102#, fuzzy
> checks the system-wide directory to see if there is a <filename>.mo</filename>  
>file for the user's locale environment (you can set the locale with, for instanc 
>e, \"export LANG=de_DE.UTF-8\" from a bash console). Later, when the program rea 
>ches a <literal>gettext</literal> call, it looks for a translation of a particul 
>ar string. If none is found, the original string is used." 
17103msgid ""
17104"When the application runs, the <application>gettext</application> library "
17105"checks the system-wide directory to see if there is a <filename>.mo</"
17106"filename> file for the user's locale environment (you can set the locale "
17107"with, for instance, \"export LANG=de_DE.UTF-8\" from a bash console). Later, "
17108"when the program reaches a <literal>gettext</literal> call, it looks for a "
17109"translation of a particular string. If none is found, the original string is "
17110"used."
8346msgstr ""17111msgstr ""
nn17112"När programmet körs kontrollerar <application>gettext</application>-"
17113"biblioteket den systemomfattande katalogen för att se om det finns en "
17114"<filename>.mo</filename>-fil för användarens lokalmiljö (du kan exempelvis "
17115"ställa in lokalen med \"export LANG=de_DE.UTF-8\" från en bash-konsol). När "
17116"programmet senare når ett <literal>gettext</literal>-anrop söker det en "
17117"översättning för en viss sträng. Om ingen hittas används originalsträngen."
834717118
8348#. (itstool) path: section/title17119#. (itstool) path: section/title
8349#: C/index-in.docbook:738517120#: C/index-in.docbook:7385
8350msgid "Testing and adding translations"17121msgid "Testing and adding translations"
n8351msgstr ""n17122msgstr "Testa och lägga till översättningar"
835217123
8353#. (itstool) path: section/para17124#. (itstool) path: section/para
8354#: C/index-in.docbook:738717125#: C/index-in.docbook:7387
n8355msgid "To convince yourself that you've done well, you may wish to add a translan17126#, fuzzy
>tion for a new locale. In order to do that, go to the <filename>po</filename> su 
>bdirectory of your project and execute the following command:" 
17127msgid ""
17128"To convince yourself that you've done well, you may wish to add a "
17129"translation for a new locale. In order to do that, go to the <filename>po</"
17130"filename> subdirectory of your project and execute the following command:"
8356msgstr ""17131msgstr ""
nn17132"För att försäkra dig om att du lyckats kan du vilja lägga till en "
17133"översättning för en ny lokal. För att göra detta går du till underkatalogen "
17134"<filename>po</filename> för ditt projekt och kör följande kommando:"
835717135
8358#. (itstool) path: section/programlisting17136#. (itstool) path: section/programlisting
8359#: C/index-in.docbook:739317137#: C/index-in.docbook:7393
8360#, no-wrap17138#, no-wrap
n8361msgid ""n
8362"<code>intltool-update --pot --gettext-package programname</code>"17139msgid "<code>intltool-update --pot --gettext-package programname</code>"
8363msgstr ""17140msgstr ""
836417141
8365#. (itstool) path: section/para17142#. (itstool) path: section/para
8366#: C/index-in.docbook:739517143#: C/index-in.docbook:7395
n8367msgid "That will create a file named <filename>programname.pot</filename>. Now cn17144#, fuzzy
>opy that file to <filename>languagecode.po</filename>, such as <filename>de.po</ 
>filename> or <filename>hu.po</filename>. Also add that language code to <literal 
>>LINGUAS</literal>. The <filename>.po</filename> file contains a header and a li 
>st of English strings, with space for the translated strings to be entered. Make 
> sure you set the encoding of the <filename>.po</filename> file to <literal>UTF- 
>8</literal>." 
17145msgid ""
17146"That will create a file named <filename>programname.pot</filename>. Now copy "
17147"that file to <filename>languagecode.po</filename>, such as <filename>de.po</"
17148"filename> or <filename>hu.po</filename>. Also add that language code to "
17149"<literal>LINGUAS</literal>. The <filename>.po</filename> file contains a "
17150"header and a list of English strings, with space for the translated strings "
17151"to be entered. Make sure you set the encoding of the <filename>.po</"
17152"filename> file to <literal>UTF-8</literal>."
8368msgstr ""17153msgstr ""
nn17154"Du kommer skapa en fil med namnet <filename>programnamn.pot</filename>. "
17155"Kopiera nu den filen till <filename>språkkod.po</filename>, som <filename>de."
17156"po</filename> eller <filename>hu.po</filename>. Lägg också till språkkoden "
17157"till <literal>LINGUAS</literal>. <filename>.po</filename>-filen innehåller "
17158"ett huvud och en lista över engelska strängar, med utrymme för de översatta "
17159"strängarna att matas in. Se till att du ställer in kodningen för <filename>."
17160"po</filename>-filen (angiven i huvudet, men också som innehåll) till "
17161"<literal>UTF-8</literal>."
836917162
8370#. (itstool) path: section/programlisting17163#. (itstool) path: section/programlisting
8371#: C/index-in.docbook:740417164#: C/index-in.docbook:7404
8372#, no-wrap17165#, no-wrap
n8373msgid ""n
8374"<code>\"Content-Type: text/plain; charset=UTF-8\\n\"</code>"17166msgid "<code>\"Content-Type: text/plain; charset=UTF-8\\n\"</code>"
8375msgstr ""17167msgstr ""
837617168
8377#. (itstool) path: note/para17169#. (itstool) path: note/para
8378#: C/index-in.docbook:740817170#: C/index-in.docbook:7408
n8379msgid "It's possible that certain strings will be marked as <literal>fuzzy</liten17171#, fuzzy
>ral> in the <filename>.po</filename> file. These translations will not substitut 
>e the original string. To make them appear, simply remove the <literal>fuzzy</li 
>teral> tag. A <literal>fuzzy</literal> tag appears if a string content changed,  
>but the location is still the same." 
17172msgid ""
17173"It's possible that certain strings will be marked as <literal>fuzzy</"
17174"literal> in the <filename>.po</filename> file. These translations will not "
17175"substitute the original string. To make them appear, simply remove the "
17176"<literal>fuzzy</literal> tag. A <literal>fuzzy</literal> tag appears if a "
17177"string content changed, but the location is still the same."
8380msgstr ""17178msgstr ""
nn17179"Det är möjligt att vissa strängar kommer markeras <literal>fuzzy</literal> i "
17180"<filename>.po</filename>-filen. Dessa översättningar kommer inte ersätta "
17181"originalsträngen. För att de ska visas tar du helt enkelt bort "
17182"<literal>fuzzy</literal>-taggen. En <literal>fuzzy</literal>-tagg dyker "
17183"läggs till om en strängs innehåll har ändrats men lokaliseringen fortfarande "
17184"är densamma."
838117185
8382#. (itstool) path: section/title17186#. (itstool) path: section/title
8383#: C/index-in.docbook:742017187#: C/index-in.docbook:7420
8384msgid "Resources"17188msgid "Resources"
n8385msgstr ""n17189msgstr "Resurser"
838617190
8387#. (itstool) path: listitem/para17191#. (itstool) path: listitem/para
8388#: C/index-in.docbook:742817192#: C/index-in.docbook:7428
n8389msgid "<link xlink:href=\"https://wiki.gnome.org/TranslationProject/DevGuidelinen17193msgid ""
>s\"> L10N Guidelines for Developers</link>" 
17194"<link xlink:href=\"https://wiki.gnome.org/TranslationProject/"
17195"DevGuidelines\"> L10N Guidelines for Developers</link>"
8390msgstr ""17196msgstr ""
nn17197"<link xlink:href=\"https://wiki.gnome.org/TranslationProject/"
17198"DevGuidelines\"> L10N-riktlinjer för utvecklare</link>"
839117199
8392#. (itstool) path: listitem/para17200#. (itstool) path: listitem/para
8393#: C/index-in.docbook:743517201#: C/index-in.docbook:7435
nn17202msgid ""
8394msgid "<link xlink:href=\"http://bazaar.launchpad.net/~intltool/intltool/trunk/v17203"<link xlink:href=\"http://bazaar.launchpad.net/~intltool/intltool/trunk/view/"
>iew/head:/README\">Intltool README</link>" 
17204"head:/README\">Intltool README</link>"
8395msgstr ""17205msgstr ""
nn17206"<link xlink:href=\"http://bazaar.launchpad.net/~intltool/intltool/trunk/view/"
17207"head:/README\">README för Intltool</link>"
839617208
8397#. (itstool) path: listitem/para17209#. (itstool) path: listitem/para
8398#: C/index-in.docbook:744117210#: C/index-in.docbook:7441
nn17211msgid ""
8399msgid "<link xlink:href=\"https://wiki.gnome.org/TranslationProject/GitHowTo\">H17212"<link xlink:href=\"https://wiki.gnome.org/TranslationProject/GitHowTo\">How "
>ow to use Git for GNOME translators</link>" 
17213"to use Git for GNOME translators</link>"
8400msgstr ""17214msgstr ""
nn17215"<link xlink:href=\"https://wiki.gnome.org/TranslationProject/"
17216"GitHowTo\">Använda Git för GNOME-översättare</link>"
840117217
8402#. (itstool) path: listitem/para17218#. (itstool) path: listitem/para
8403#: C/index-in.docbook:744717219#: C/index-in.docbook:7447
nn17220msgid ""
8404msgid "<link xlink:href=\"http://www.gnu.org/software/gettext/manual/gettext.htm17221"<link xlink:href=\"http://www.gnu.org/software/gettext/manual/gettext."
>l\">gettext manual</link>" 
17222"html\">gettext manual</link>"
8405msgstr ""17223msgstr ""
nn17224"<link xlink:href=\"http://www.gnu.org/software/gettext/manual/gettext."
17225"html\">Handbok för gettext</link>"
840617226
8407#. (itstool) path: section/para17227#. (itstool) path: section/para
8408#: C/index-in.docbook:742217228#: C/index-in.docbook:7422
n8409msgid "More information about what lies behind the internationalization and locan17229#, fuzzy
>lization process is presented and demonstrated in: <_:itemizedlist-1/>" 
17230msgid ""
17231"More information about what lies behind the internationalization and "
17232"localization process is presented and demonstrated in: <_:itemizedlist-1/>"
8410msgstr ""17233msgstr ""
nn17234"Mer information om vad som ligger bakom internationaliserings- och "
17235"lokalanpassningsprocessen presenteras och demonstreras i: <_:itemizedlist-1/>"
841117236
8412#. (itstool) path: section/title17237#. (itstool) path: section/title
8413#: C/index-in.docbook:745817238#: C/index-in.docbook:7458
8414msgid "Expecting UTF8"17239msgid "Expecting UTF8"
n8415msgstr ""n17240msgstr "Förvänta sig UTF8"
841617241
8417#. (itstool) path: section/para17242#. (itstool) path: section/para
8418#: C/index-in.docbook:746017243#: C/index-in.docbook:7460
n8419msgid "A properly internationalized application will not make assumptions about n17244#, fuzzy
>the number of bytes in a character. That means that you shouldn't use pointer ar 
>ithmetic to step through the characters in a string, and it means you shouldn't  
>use <classname>std::string</classname> or standard C functions such as <function 
>>strlen()</function> because they make the same assumption." 
17245msgid ""
17246"A properly internationalized application will not make assumptions about the "
17247"number of bytes in a character. That means that you shouldn't use pointer "
17248"arithmetic to step through the characters in a string, and it means you "
17249"shouldn't use <classname>std::string</classname> or standard C functions "
17250"such as <function>strlen()</function> because they make the same assumption."
8420msgstr ""17251msgstr ""
nn17252"Ett ordentligt internationaliserat program kommer inte göra antaganden om "
17253"antalet byte i ett tecken. Detta betyder att du inte ska använda "
17254"pekararitmetik för att stega genom tecknen i en sträng, och det betyder att "
17255"du inte ska använda <classname>std::string</classname> eller C-"
17256"standardfunktioner som <function>strlen()</function> för att de gör samma "
17257"antagande."
842117258
8422#. (itstool) path: section/para17259#. (itstool) path: section/para
8423#: C/index-in.docbook:746717260#: C/index-in.docbook:7467
n8424msgid "However, you probably already avoid bare char* arrays and pointer arithmen17261#, fuzzy
>tic by using <classname>std::string</classname>, so you just need to start using 
> <classname>Glib::ustring</classname> instead. See the <link linkend=\"sec-basic 
>s-ustring\">Basics</link> chapter about <classname>Glib::ustring</classname>." 
17262msgid ""
17263"However, you probably already avoid bare char* arrays and pointer arithmetic "
17264"by using <classname>std::string</classname>, so you just need to start using "
17265"<classname>Glib::ustring</classname> instead. See the <link linkend=\"sec-"
17266"basics-ustring\">Basics</link> chapter about <classname>Glib::ustring</"
17267"classname>."
8425msgstr ""17268msgstr ""
nn17269"Du undviker dock troligen redan nakna char*-arrayer och pekararitmetik genom "
17270"att använda <classname>std::string</classname>, så du behöver bara börja "
17271"använda <classname>Glib::ustring</classname> i stället. Se i avsnittet <link "
17272"linkend=\"sec-basics-ustring\">Grunder</link> om <classname>Glib::ustring</"
17273"classname>."
842617274
8427#. (itstool) path: section/title17275#. (itstool) path: section/title
8428#: C/index-in.docbook:747517276#: C/index-in.docbook:7475
8429msgid "Glib::ustring and std::iostreams"17277msgid "Glib::ustring and std::iostreams"
n8430msgstr ""n17278msgstr "Glib::ustring och std::iostreams"
843117279
8432#. (itstool) path: section/para17280#. (itstool) path: section/para
8433#: C/index-in.docbook:747817281#: C/index-in.docbook:7478
n8434msgid "Unfortunately, the integration with the standard iostreams is not completn17282#, fuzzy
>ely foolproof. <application>gtkmm</application> converts <classname>Glib::ustrin 
>g</classname>s to a locale-specific encoding (which usually is not UTF-8) if you 
> output them to an <classname>ostream</classname> with <function>operator&lt;&lt 
>;</function>. Likewise, retrieving <classname>Glib::ustring</classname>s from <c 
>lassname>istream</classname> with <function>operator&gt;&gt;</function> causes a 
> conversion in the opposite direction. But this scheme breaks down if you go thr 
>ough a <classname>std::string</classname>, e.g. by inputting text from a stream  
>to a <classname>std::string</classname> and then implicitly converting it to a < 
>classname>Glib::ustring</classname>. If the string contained non-ASCII character 
>s and the current locale is not UTF-8 encoded, the result is a corrupted <classn 
>ame>Glib::ustring</classname>. You can work around this with a manual conversion 
>. For instance, to retrieve the <classname>std::string</classname> from a <class 
>name>ostringstream</classname>:" 
17283msgid ""
17284"Unfortunately, the integration with the standard iostreams is not completely "
17285"foolproof. <application>gtkmm</application> converts <classname>Glib::"
17286"ustring</classname>s to a locale-specific encoding (which usually is not "
17287"UTF-8) if you output them to an <classname>ostream</classname> with "
17288"<function>operator&lt;&lt;</function>. Likewise, retrieving <classname>Glib::"
17289"ustring</classname>s from <classname>istream</classname> with "
17290"<function>operator&gt;&gt;</function> causes a conversion in the opposite "
17291"direction. But this scheme breaks down if you go through a <classname>std::"
17292"string</classname>, e.g. by inputting text from a stream to a "
17293"<classname>std::string</classname> and then implicitly converting it to a "
17294"<classname>Glib::ustring</classname>. If the string contained non-ASCII "
17295"characters and the current locale is not UTF-8 encoded, the result is a "
17296"corrupted <classname>Glib::ustring</classname>. You can work around this "
17297"with a manual conversion. For instance, to retrieve the <classname>std::"
17298"string</classname> from a <classname>ostringstream</classname>:"
8435msgstr ""17299msgstr ""
nn17300"Tyvärr är integrationen med iostream-standardströmmar inte helt idiotsäker. "
17301"<application>gtkmm</application> konverterar <classname>Glib::ustring</"
17302"classname>-strängar till en lokalspecifik kodning (vilken vanligen inte är "
17303"UTF-8) om du matar ut dem till en <classname>ostream</classname> med "
17304"<function>operator&lt;&lt;</function>. På samma sätt orsakar hämtning av "
17305"<classname>Glib::ustring</classname>-strängar från <classname>istream</"
17306"classname> med <function>operator&gt;&gt;</function> en konvertering i "
17307"motsatt riktning. Men detta schema går sönder om du går genom en "
17308"<classname>std::string</classname>, t.ex. genom att mata in text från en "
17309"ström till en <classname>std::string</classname> och sedan implicit "
17310"konvertera den till en <classname>Glib::ustring</classname>. Om strängen "
17311"innehöll tecken som inte är ASCII och den aktuella lokalen inte är UTF-8-"
17312"kodad, kommer resultatet vara en trasig <classname>Glib::ustring</"
17313"classname>. Du kan arbeta runt detta med en manuell konvertering. För att "
17314"exempelvis erhålla <classname>std::string</classname>-strängen från en "
17315"<classname>ostringstream</classname>:"
843617316
8437#. (itstool) path: section/programlisting17317#. (itstool) path: section/programlisting
8438#: C/index-in.docbook:749417318#: C/index-in.docbook:7494
n8439#, no-wrapn17319#, fuzzy, no-wrap
8440msgid ""17320msgid ""
8441"<code>std::locale::global(std::locale(\"\")); // Set the global locale to the u17321"<code>std::locale::global(std::locale(\"\")); // Set the global locale to the u
>ser's preferred locale.\n">ser's preferred locale.\n"
8442"                                      // Usually unnecessary here, because Glib17322"                                      // Usually unnecessary here, because Glib
>::init()\n">::init()\n"
8443"                                      // or Gtk::Application::create() does it 17323"                                      // or Gtk::Application::create() does it 
>for you.\n">for you.\n"
8444"std::ostringstream output;\n"17324"std::ostringstream output;\n"
8445"output &lt;&lt; percentage &lt;&lt; \" % done\";\n"17325"output &lt;&lt; percentage &lt;&lt; \" % done\";\n"
8446"label-&gt;set_text(Glib::locale_to_utf8(output.str()));</code>"17326"label-&gt;set_text(Glib::locale_to_utf8(output.str()));</code>"
8447msgstr ""17327msgstr ""
nn17328"std::locale::global(std::locale(\"\")); // Sätt den globala lokalen till använd
 >arens föredragna lokal.\n"
17329"                                      // Vanligen onödigt här, för Glib::init()
 >\n"
17330"                                      // eller Gtk::Application::create() gör d
 >et åt dig.\n"
17331"std::ostringstream output;\n"
17332"output &lt;&lt; percentage &lt;&lt; \" % klar\";\n"
17333"label-&gt;set_text(Glib::locale_to_utf8(output.str()));"
844817334
8449#. (itstool) path: section/title17335#. (itstool) path: section/title
8450#: C/index-in.docbook:750517336#: C/index-in.docbook:7505
8451msgid "Pitfalls"17337msgid "Pitfalls"
n8452msgstr ""n17338msgstr "Fallgropar"
845317339
8454#. (itstool) path: section/para17340#. (itstool) path: section/para
8455#: C/index-in.docbook:750717341#: C/index-in.docbook:7507
nn17342msgid ""
8456msgid "There are a few common mistakes that you would discover eventually yourse17343"There are a few common mistakes that you would discover eventually yourself. "
>lf. But this section might help you to avoid them." 
17344"But this section might help you to avoid them."
8457msgstr ""17345msgstr ""
nn17346"Det finns några vanliga misstag som du så småningom skulle upptäcka själv. "
17347"Men det här avsnittet kanske hjälper dig undvika dem."
845817348
8459#. (itstool) path: section/title17349#. (itstool) path: section/title
8460#: C/index-in.docbook:751017350#: C/index-in.docbook:7510
nn17351#, fuzzy
8461msgid "Same strings, different semantics"17352msgid "Same strings, different semantics"
n8462msgstr ""n17353msgstr "Samma strängar, olika semantik"
846317354
8464#. (itstool) path: section/para17355#. (itstool) path: section/para
8465#: C/index-in.docbook:751217356#: C/index-in.docbook:7512
n8466msgid "Sometimes two English strings are identical but have different meanings in17357msgid ""
>n different contexts, so they would probably not be identical when translated. S 
>ince the English strings are used as look-up keys, this causes problems." 
17358"Sometimes two English strings are identical but have different meanings in "
17359"different contexts, so they would probably not be identical when translated. "
17360"Since the English strings are used as look-up keys, this causes problems."
8467msgstr ""17361msgstr ""
nn17362"Ibland är två strängar på engelska identiska men har olika betydelse i olika "
17363"kontexter, så de skulle troligen inte vara identiska då de översätts. Då de "
17364"engelska strängarna används som nycklar för uppslagning så orsakar detta "
17365"problem."
846817366
8469#. (itstool) path: section/para17367#. (itstool) path: section/para
8470#: C/index-in.docbook:751617368#: C/index-in.docbook:7516
n8471msgid "In these cases, you should add extra characters to the strings. For instan17369#, fuzzy
>nce, use <literal>\"jumps[noun]\"</literal> and <literal>\"jumps[verb]\"</litera 
>l> instead of just <literal>\"jumps\"</literal> and strip them again outside the 
> <function>gettext</function> call. If you add extra characters you should also  
>add a comment for the translators before the <function>gettext</function> call.  
>Such comments will be shown in the <filename>.po</filename> files. For instance: 
>" 
17370msgid ""
17371"In these cases, you should add extra characters to the strings. For "
17372"instance, use <literal>\"jumps[noun]\"</literal> and "
17373"<literal>\"jumps[verb]\"</literal> instead of just <literal>\"jumps\"</"
17374"literal> and strip them again outside the <function>gettext</function> call. "
17375"If you add extra characters you should also add a comment for the "
17376"translators before the <function>gettext</function> call. Such comments will "
17377"be shown in the <filename>.po</filename> files. For instance:"
8472msgstr ""17378msgstr ""
nn17379"I dessa fall bör du lägga till extra tecken till strängarna. Använd "
17380"exempelvis <literal>\"jumps[noun]\"</literal> och <literal>\"jumps[verb]\"</"
17381"literal> i stället för bara <literal>\"jumps\"</literal> och ta bort dem "
17382"igen utanför <function>gettext</function>-anropet. Om du lägger till extra "
17383"tecken ska du också lägga till en kommentar för översättarna innan "
17384"<function>gettext</function>-anropet. Sådana kommentarer kommer visas i "
17385"<filename>.po</filename>-filerna. Till exempel:"
847317386
8474#. (itstool) path: section/programlisting17387#. (itstool) path: section/programlisting
8475#: C/index-in.docbook:752517388#: C/index-in.docbook:7525
n8476#, no-wrapn17389#, fuzzy, no-wrap
17390#| msgid ""
17391#| "// note to translators: don't translate the \"[noun]\" part - it is\n"
17392#| "// just here to distinguish the string from another \"jumps\" string\n"
17393#| "text = strip(gettext(\"jumps[noun]\"), \"[noun]\");"
8477msgid ""17394msgid ""
8478"<code>// note to translators: don't translate the \"[noun]\" part - it is\n"17395"<code>// note to translators: don't translate the \"[noun]\" part - it is\n"
8479"// just here to distinguish the string from another \"jumps\" string\n"17396"// just here to distinguish the string from another \"jumps\" string\n"
8480"text = strip(gettext(\"jumps[noun]\"), \"[noun]\");</code>"17397"text = strip(gettext(\"jumps[noun]\"), \"[noun]\");</code>"
8481msgstr ""17398msgstr ""
nn17399"// note to translators: don't translate the \"[noun]\" part - it is\n"
17400"// just here to distinguish the string from another \"jumps\" string\n"
17401"text = strip(gettext(\"jumps[noun]\"), \"[noun]\");"
848217402
8483#. (itstool) path: section/para17403#. (itstool) path: section/para
8484#: C/index-in.docbook:752917404#: C/index-in.docbook:7529
n8485msgid "If you use <application>Glib</application>'s support macros, it's easier.n17405msgid ""
> Use <function>C_()</function> instead of <function>_()</function>. For instance 
>:" 
17406"If you use <application>Glib</application>'s support macros, it's easier. "
17407"Use <function>C_()</function> instead of <function>_()</function>. For "
17408"instance:"
8486msgstr ""17409msgstr ""
nn17410"Om du använder <application>Glib</application>s stödmakron är det enklare. "
17411"Använd <function>C_()</function> i stället för <function>_()</function>. "
17412"Till exempel:"
848717413
8488#. (itstool) path: section/programlisting17414#. (itstool) path: section/programlisting
8489#: C/index-in.docbook:753317415#: C/index-in.docbook:7533
n8490#, no-wrapn17416#, fuzzy, no-wrap
8491msgid ""17417#| msgid "GLib::ustring text(C_(\"noun\", \"jumps\"));"
8492"<code>GLib::ustring text(C_(\"noun\", \"jumps\"));</code>"17418msgid "<code>GLib::ustring text(C_(\"noun\", \"jumps\"));</code>"
8493msgstr ""17419msgstr "GLib::ustring text(C_(\"noun\", \"jumps\"));"
849417420
8495#. (itstool) path: section/title17421#. (itstool) path: section/title
8496#: C/index-in.docbook:753817422#: C/index-in.docbook:7538
8497msgid "Composition of strings"17423msgid "Composition of strings"
n8498msgstr ""n17424msgstr "Sammansättning av strängar"
849917425
nn17426# TODO: favors
8500#. (itstool) path: section/para17427#. (itstool) path: section/para
8501#: C/index-in.docbook:754017428#: C/index-in.docbook:7540
n8502msgid "C programmers use <function>sprintf()</function> to compose and concatenan17429#, fuzzy
>te strings. <phrase role=\"nowrap\">C++</phrase> favors streams, but unfortunate 
>ly, this approach makes translation difficult, because each fragment of text is  
>translated separately, without allowing the translators to rearrange them accord 
>ing to the grammar of the language." 
17430msgid ""
17431"C programmers use <function>sprintf()</function> to compose and concatenate "
17432"strings. <phrase role=\"nowrap\">C++</phrase> favors streams, but "
17433"unfortunately, this approach makes translation difficult, because each "
17434"fragment of text is translated separately, without allowing the translators "
17435"to rearrange them according to the grammar of the language."
8503msgstr ""17436msgstr ""
nn17437"C-programmerare använder <function>sprintf()</function> för att komponera "
17438"och konkatenera strängar. C++ föredrar strömmar, men detta angreppssätt gör "
17439"tyvärr översättning svår, för varje textfragment översätts separat utan att "
17440"låta översättarna arrangera om dem enligt språkets grammatik."
850417441
8505#. (itstool) path: section/para17442#. (itstool) path: section/para
8506#: C/index-in.docbook:754717443#: C/index-in.docbook:7547
8507msgid "For instance, this code would be problematic:"17444msgid "For instance, this code would be problematic:"
n8508msgstr ""n17445msgstr "Exempelvis skulle denna kod vara problematisk:"
850917446
8510#. (itstool) path: section/programlisting17447#. (itstool) path: section/programlisting
8511#: C/index-in.docbook:754917448#: C/index-in.docbook:7549
n8512#, no-wrapn17449#, fuzzy, no-wrap
17450#| msgid ""
17451#| "std::cout &lt;&lt; _(\"Current amount: \") &lt;&lt; amount\n"
17452#| "          &lt;&lt; _(\" Future: \") &lt;&lt; future &lt;&lt; std::endl;\n"
17453#| "\n"
17454#| "label.set_text(_(\"Really delete \") + filename + _(\" now?\"));"
8513msgid ""17455msgid ""
8514"<code>std::cout &lt;&lt; _(\"Current amount: \") &lt;&lt; amount\n"17456"<code>std::cout &lt;&lt; _(\"Current amount: \") &lt;&lt; amount\n"
8515"          &lt;&lt; _(\" Future: \") &lt;&lt; future &lt;&lt; std::endl;\n"17457"          &lt;&lt; _(\" Future: \") &lt;&lt; future &lt;&lt; std::endl;\n"
8516"\n"17458"\n"
8517"label.set_text(_(\"Really delete \") + filename + _(\" now?\"));</code>"17459"label.set_text(_(\"Really delete \") + filename + _(\" now?\"));</code>"
8518msgstr ""17460msgstr ""
nn17461"std::cout &lt;&lt; _(\"Current amount: \") &lt;&lt; amount\n"
17462"          &lt;&lt; _(\" Future: \") &lt;&lt; future &lt;&lt; std::endl;\n"
17463"\n"
17464"label.set_text(_(\"Really delete \") + filename + _(\" now?\"));"
851917465
8520#. (itstool) path: section/para17466#. (itstool) path: section/para
8521#: C/index-in.docbook:755417467#: C/index-in.docbook:7554
n8522msgid "So you should either avoid this situation or use <link xlink:href=\"httpsn17468#, fuzzy
>://gnome.pages.gitlab.gnome.org/glibmm/classGlib_1_1ustring.html\"><function>Gli 
>b::ustring::compose()</function></link> which supports syntax such as:" 
17469#| msgid ""
17470#| "So you should either avoid this situation or use <link xlink:"
17471#| "href=\"http://developer.gnome.org/glibmm/unstable/classGlib_1_1ustring."
17472#| "html\"><function>Glib::ustring::compose()</function></link> which "
17473#| "supports syntax such as:"
17474msgid ""
17475"So you should either avoid this situation or use <link xlink:href=\"https://"
17476"gnome.pages.gitlab.gnome.org/glibmm/classGlib_1_1ustring."
17477"html\"><function>Glib::ustring::compose()</function></link> which supports "
17478"syntax such as:"
8523msgstr ""17479msgstr ""
nn17480"Så du bör antingen undvika denna situation eller använda <link xlink:"
17481"href=\"http://developer.gnome.org/glibmm/unstable/classGlib_1_1ustring."
17482"html\"><function>Glib::ustring::compose()</function></link> som stöder "
17483"syntax som:"
852417484
8525#. (itstool) path: section/programlisting17485#. (itstool) path: section/programlisting
8526#: C/index-in.docbook:755917486#: C/index-in.docbook:7559
n8527#, no-wrapn17487#, fuzzy, no-wrap
17488#| msgid ""
17489#| "std::cout &lt;&lt; Glib::ustring::compose(\n"
17490#| "             _(\"Current amount: %1 Future: %2\"), amount, future) &lt;&lt; 
 >std::endl;\n"
17491#| "\n"
17492#| "label.set_text(Glib::ustring::compose(_(\"Really delete %1 now?\"), filename
 >));"
8528msgid ""17493msgid ""
8529"<code>std::cout &lt;&lt; Glib::ustring::compose(\n"17494"<code>std::cout &lt;&lt; Glib::ustring::compose(\n"
8530"             _(\"Current amount: %1 Future: %2\"), amount, future) &lt;&lt; std17495"             _(\"Current amount: %1 Future: %2\"), amount, future) &lt;&lt; std
>::endl;\n">::endl;\n"
8531"\n"17496"\n"
8532"label.set_text(Glib::ustring::compose(_(\"Really delete %1 now?\"), filename));17497"label.set_text(Glib::ustring::compose(_(\"Really delete %1 now?\"), filename));
></code>"></code>"
8533msgstr ""17498msgstr ""
nn17499"std::cout &lt;&lt; Glib::ustring::compose(\n"
17500"             _(\"Current amount: %1 Future: %2\"), amount, future) &lt;&lt; std
 >::endl;\n"
17501"\n"
17502"label.set_text(Glib::ustring::compose(_(\"Really delete %1 now?\"), filename));
 >"
853417503
8535#. (itstool) path: section/title17504#. (itstool) path: section/title
8536#: C/index-in.docbook:756617505#: C/index-in.docbook:7566
8537msgid "Assuming the displayed size of strings"17506msgid "Assuming the displayed size of strings"
n8538msgstr ""n17507msgstr "Anta den visade storleken för strängar"
853917508
8540#. (itstool) path: section/para17509#. (itstool) path: section/para
8541#: C/index-in.docbook:756817510#: C/index-in.docbook:7568
n8542msgid "You never know how much space a string will take on screen when translaten17511msgid ""
>d. It might very possibly be twice the size of the original English string. Luck 
>ily, most <application>gtkmm</application> widgets will expand at runtime to the 
> required size." 
17512"You never know how much space a string will take on screen when translated. "
17513"It might very possibly be twice the size of the original English string. "
17514"Luckily, most <application>gtkmm</application> widgets will expand at "
17515"runtime to the required size."
8543msgstr ""17516msgstr ""
nn17517"Du vet aldrig hur mycket utrymme en sträng kommer ta på skärmen då den "
17518"översätts. Den kan mycket väl vara dubbla storleken mot för den ursprungliga "
17519"engelska strängen. Lyckligtvis kommer de flesta <application>gtkmm</"
17520"application>-komponenter vid körning expanderas till storleken som krävs."
854417521
8545#. (itstool) path: section/title17522#. (itstool) path: section/title
8546#: C/index-in.docbook:757217523#: C/index-in.docbook:7572
8547msgid "Unusual words"17524msgid "Unusual words"
n8548msgstr ""n17525msgstr "Ovanliga ord"
854917526
8550#. (itstool) path: section/para17527#. (itstool) path: section/para
8551#: C/index-in.docbook:757417528#: C/index-in.docbook:7574
n8552msgid "You should avoid cryptic abbreviations, slang, or jargon. They are usualln17529#, fuzzy
>y difficult to translate, and are often difficult for even native speakers to un 
>derstand." 
17530msgid ""
17531"You should avoid cryptic abbreviations, slang, or jargon. They are usually "
17532"difficult to translate, and are often difficult for even native speakers to "
17533"understand."
8553msgstr ""17534msgstr ""
nn17535"Du bör undvika kryptiska förkortningar, slang eller jargong. De är oftast "
17536"svåra att översätta, och är ofta svåra att förstå även för personer som har "
17537"det som modersmål. Använd exempelvis hellre ”application” än ”app”"
855417538
8555#. (itstool) path: section/title17539#. (itstool) path: section/title
8556#: C/index-in.docbook:758017540#: C/index-in.docbook:7580
8557msgid "Using non-ASCII characters in strings"17541msgid "Using non-ASCII characters in strings"
n8558msgstr ""n17542msgstr "Använda tecken som inte är ASCII i strängar"
855917543
nn17544# TODO: Is this still true??
8560#. (itstool) path: section/para17545#. (itstool) path: section/para
8561#: C/index-in.docbook:758217546#: C/index-in.docbook:7582
n8562msgid "Currently, <application>gettext</application> does not support non-ASCII n17547msgid ""
>characters (i.e. any characters with a code above 127) in source code. For insta 
>nce, you cannot use the copyright sign (©)." 
17548"Currently, <application>gettext</application> does not support non-ASCII "
17549"characters (i.e. any characters with a code above 127) in source code. For "
17550"instance, you cannot use the copyright sign (©)."
8563msgstr ""17551msgstr ""
nn17552"För närvarande stöder <application>gettext</application> inte tecken som "
17553"inte är ASCII (d.v.s. tecken med en kod ovanför 127) i källkod. Du kan "
17554"exempelvis inte använda upphovsrättstecknet (©)."
856417555
8565#. (itstool) path: section/para17556#. (itstool) path: section/para
8566#: C/index-in.docbook:758817557#: C/index-in.docbook:7588
n8567msgid "To work around this, you could write a comment in the source code just ben17558msgid ""
>fore the string, telling the translators to use the special character if it is a 
>vailable in their languages. For English, you could then make an American Englis 
>h <filename>en_US.po</filename> translation which used that special character." 
17559"To work around this, you could write a comment in the source code just "
17560"before the string, telling the translators to use the special character if "
17561"it is available in their languages. For English, you could then make an "
17562"American English <filename>en_US.po</filename> translation which used that "
17563"special character."
8568msgstr ""17564msgstr ""
nn17565"För att arbeta runt detta skulle du kunna skriva en kommentar i källkoden "
17566"just innan strängen, och säga till översättarna att använda det speciella "
17567"tecknet om det finns tillgängligt på deras språk. För engelska skulle du "
17568"sedan kunna göra en <filename>en_US.po</filename>-översättning för "
17569"amerikansk engelska som använder det speciella tecknet."
856917570
8570#. (itstool) path: section/title17571#. (itstool) path: section/title
8571#: C/index-in.docbook:759617572#: C/index-in.docbook:7596
8572msgid "Getting help with translations"17573msgid "Getting help with translations"
n8573msgstr ""n17574msgstr "Få hjälp med översättningar"
857417575
8575#. (itstool) path: section/para17576#. (itstool) path: section/para
8576#: C/index-in.docbook:759817577#: C/index-in.docbook:7598
n8577msgid "If your program is free software, there is a whole <literal>GNOME</literan17578msgid ""
>l> subproject devoted to helping you make translations, the <link xlink:href=\"h 
>ttps://wiki.gnome.org/TranslationProject/\"><literal>GNOME</literal> Translation 
> Project</link>." 
17579"If your program is free software, there is a whole <literal>GNOME</literal> "
17580"subproject devoted to helping you make translations, the <link xlink:"
17581"href=\"https://wiki.gnome.org/TranslationProject/\"><literal>GNOME</literal> "
17582"Translation Project</link>."
8578msgstr ""17583msgstr ""
nn17584"Om ditt program är fri programvara så finns det ett helt <literal>GNOME</"
17585"literal>-underprojekt som är avsett för att hjälpa dig översätta, <link "
17586"xlink:href=\"https://wiki.gnome.org/TranslationProject/\"><literal>GNOME</"
17587"literal> Translation Project</link>."
857917588
8580#. (itstool) path: section/para17589#. (itstool) path: section/para
8581#: C/index-in.docbook:760317590#: C/index-in.docbook:7603
n8582msgid "The way it works is that you upload your source code to a git repository n17591#, fuzzy
>where translators can access it, then file an <link xlink:href=\"https://gitlab. 
>gnome.org/Infrastructure/damned-lies/-/issues\"> issue to the damned-lies projec 
>t</link> and ask to have your program added to the <link xlink:href=\"http://l10 
>n.gnome.org/module/\">list of modules to translate</link>." 
17592#| msgid ""
17593#| "The way it works is that you upload your source code to a git repository "
17594#| "where translators can access it, then contact the gnome-i18n mailing list "
17595#| "and ask to have your program added to the <link xlink:href=\"http://l10n."
17596#| "gnome.org/module/\">list of modules to translate</link>."
17597msgid ""
17598"The way it works is that you upload your source code to a git repository "
17599"where translators can access it, then file an <link xlink:href=\"https://"
17600"gitlab.gnome.org/Infrastructure/damned-lies/-/issues\"> issue to the damned-"
17601"lies project</link> and ask to have your program added to the <link xlink:"
17602"href=\"http://l10n.gnome.org/module/\">list of modules to translate</link>."
8583msgstr ""17603msgstr ""
nn17604"Sättet detta fungerar är att du kan placera din källkod i ett git-förråd där "
17605"översättare kan komma åt den, och sedan kontakta sändlistan gnome-i18n och "
17606"be att ditt program ska läggas till i <link xlink:href=\"http://l10n.gnome."
17607"org/module/\">listan över moduler att översätta</link>."
858417608
8585#. (itstool) path: section/para17609#. (itstool) path: section/para
8586#: C/index-in.docbook:760917610#: C/index-in.docbook:7609
n8587msgid "Then you make sure you update the file <filename>POTFILES.in</filename> in17611#, fuzzy
>n the <filename>po/</filename> subdirectory (<command>intltool-update -m</comman 
>d> can help with this) so that the translators always access updated <filename>m 
>yprogram.pot</filename> files, and simply freeze the strings at least a couple o 
>f days before you make a new release. Depending on the number of strings your pr 
>ogram contains and how popular it is, the translations will then start to tick i 
>n as <filename>.po</filename> files." 
17612#| msgid ""
17613#| "Then you make sure you update the file <filename>POTFILES.in</filename> "
17614#| "in the <filename>po/</filename> subdirectory (<command>intltool-update -"
17615#| "m</command> can help with this) so that the translators always access "
17616#| "updated <filename>myprogram.pot</filename> files, and simply freeze the "
17617#| "strings at least a couple of days before you make a new release, "
17618#| "announcing it on gnome-i18n. Depending on the number of strings your "
17619#| "program contains and how popular it is, the translations will then start "
17620#| "to tick in as <filename>languagename.po</filename> files."
17621msgid ""
17622"Then you make sure you update the file <filename>POTFILES.in</filename> in "
17623"the <filename>po/</filename> subdirectory (<command>intltool-update -m</"
17624"command> can help with this) so that the translators always access updated "
17625"<filename>myprogram.pot</filename> files, and simply freeze the strings at "
17626"least a couple of days before you make a new release. Depending on the "
17627"number of strings your program contains and how popular it is, the "
17628"translations will then start to tick in as <filename>.po</filename> files."
8588msgstr ""17629msgstr ""
nn17630"Sedan ser du till att du uppdaterar filen <filename>POTFILES.in</filename> i "
17631"underkatalogen <filename>po/</filename> (<command>intltool-update -m</"
17632"command> kan hjälpa dig med detta) så att översättarna alltid kommer åt "
17633"uppdaterade <filename>mittprogram.pot</filename>-filer, och fryser helt "
17634"enkelt strängarna åtminstone några dagar innan du släpper en ny utgåva, och "
17635"meddelar det på gnome-i18n. Beroende på antalet strängar ditt program "
17636"innehåller och på hur populärt det är kommer sedan översättningarna börja "
17637"rassla in som <filename>språknamn.po</filename>-filer."
858917638
8590#. (itstool) path: section/para17639#. (itstool) path: section/para
8591#: C/index-in.docbook:762117640#: C/index-in.docbook:7621
n8592msgid "Note that most language teams only consist of 1-3 persons, so if your pron17641msgid ""
>gram contains a lot of strings, it might last a while before anyone has the time 
> to look at it. Also, most translators do not want to waste their time (translat 
>ing is a very time-consuming task) so if they do not assess your project as bein 
>g really serious (in the sense that it is polished and being maintained) they ma 
>y decide to spend their time on some other project." 
17642"Note that most language teams only consist of 1-3 persons, so if your "
17643"program contains a lot of strings, it might last a while before anyone has "
17644"the time to look at it. Also, most translators do not want to waste their "
17645"time (translating is a very time-consuming task) so if they do not assess "
17646"your project as being really serious (in the sense that it is polished and "
17647"being maintained) they may decide to spend their time on some other project."
8593msgstr ""17648msgstr ""
nn17649"Observera att de flesta språkgrupperna endast består av 1-3 personer, så om "
17650"ditt program innehåller många strängar kan det dröja länge innan någon har "
17651"tid att titta på det. De flesta översättare vill heller inte slösa bort sin "
17652"tid (översättning är en väldigt tidskrävande uppgift) så om de inte bedömer "
17653"ditt projekt som seriöst (i betydelsen att det är välpolerat och underhålls) "
17654"så kan de bestämma sig för att lägga sin tid på något annat projekt."
859417655
8595#. (itstool) path: section/para17656#. (itstool) path: section/para
8596#: C/index-in.docbook:763417657#: C/index-in.docbook:7634
n8597msgid "Here is a simple example with translatable strings in <phrase role=\"nowrn17658msgid ""
>ap\">C++</phrase> code. It shows what you can do if you don't use autotools or < 
>application>meson</application>. It is also an example of using the <classname>G 
>tk::TextView</classname> widget." 
17659"Here is a simple example with translatable strings in <phrase "
17660"role=\"nowrap\">C++</phrase> code. It shows what you can do if you don't use "
17661"autotools or <application>meson</application>. It is also an example of "
17662"using the <classname>Gtk::TextView</classname> widget."
8598msgstr ""17663msgstr ""
859917664
8600#. (itstool) path: section/para17665#. (itstool) path: section/para
8601#: C/index-in.docbook:763817666#: C/index-in.docbook:7638
n8602msgid "This program can set the locale, if it's specified in a configuration filn17667msgid ""
>e. This is not normal behavior. Most programs accept the locale that the user ha 
>s selected, for instance with an environment variable." 
17668"This program can set the locale, if it's specified in a configuration file. "
17669"This is not normal behavior. Most programs accept the locale that the user "
17670"has selected, for instance with an environment variable."
8603msgstr ""17671msgstr ""
860417672
8605#. (itstool) path: figure/title17673#. (itstool) path: figure/title
8606#: C/index-in.docbook:764317674#: C/index-in.docbook:7643
8607msgid "Translatable Strings"17675msgid "Translatable Strings"
8611#. This is a reference to an external file such as an image or video. When17679#. This is a reference to an external file such as an image or video. When
8612#. the file changes, the md5 hash will change to let you know you need to17680#. the file changes, the md5 hash will change to let you know you need to
8613#. update your localized copy. The msgstr is not used at all. Set it to17681#. update your localized copy. The msgstr is not used at all. Set it to
8614#. whatever you like once you have updated your copy of the file.17682#. whatever you like once you have updated your copy of the file.
8615#: C/index-in.docbook:764517683#: C/index-in.docbook:7645
nn17684#, fuzzy
8616msgctxt "_"17685msgctxt "_"
8617msgid "external ref='figures/i18n.png' md5='d9568b819575c6cadd8a45b8149ec533'"17686msgid "external ref='figures/i18n.png' md5='d9568b819575c6cadd8a45b8149ec533'"
8618msgstr ""17687msgstr ""
nn17688"external ref='figures/entry_icon.png' md5='fb1db5f1b82bb2849d352170ada89191'"
861917689
8620#. (itstool) path: section/para17690#. (itstool) path: section/para
8621#: C/index-in.docbook:764917691#: C/index-in.docbook:7649
n8622msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren17692#, fuzzy
>e/master/examples/book/i18n\">Source Code</link>" 
17693#| msgid ""
17694#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
17695#| "tree/master/examples/book/input/\">Source Code</link>"
17696msgid ""
17697"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
17698"master/examples/book/i18n\">Source Code</link>"
8623msgstr ""17699msgstr ""
nn17700"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
17701"master/examples/book/input/\">Källkod</link>"
862417702
8625#. (itstool) path: chapter/title17703#. (itstool) path: chapter/title
8626#. (itstool) path: section/title17704#. (itstool) path: section/title
n8627#: C/index-in.docbook:7654n17705#: C/index-in.docbook:7654 C/index-in.docbook:7736
8628#: C/index-in.docbook:7736
8629msgid "Custom Widgets"17706msgid "Custom Widgets"
n8630msgstr ""n17707msgstr "Anpassade komponenter"
863117708
8632#. (itstool) path: chapter/para17709#. (itstool) path: chapter/para
8633#: C/index-in.docbook:765617710#: C/index-in.docbook:7656
n8634msgid "<application>gtkmm</application> makes it very easy to derive new widgetsn17711#, fuzzy
> by inheriting from an existing widget class, either by deriving from a containe 
>r and adding child widgets, or by deriving from a single-item widget, and changi 
>ng its behavior. But you might occasionally find that no suitable starting point 
> already exists. In this case, you can implement a widget from scratch." 
17712msgid ""
17713"<application>gtkmm</application> makes it very easy to derive new widgets by "
17714"inheriting from an existing widget class, either by deriving from a "
17715"container and adding child widgets, or by deriving from a single-item "
17716"widget, and changing its behavior. But you might occasionally find that no "
17717"suitable starting point already exists. In this case, you can implement a "
17718"widget from scratch."
8635msgstr ""17719msgstr ""
nn17720"<application>gtkmm</application> gör det väldigt lätt att härleda nya "
17721"komponenter genom arv från en befintlig komponentklass, antingen genom att "
17722"härleda från en behållare och lägga till underordnade komponenter, eller "
17723"genom att härleda från en enobjektskomponent och ändra dess beteende. Men "
17724"emellanåt kan du upptäcka att ingen lämplig startpunkt finns. I så fall kan "
17725"du implementera en komponent från grunden."
863617726
8637#. (itstool) path: section/title17727#. (itstool) path: section/title
8638#: C/index-in.docbook:766317728#: C/index-in.docbook:7663
8639msgid "Custom Containers"17729msgid "Custom Containers"
n8640msgstr ""n17730msgstr "Anpassade behållare"
864117731
8642#. (itstool) path: listitem/para17732#. (itstool) path: listitem/para
8643#: C/index-in.docbook:766817733#: C/index-in.docbook:7668
n8644msgid "<methodname>get_request_mode_vfunc()</methodname>: Return what <literal>Gn17734msgid ""
>tk::SizeRequestMode</literal> is preferred by the container." 
17735"<methodname>get_request_mode_vfunc()</methodname>: Return what <literal>Gtk::"
17736"SizeRequestMode</literal> is preferred by the container."
8645msgstr ""17737msgstr ""
nn17738"<methodname>get_request_mode_vfunc()</methodname>: Returnera vilket "
17739"<literal>Gtk::SizeRequestMode</literal> som föredras av behållaren."
864617740
8647#. (itstool) path: listitem/para17741#. (itstool) path: listitem/para
8648#: C/index-in.docbook:766917742#: C/index-in.docbook:7669
nn17743#, fuzzy
17744msgid ""
8649msgid "<methodname>measure_vfunc()</methodname>: Calculate the minimum and natur17745"<methodname>measure_vfunc()</methodname>: Calculate the minimum and natural "
>al width or height of the container." 
17746"width or height of the container."
8650msgstr ""17747msgstr ""
nn17748"<methodname>measure_vfunc()</methodname>: Beräkna minsta och naturlig bredd "
17749"eller höjd på behållaren."
865117750
8652#. (itstool) path: listitem/para17751#. (itstool) path: listitem/para
8653#: C/index-in.docbook:767017752#: C/index-in.docbook:7670
n8654msgid "<methodname>size_allocate_vfunc()</methodname>: Position the child widgetn17753#, fuzzy
>s, given the height and width that the container has actually been given." 
17754msgid ""
17755"<methodname>size_allocate_vfunc()</methodname>: Position the child widgets, "
17756"given the height and width that the container has actually been given."
8655msgstr ""17757msgstr ""
nn17758"<methodname>size_allocate_vfunc()</methodname>: Positionera de underordnade "
17759"komponenterna, givet höjden och bredden som behållaren faktiskt givits."
865617760
8657#. (itstool) path: section/para17761#. (itstool) path: section/para
8658#: C/index-in.docbook:766517762#: C/index-in.docbook:7665
n8659msgid "When deriving a custom container widget directly from <classname>Gtk::Widn17763#, fuzzy
>get</classname>, you should override the following virtual methods: <_:itemizedl 
>ist-1/>" 
17764msgid ""
17765"When deriving a custom container widget directly from <classname>Gtk::"
17766"Widget</classname>, you should override the following virtual methods: <_:"
17767"itemizedlist-1/>"
8660msgstr ""17768msgstr ""
nn17769"När du härleder en anpassad behållarkomponent direkt från <classname>Gtk::"
17770"Widget</classname> bör du åsidosätta följande virtuella metoder: <_:"
17771"itemizedlist-1/>"
866117772
8662#. (itstool) path: section/para17773#. (itstool) path: section/para
8663#: C/index-in.docbook:767417774#: C/index-in.docbook:7674
n8664msgid "The <methodname>get_request_mode_vfunc()</methodname>, <methodname>measurn17775#, fuzzy
>e_vfunc()</methodname>, and <methodname>size_allocate_vfunc()</methodname> virtu 
>al methods control the layout of the child widgets. For instance, if your contai 
>ner has 2 child widgets, with one below the other, your <methodname>get_request_ 
>mode_vfunc()</methodname> might request height-for-width layout. Then your <meth 
>odname>measure_vfunc()</methodname> might report the maximum of the widths of th 
>e child widgets when asked to report width, and it might report the sum of their 
> heights when asked to report height. If you want padding between the child widg 
>ets then you would add that to the width and height too. Your widget's container 
> will use this result to ensure that your widget gets enough space, and not less 
>. By examining each widget's parent, and its parent, this logic will eventually  
>decide the size of the top-level window." 
17776msgid ""
17777"The <methodname>get_request_mode_vfunc()</methodname>, "
17778"<methodname>measure_vfunc()</methodname>, and "
17779"<methodname>size_allocate_vfunc()</methodname> virtual methods control the "
17780"layout of the child widgets. For instance, if your container has 2 child "
17781"widgets, with one below the other, your "
17782"<methodname>get_request_mode_vfunc()</methodname> might request height-for-"
17783"width layout. Then your <methodname>measure_vfunc()</methodname> might "
17784"report the maximum of the widths of the child widgets when asked to report "
17785"width, and it might report the sum of their heights when asked to report "
17786"height. If you want padding between the child widgets then you would add "
17787"that to the width and height too. Your widget's container will use this "
17788"result to ensure that your widget gets enough space, and not less. By "
17789"examining each widget's parent, and its parent, this logic will eventually "
17790"decide the size of the top-level window."
8665msgstr ""17791msgstr ""
nn17792"De virtuella metoderna <methodname>get_request_mode_vfunc()</methodname>, "
17793"<methodname>measure_vfunc()</methodname> och "
17794"<methodname>size_allocate_vfunc()</methodname> styr layouten för de "
17795"underordnade komponenterna. Om exempelvis din behållare har 2 underordnade "
17796"komponenter, en under den andra, kanske din "
17797"<methodname>get_request_mode_vfunc()</methodname> begär layouten height-for-"
17798"width. Då kanske din <methodname>measure_vfunc()</methodname> rapporterar "
17799"maximum av bredderna för de underordnade komponenterna då den ombes "
17800"rapportera bredd, och rapportera summan av deras höjder då den ombes "
17801"rapportera höjd. Om du vill ha utfyllnad mellan de underordnade "
17802"komponenterna ska du lägga till även det till bredden och höjden. Din "
17803"komponents behållare kommer använda detta resultat för att säkerställa att "
17804"din komponent från tillräckligt utrymme och inte mindre än så. Genom att "
17805"undersöka varje komponents överordnad, och dess överordnad, kommer denna "
17806"logik i slutändan bestämma storleken på toppnivåfönstret."
866617807
8667#. (itstool) path: section/para17808#. (itstool) path: section/para
8668#: C/index-in.docbook:769117809#: C/index-in.docbook:7691
n8669msgid "You are not guaranteed to get the <literal>Gtk::SizeRequestMode</literal>n17810#, fuzzy
> that you request. Therefore <methodname>measure_vfunc()</methodname> must retur 
>n sensible values for all reasonable values of its input parameters. For a descr 
>iption of <methodname>measure_vfunc()</methodname>'s parameters see also the des 
>cription of <methodname>Gtk::Widget::measure()</methodname>, which may be better 
> documented than <methodname>measure_vfunc()</methodname>." 
17811msgid ""
17812"You are not guaranteed to get the <literal>Gtk::SizeRequestMode</literal> "
17813"that you request. Therefore <methodname>measure_vfunc()</methodname> must "
17814"return sensible values for all reasonable values of its input parameters. "
17815"For a description of <methodname>measure_vfunc()</methodname>'s parameters "
17816"see also the description of <methodname>Gtk::Widget::measure()</methodname>, "
17817"which may be better documented than <methodname>measure_vfunc()</methodname>."
8670msgstr ""17818msgstr ""
nn17819"Du är inte garanterad att få det <literal>Gtk::SizeRequestMode</literal> som "
17820"du begär. Därför måste <methodname>measure_vfunc()</methodname> returnera "
17821"rimliga värden för alla vettiga värden på dess indataparametrar. För en "
17822"beskrivning av <methodname>measure_vfunc()</methodname>:s parametrar kan du "
17823"även se beskrivningen av <methodname>Gtk::Widget::measure()</methodname>, "
17824"som kan vara bättre dokumenterad än <methodname>measure_vfunc()</methodname>."
867117825
8672#. (itstool) path: section/para17826#. (itstool) path: section/para
8673#: C/index-in.docbook:769817827#: C/index-in.docbook:7698
n8674msgid "<methodname>size_allocate_vfunc()</methodname> receives the actual heightn17828#, fuzzy
> and width that the parent container has decided to give to your widget. This mi 
>ght be more than the minimum, or even more than the natural size, for instance i 
>f the top-level window has been expanded. You might choose to ignore the extra s 
>pace and leave a blank area, or you might choose to expand your child widgets to 
> fill the space, or you might choose to expand the padding between your widgets. 
> It's your container, so you decide." 
17829msgid ""
17830"<methodname>size_allocate_vfunc()</methodname> receives the actual height "
17831"and width that the parent container has decided to give to your widget. This "
17832"might be more than the minimum, or even more than the natural size, for "
17833"instance if the top-level window has been expanded. You might choose to "
17834"ignore the extra space and leave a blank area, or you might choose to expand "
17835"your child widgets to fill the space, or you might choose to expand the "
17836"padding between your widgets. It's your container, so you decide."
8675msgstr ""17837msgstr ""
nn17838"<methodname>size_allocate_vfunc()</methodname> tar emot den faktiska höjden "
17839"och bredden som den överordnade behållaren bestämt sig för att ge din "
17840"komponent. Detta kan vara mer än minimum, eller till och med mer än den "
17841"naturliga storleken, exempelvis om toppnivåfönstret har expanderats. Du kan "
17842"välja att ignorera det extra utrymmet och lämna tomt utrymme, eller så kan "
17843"du välja att expandera dina underordnade komponenter så de fyller utrymmet, "
17844"eller så kan du välja att expandera utfyllnaden mellan dina komponenter. Det "
17845"är din behållare, så valet är ditt."
867617846
8677#. (itstool) path: section/para17847#. (itstool) path: section/para
8678#: C/index-in.docbook:770717848#: C/index-in.docbook:7707
n8679msgid "Your container must unparent its children before the underlying C object n17849#, fuzzy
>(a <classname>gtkmm__GtkWidget</classname>) is finalized. If your container is u 
>sed as a managed widget, it shall unparent its children in a <methodname>Gtk::Wi 
>dget::signal_destroy()</methodname> handler (available since <application>gtkmm< 
>/application> 4.8). If your container is not managed, that signal handler is not 
> called. Instead the children shall be unparented in the <phrase role=\"nowrap\" 
>>C++</phrase> destructor. If you want your container to be useful both ways, unp 
>arent the children both in the destructor and in a signal handler. See the examp 
>le code." 
17850msgid ""
17851"Your container must unparent its children before the underlying C object (a "
17852"<classname>gtkmm__GtkWidget</classname>) is finalized. If your container is "
17853"used as a managed widget, it shall unparent its children in a "
17854"<methodname>Gtk::Widget::signal_destroy()</methodname> handler (available "
17855"since <application>gtkmm</application> 4.8). If your container is not "
17856"managed, that signal handler is not called. Instead the children shall be "
17857"unparented in the <phrase role=\"nowrap\">C++</phrase> destructor. If you "
17858"want your container to be useful both ways, unparent the children both in "
17859"the destructor and in a signal handler. See the example code."
8680msgstr ""17860msgstr ""
nn17861"Din behållare måste avföräldra sina underordnade innan det underliggande C-"
17862"objektet (en <classname>gtkmm__GtkWidget</classname>) finaliseras. Om din "
17863"behållare används som en hanterad komponent ska den avföräldra sina "
17864"underordnade i en <methodname>Gtk::Widget::signal_destroy()</methodname>-"
17865"hanterare (tillgänglig sedan <application>gtkmm</application> 4.8.0). Om din "
17866"behållare inte hanteras anropas inte den signalhanteraren. I stället ska de "
17867"underordnade avföräldras i C++-destruktorn. Om du vill att din behållare ska "
17868"bara användbar på båda sätt så avföräldrar du de underordnade både i "
17869"destruktorn och i en signalhanterare. Se exempelkoden."
868117870
8682#. (itstool) path: section/para17871#. (itstool) path: section/para
8683#: C/index-in.docbook:771917872#: C/index-in.docbook:7719
n8684msgid "This example implements a container with child widgets, one above the othn17873#, fuzzy
>er. Of course, in this case it would be far simpler just to use a vertical <clas 
>sname>Gtk::Box</classname> or <classname>Gtk::Grid</classname>." 
17874msgid ""
17875"This example implements a container with child widgets, one above the other. "
17876"Of course, in this case it would be far simpler just to use a vertical "
17877"<classname>Gtk::Box</classname> or <classname>Gtk::Grid</classname>."
8685msgstr ""17878msgstr ""
nn17879"Detta exempel implementerar en behållare med två underordnade komponenter, "
17880"en ovanför den andra. I detta fall skulle det förstås vara mycket enklare "
17881"att bara använda en vertikal <classname>Gtk::Box</classname> eller "
17882"<classname>Gtk::Grid</classname>."
868617883
8687#. (itstool) path: figure/title17884#. (itstool) path: figure/title
8688#: C/index-in.docbook:772417885#: C/index-in.docbook:7724
8689msgid "Custom Container"17886msgid "Custom Container"
n8690msgstr ""n17887msgstr "Anpassad behållare"
869117888
8692#. (itstool) path: imageobject/imagedata17889#. (itstool) path: imageobject/imagedata
8693#. This is a reference to an external file such as an image or video. When17890#. This is a reference to an external file such as an image or video. When
8694#. the file changes, the md5 hash will change to let you know you need to17891#. the file changes, the md5 hash will change to let you know you need to
8695#. update your localized copy. The msgstr is not used at all. Set it to17892#. update your localized copy. The msgstr is not used at all. Set it to
8696#. whatever you like once you have updated your copy of the file.17893#. whatever you like once you have updated your copy of the file.
8697#: C/index-in.docbook:772617894#: C/index-in.docbook:7726
nn17895#, fuzzy
8698msgctxt "_"17896msgctxt "_"
n8699msgid "external ref='figures/custom_container.png' md5='865833944746eeb806eae028n17897msgid ""
>f0b2a25b'" 
17898"external ref='figures/custom_container.png' "
17899"md5='865833944746eeb806eae028f0b2a25b'"
8700msgstr ""17900msgstr ""
nn17901"external ref='figures/custom_container.png' "
17902"md5='5b4ae318725b6efbf5c6e1f7c94e6e04'"
870117903
8702#. (itstool) path: section/para17904#. (itstool) path: section/para
8703#: C/index-in.docbook:773017905#: C/index-in.docbook:7730
n8704msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren17906msgid ""
>e/master/examples/book/custom/custom_container/\">Source Code</link>" 
17907"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
17908"master/examples/book/custom/custom_container/\">Source Code</link>"
8705msgstr ""17909msgstr ""
nn17910"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
17911"master/examples/book/custom/custom_container/\">Källkod</link>"
870617912
8707#. (itstool) path: section/para17913#. (itstool) path: section/para
8708#: C/index-in.docbook:773817914#: C/index-in.docbook:7738
n8709msgid "By deriving directly from <classname>Gtk::Widget</classname> you can do an17915#, fuzzy
>ll the drawing for your widget directly, instead of just arranging child widgets 
>. For instance, a <classname>Gtk::Label</classname> draws the text of the label, 
> but does not do this by using other widgets." 
17916msgid ""
17917"By deriving directly from <classname>Gtk::Widget</classname> you can do all "
17918"the drawing for your widget directly, instead of just arranging child "
17919"widgets. For instance, a <classname>Gtk::Label</classname> draws the text of "
17920"the label, but does not do this by using other widgets."
8710msgstr ""17921msgstr ""
nn17922"Genom att härleda direkt från <classname>Gtk::Widget</classname> kan du göra "
17923"all ritning för din komponent direkt i stället för att bara arrangera "
17924"underordnade komponenter. Exempelvis ritar en <classname>Gtk::Label</"
17925"classname> texten för etiketten, men gör inte detta genom att använda andra "
17926"komponenter."
871117927
8712#. (itstool) path: listitem/para17928#. (itstool) path: listitem/para
8713#: C/index-in.docbook:774917929#: C/index-in.docbook:7749
n8714msgid "<methodname>get_request_mode_vfunc()</methodname>: (optional) Return whatn17930#, fuzzy
> <literal>Gtk::SizeRequestMode</literal> is preferred by the widget." 
17931msgid ""
17932"<methodname>get_request_mode_vfunc()</methodname>: (optional) Return what "
17933"<literal>Gtk::SizeRequestMode</literal> is preferred by the widget."
8715msgstr ""17934msgstr ""
nn17935"<methodname>get_request_mode_vfunc()</methodname>: (valfri) Returnera vilket "
17936"<literal>Gtk::SizeRequestMode</literal> som föredras av komponenten."
871617937
8717#. (itstool) path: listitem/para17938#. (itstool) path: listitem/para
8718#: C/index-in.docbook:775017939#: C/index-in.docbook:7750
nn17940#, fuzzy
17941msgid ""
8719msgid "<methodname>measure_vfunc()</methodname>: Calculate the minimum and natur17942"<methodname>measure_vfunc()</methodname>: Calculate the minimum and natural "
>al width or height of the widget." 
17943"width or height of the widget."
8720msgstr ""17944msgstr ""
nn17945"<methodname>measure_vfunc()</methodname>: Beräkna den minsta och naturliga "
17946"bredden eller höjden för komponenten."
872117947
8722#. (itstool) path: listitem/para17948#. (itstool) path: listitem/para
8723#: C/index-in.docbook:775117949#: C/index-in.docbook:7751
n8724msgid "<methodname>size_allocate_vfunc()</methodname>: (optional) Position the wn17950#, fuzzy
>idget, given the height and width that it has actually been given." 
17951msgid ""
17952"<methodname>size_allocate_vfunc()</methodname>: (optional) Position the "
17953"widget, given the height and width that it has actually been given."
8725msgstr ""17954msgstr ""
nn17955"<methodname>size_allocate_vfunc()</methodname>: (valfri) Positionera "
17956"komponenten, givet den höjd och bredd som den faktiskt har givits."
872617957
8727#. (itstool) path: listitem/para17958#. (itstool) path: listitem/para
8728#: C/index-in.docbook:775217959#: C/index-in.docbook:7752
8729msgid "<methodname>on_realize()</methodname>: (optional)"17960msgid "<methodname>on_realize()</methodname>: (optional)"
n8730msgstr ""n17961msgstr "<methodname>on_realize()</methodname>: (valfri)"
873117962
8732#. (itstool) path: listitem/para17963#. (itstool) path: listitem/para
8733#: C/index-in.docbook:775317964#: C/index-in.docbook:7753
8734msgid "<methodname>on_unrealize()</methodname>: (optional)"17965msgid "<methodname>on_unrealize()</methodname>: (optional)"
n8735msgstr ""n17966msgstr "<methodname>on_unrealize()</methodname>: (valfri)"
873617967
8737#. (itstool) path: listitem/para17968#. (itstool) path: listitem/para
8738#: C/index-in.docbook:775417969#: C/index-in.docbook:7754
8739msgid "<methodname>on_map()</methodname>: (optional)"17970msgid "<methodname>on_map()</methodname>: (optional)"
n8740msgstr ""n17971msgstr "<methodname>on_map()</methodname>: (valfri)"
874117972
8742#. (itstool) path: listitem/para17973#. (itstool) path: listitem/para
8743#: C/index-in.docbook:775517974#: C/index-in.docbook:7755
8744msgid "<methodname>on_unmap()</methodname>: (optional)"17975msgid "<methodname>on_unmap()</methodname>: (optional)"
n8745msgstr ""n17976msgstr "<methodname>on_unmap()</methodname>: (valfri)"
874617977
8747#. (itstool) path: listitem/para17978#. (itstool) path: listitem/para
8748#: C/index-in.docbook:775617979#: C/index-in.docbook:7756
n8749msgid "<methodname>snapshot_vfunc()</methodname>: Create a render node, e.g. a <n17980#, fuzzy
>classname>Cairo::Context</classname> node, and draw on it." 
17981msgid ""
17982"<methodname>snapshot_vfunc()</methodname>: Create a render node, e.g. a "
17983"<classname>Cairo::Context</classname> node, and draw on it."
8750msgstr ""17984msgstr ""
nn17985"<methodname>snapshot_vfunc()</methodname>: Skapa en renderingsnod, t.ex. en "
17986"<classname>Cairo::Context</classname>-nod, och rita på den."
875117987
8752#. (itstool) path: section/para17988#. (itstool) path: section/para
8753#: C/index-in.docbook:774417989#: C/index-in.docbook:7744
n8754msgid "When deriving from <classname>Gtk::Widget</classname>, you should overridn17990#, fuzzy
>e the following virtual methods. The methods marked (optional) need not be overr 
>idden in all custom widgets. The base class's methods may be appropriate. <_:ite 
>mizedlist-1/>" 
17991msgid ""
17992"When deriving from <classname>Gtk::Widget</classname>, you should override "
17993"the following virtual methods. The methods marked (optional) need not be "
17994"overridden in all custom widgets. The base class's methods may be "
17995"appropriate. <_:itemizedlist-1/>"
8755msgstr ""17996msgstr ""
nn17997"När du härleder från <classname>Gtk::Widget</classname> bör du åsidosätta "
17998"följande virtuella metoder. Metoderna som markerats (valfri) behöver inte "
17999"åsidosättas i alla anpassade komponenter. Basklassens metoder kan vara "
18000"lämpliga. <_:itemizedlist-1/>"
875618001
8757#. (itstool) path: section/para18002#. (itstool) path: section/para
8758#: C/index-in.docbook:776018003#: C/index-in.docbook:7760
n8759msgid "The first 3 methods in the previous table are also overridden in custom cn18004#, fuzzy
>ontainers. They are briefly described in the <link linkend=\"sec-custom-containe 
>rs\">Custom Containers</link> section." 
18005msgid ""
18006"The first 3 methods in the previous table are also overridden in custom "
18007"containers. They are briefly described in the <link linkend=\"sec-custom-"
18008"containers\">Custom Containers</link> section."
8760msgstr ""18009msgstr ""
nn18010"De tre första metoderna i föregående tabell åsidosätts också i anpassade "
18011"behållare. De beskrivs kort i avsnittet <link linkend=\"sec-custom-"
18012"containers\">Anpassade behållare</link>."
876118013
8762#. (itstool) path: section/title18014#. (itstool) path: section/title
8763#: C/index-in.docbook:776618015#: C/index-in.docbook:7766
nn18016#, fuzzy
8764msgid "Class Init and Instance Init Functions"18017msgid "Class Init and Instance Init Functions"
n8765msgstr ""n18018msgstr "Initieringsfunktioner för klasser och instanser"
876618019
8767#. (itstool) path: section/para18020#. (itstool) path: section/para
8768#: C/index-in.docbook:776818021#: C/index-in.docbook:7768
n8769msgid "Some <application>GTK</application> functions, if called at all, must be n18022#, fuzzy
>called from the class init function. Some other <application>GTK</application> f 
>unctions, if called, must be called from the instance init function. If your cus 
>tom widget must call any of those functions, you can derive a class from <classn 
>ame>Glib::ExtraClassInit</classname> and derive your custom class from that clas 
>s. The <link linkend=\"custom-css-name-example\">custom CSS name example</link>  
>shows how that's done." 
18023msgid ""
18024"Some <application>GTK</application> functions, if called at all, must be "
18025"called from the class init function. Some other <application>GTK</"
18026"application> functions, if called, must be called from the instance init "
18027"function. If your custom widget must call any of those functions, you can "
18028"derive a class from <classname>Glib::ExtraClassInit</classname> and derive "
18029"your custom class from that class. The <link linkend=\"custom-css-name-"
18030"example\">custom CSS name example</link> shows how that's done."
8770msgstr ""18031msgstr ""
nn18032"Vissa <application>GTK</application>-funktioner måste, om de anropas över "
18033"huvud taget, anropas från klassens init-funktion. Några andra "
18034"<application>GTK</application>-funktioner måste, om de anropas, anropas från "
18035"instansens init-funktion. Om din anpassade komponent måste anropa någon av "
18036"dessa funktioner kan du härleda en klass från <classname>Glib::"
18037"ExtraClassInit</classname> och härleda din anpassade klass från den klassen. "
18038"Exemplet för <link linkend=\"custom-css-name-example\">anpassat CSS-namn</"
18039"link> visar hur detta görs."
877118040
8772#. (itstool) path: section/para18041#. (itstool) path: section/para
8773#: C/index-in.docbook:778018042#: C/index-in.docbook:7780
8774msgid "This example implements a widget which draws Penrose triangles."18043msgid "This example implements a widget which draws Penrose triangles."
n8775msgstr ""n18044msgstr "Detta exempel implementerar en komponent som ritar Penrose-trianglar."
877618045
8777#. (itstool) path: figure/title18046#. (itstool) path: figure/title
8778#: C/index-in.docbook:778318047#: C/index-in.docbook:7783
8779msgid "Custom Widget"18048msgid "Custom Widget"
n8780msgstr ""n18049msgstr "Anpassad komponent"
878118050
8782#. (itstool) path: imageobject/imagedata18051#. (itstool) path: imageobject/imagedata
8783#. This is a reference to an external file such as an image or video. When18052#. This is a reference to an external file such as an image or video. When
8784#. the file changes, the md5 hash will change to let you know you need to18053#. the file changes, the md5 hash will change to let you know you need to
8785#. update your localized copy. The msgstr is not used at all. Set it to18054#. update your localized copy. The msgstr is not used at all. Set it to
8786#. whatever you like once you have updated your copy of the file.18055#. whatever you like once you have updated your copy of the file.
8787#: C/index-in.docbook:778518056#: C/index-in.docbook:7785
nn18057#, fuzzy
8788msgctxt "_"18058msgctxt "_"
n8789msgid "external ref='figures/custom_widget.png' md5='30f9b406a95d5b0d17b6fc081c3n18059msgid ""
>59b98'" 
18060"external ref='figures/custom_widget.png' "
18061"md5='30f9b406a95d5b0d17b6fc081c359b98'"
8790msgstr ""18062msgstr ""
nn18063"external ref='figures/custom_widget.png' "
18064"md5='30f9b406a95d5b0d17b6fc081c359b98'"
879118065
8792#. (itstool) path: section/para18066#. (itstool) path: section/para
8793#: C/index-in.docbook:778918067#: C/index-in.docbook:7789
n8794msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren18068msgid ""
>e/master/examples/book/custom/custom_widget/\">Source Code</link>" 
18069"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
18070"master/examples/book/custom/custom_widget/\">Source Code</link>"
8795msgstr ""18071msgstr ""
nn18072"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
18073"master/examples/book/custom/custom_widget/\">Källkod</link>"
879618074
8797#. (itstool) path: section/title18075#. (itstool) path: section/title
8798#: C/index-in.docbook:779418076#: C/index-in.docbook:7794
8799msgid "Custom CSS Names"18077msgid "Custom CSS Names"
n8800msgstr ""n18078msgstr "Anpassade CSS-namn"
880118079
nn18080# TODO: controlled
8802#. (itstool) path: section/para18081#. (itstool) path: section/para
8803#: C/index-in.docbook:779618082#: C/index-in.docbook:7796
n8804msgid "Many aspects of the look of widgets are controlled by CSS (Cascading Styln18083#, fuzzy
>e Sheet) files. With CSS files you can choose color, font, line thickness, etc.  
>If you give some widgets their own names or their own CSS classes, you can defin 
>e CSS rules that apply only to those widgets, for instance certain buttons, with 
>out affecting other similar widgets." 
18084msgid ""
18085"Many aspects of the look of widgets are controlled by CSS (Cascading Style "
18086"Sheet) files. With CSS files you can choose color, font, line thickness, "
18087"etc. If you give some widgets their own names or their own CSS classes, you "
18088"can define CSS rules that apply only to those widgets, for instance certain "
18089"buttons, without affecting other similar widgets."
8805msgstr ""18090msgstr ""
nn18091"Många aspekter hos komponenters utseende styrs av CSS-filer (Cascading Style "
18092"Sheet). Med CSS-filer kan du välja färg, typsnitt, radtjocklek och så "
18093"vidare. Om du ger några komponenter egna namn så kan du definiera CSS-regler "
18094"som endast tillämpas på dessa komponenter, exempelvis vissa knappar, utan "
18095"att påverka andra liknande komponenter."
880618096
8807#. (itstool) path: section/title18097#. (itstool) path: section/title
8808#: C/index-in.docbook:780318098#: C/index-in.docbook:7803
8809msgid "CSS Node Name, Widget Name, CSS Class Name"18099msgid "CSS Node Name, Widget Name, CSS Class Name"
n8810msgstr ""n18100msgstr "CSS-nodnamn, Komponentnamn, CSS-klassnamn"
881118101
8812#. (itstool) path: listitem/para18102#. (itstool) path: listitem/para
8813#: C/index-in.docbook:780718103#: C/index-in.docbook:7807
n8814msgid "<methodname>gtk_widget_class_set_css_name()</methodname> can only be calln18104#, fuzzy
>ed from the class init function. It sets the CSS node name of all instances of a 
> class (a GType). See the <link linkend=\"custom-init-functions\"> Class Init an 
>d Instance Init Functions</link> section." 
18105msgid ""
18106"<methodname>gtk_widget_class_set_css_name()</methodname> can only be called "
18107"from the class init function. It sets the CSS node name of all instances of "
18108"a class (a GType). See the <link linkend=\"custom-init-functions\"> Class "
18109"Init and Instance Init Functions</link> section."
8815msgstr ""18110msgstr ""
nn18111"<methodname>gtk_widget_class_set_css_name()</methodname> kan endast anropas "
18112"från klassens init-funktion. Den ställer in CSS-nodnamnet för alla instanser "
18113"av en klass (en GType). Se avsnittet <link linkend=\"custom-init-"
18114"functions\"> Initieringsfunktioner för klasser och instanser</link>."
881618115
8817#. (itstool) path: listitem/para18116#. (itstool) path: listitem/para
8818#: C/index-in.docbook:781118117#: C/index-in.docbook:7811
n8819msgid "<methodname>Gtk::Widget::set_name()</methodname> can be called from a <phn18118#, fuzzy
>rase role=\"nowrap\">C++</phrase> constructor. It sets the name of a widget inst 
>ance." 
18119#| msgid ""
18120#| "<methodname>Gtk::Widget::set_name()</methodname> can be called from a C++ "
18121#| "constructor. It sets the name of a widget instance."
18122msgid ""
18123"<methodname>Gtk::Widget::set_name()</methodname> can be called from a "
18124"<phrase role=\"nowrap\">C++</phrase> constructor. It sets the name of a "
18125"widget instance."
8820msgstr ""18126msgstr ""
nn18127"<methodname>Gtk::Widget::set_name()</methodname> kan anropas från en C++-"
18128"konstruktor. Den ställer in namnet för en komponentinstans."
882118129
8822#. (itstool) path: listitem/para18130#. (itstool) path: listitem/para
8823#: C/index-in.docbook:781418131#: C/index-in.docbook:7814
n8824msgid "<methodname>Gtk::Widget::add_class_name()</methodname> can be called fromn18132#, fuzzy
> a <phrase role=\"nowrap\">C++</phrase> constructor. It adds the name of a CSS c 
>lass, used by a widget instance." 
18133#| msgid ""
18134#| "<methodname>Gtk::Widget::add_class_name()</methodname> can be called from "
18135#| "a C++ constructor. It adds the name of a CSS class, used by a widget "
18136#| "instance."
18137msgid ""
18138"<methodname>Gtk::Widget::add_class_name()</methodname> can be called from a "
18139"<phrase role=\"nowrap\">C++</phrase> constructor. It adds the name of a CSS "
18140"class, used by a widget instance."
8825msgstr ""18141msgstr ""
nn18142"<methodname>Gtk::Widget::add_class_name()</methodname> kan anropas från en C+"
18143"+-konstruktor. Den lägger till namnet för en CSS-klass, använd av en "
18144"komponentinstans."
882618145
8827#. (itstool) path: section/para18146#. (itstool) path: section/para
8828#: C/index-in.docbook:780518147#: C/index-in.docbook:7805
n8829msgid "There are three ways of referring from a widget to data in a CSS file: <_n18148#, fuzzy
>:itemizedlist-1/> The following example shows a button with its own CSS node nam 
>e, a label with a widget name and a label that uses its own CSS class." 
18149msgid ""
18150"There are three ways of referring from a widget to data in a CSS file: <_:"
18151"itemizedlist-1/> The following example shows a button with its own CSS node "
18152"name, a label with a widget name and a label that uses its own CSS class."
8830msgstr ""18153msgstr ""
nn18154"Det finns tre sätt att referera från en komponent till data i en CSS-fil: <_:"
18155"itemizedlist-1/> Följande exempel visar en knapp med eget CSS-nodnamn, en "
18156"etikett med ett komponentnamn och en etikett som använder sin egen CSS-klass."
883118157
8832#. (itstool) path: section/title18158#. (itstool) path: section/title
8833#: C/index-in.docbook:782318159#: C/index-in.docbook:7823
8834msgid "Custom Style Information"18160msgid "Custom Style Information"
n8835msgstr ""n18161msgstr "Anpassad stilinformation"
883618162
8837#. (itstool) path: section/para18163#. (itstool) path: section/para
8838#: C/index-in.docbook:782518164#: C/index-in.docbook:7825
n8839msgid "To add a style sheet to an application, use one of the <methodname>Gtk::Cn18165msgid ""
>ssProvider::load_from_*()</methodname> methods. Then add it with <methodname>Gtk 
>::StyleProvider::add_provider_for_display()</methodname> (available since <appli 
>cation>gtkmm</application> 4.10) or <methodname>Gtk::StyleContext::add_provider_ 
>for_display()</methodname>. <classname>Gtk::StyleContext</classname> also contai 
>ns methods to read some style information, but this class is deprecated since <a 
>pplication>gtkmm</application> 4.10." 
18166"To add a style sheet to an application, use one of the <methodname>Gtk::"
18167"CssProvider::load_from_*()</methodname> methods. Then add it with "
18168"<methodname>Gtk::StyleProvider::add_provider_for_display()</methodname> "
18169"(available since <application>gtkmm</application> 4.10) or <methodname>Gtk::"
18170"StyleContext::add_provider_for_display()</methodname>. <classname>Gtk::"
18171"StyleContext</classname> also contains methods to read some style "
18172"information, but this class is deprecated since <application>gtkmm</"
18173"application> 4.10."
8840msgstr ""18174msgstr ""
nn18175"För att lägga till en stilmall till ett program använder du en av "
18176"<methodname>Gtk::CssProvider::load_from_*()</methodname>-metoderna. Lägg "
18177"sedan till den med <methodname>Gtk::StyleProvider::"
18178"add_provider_for_display()</methodname> (tillgänglig sedan "
18179"<application>gtkmm</application> 4.10) eller <methodname>Gtk::StyleContext::"
18180"add_provider_for_display()</methodname>. <classname>Gtk::StyleContext</"
18181"classname> innehåller också metoder för att läsa viss stilinformation, men "
18182"denna klass är föråldrad sedan <application>gtkmm</application> 4.10."
884118183
8842#. (itstool) path: section/para18184#. (itstool) path: section/para
8843#: C/index-in.docbook:783218185#: C/index-in.docbook:7832
8844msgid "CSS files are described in the documentation of GTK."18186msgid "CSS files are described in the documentation of GTK."
n8845msgstr ""n18187msgstr "CSS-filer beskrivs i dokumentationen för GTK."
884618188
8847#. (itstool) path: section/para18189#. (itstool) path: section/para
8848#: C/index-in.docbook:783818190#: C/index-in.docbook:7838
nn18191msgid ""
8849msgid "This example implements a button and two labels with custom style informa18192"This example implements a button and two labels with custom style "
>tion." 
18193"information."
8850msgstr ""18194msgstr ""
nn18195"Detta exempel implementerar en knapp och två etiketter med anpassad "
18196"stilinformation."
885118197
8852#. (itstool) path: figure/title18198#. (itstool) path: figure/title
8853#: C/index-in.docbook:784118199#: C/index-in.docbook:7841
nn18200#, fuzzy
8854msgid "Custom CSS Name"18201msgid "Custom CSS Name"
n8855msgstr ""n18202msgstr "Anpassat CSS-namn"
885618203
8857#. (itstool) path: imageobject/imagedata18204#. (itstool) path: imageobject/imagedata
8858#. This is a reference to an external file such as an image or video. When18205#. This is a reference to an external file such as an image or video. When
8859#. the file changes, the md5 hash will change to let you know you need to18206#. the file changes, the md5 hash will change to let you know you need to
8860#. update your localized copy. The msgstr is not used at all. Set it to18207#. update your localized copy. The msgstr is not used at all. Set it to
8861#. whatever you like once you have updated your copy of the file.18208#. whatever you like once you have updated your copy of the file.
8862#: C/index-in.docbook:784318209#: C/index-in.docbook:7843
nn18210#, fuzzy
8863msgctxt "_"18211msgctxt "_"
n8864msgid "external ref='figures/custom_css_name.png' md5='fb3d968b1fd40eb219e5a7894n18212msgid ""
>6adff0f'" 
18213"external ref='figures/custom_css_name.png' "
18214"md5='fb3d968b1fd40eb219e5a78946adff0f'"
8865msgstr ""18215msgstr ""
nn18216"external ref='figures/custom_css_name.png' "
18217"md5='fb3d968b1fd40eb219e5a78946adff0f'"
886618218
8867#. (itstool) path: section/para18219#. (itstool) path: section/para
8868#: C/index-in.docbook:784718220#: C/index-in.docbook:7847
n8869msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren18221msgid ""
>e/master/examples/book/custom/custom_css_name/\">Source Code</link>" 
18222"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
18223"master/examples/book/custom/custom_css_name/\">Source Code</link>"
8870msgstr ""18224msgstr ""
nn18225"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
18226"master/examples/book/custom/custom_css_name/\">Källkod</link>"
887118227
8872#. (itstool) path: chapter/title18228#. (itstool) path: chapter/title
8873#: C/index-in.docbook:785418229#: C/index-in.docbook:7854
8874msgid "Multi-threaded programs"18230msgid "Multi-threaded programs"
n8875msgstr ""n18231msgstr "Flertrådade program"
887618232
8877#. (itstool) path: section/title18233#. (itstool) path: section/title
8878#: C/index-in.docbook:785718234#: C/index-in.docbook:7857
8879msgid "The constraints"18235msgid "The constraints"
n8880msgstr ""n18236msgstr "Begränsningarna"
888118237
8882#. (itstool) path: footnote/para18238#. (itstool) path: footnote/para
8883#: C/index-in.docbook:786818239#: C/index-in.docbook:7868
n8884msgid "These interactions arise from the fact that, amongst other things, a clasn18240#, fuzzy
>s inheriting from <classname>sigc::trackable</classname> will, via that inherita 
>nce, have a <classname>std::list</classname> object keeping track of slots creat 
>ed by calls to <function>sigc::mem_fun()</function> representing any of its non- 
>static methods (more particularly it keeps a list of callbacks which will null t 
>he connected slots on its destruction). Each <classname>sigc::slot</classname> o 
>bject also keeps, via <classname>sigc::slot_rep</classname>, its own <classname> 
>sigc::trackable</classname> object to track any <classname>sigc::connection</cla 
>ssname> objects which it needs to inform about its demise, and also has a functi 
>on to deregister itself from any <classname>sigc::trackable</classname> on disco 
>nnection or destruction. <classname>sigc::signal</classname> objects also keep l 
>ists of slots, which will be updated by a call to their <methodname>connect()</m 
>ethodname> method or calls to any <classname>sigc::connection</classname> object 
> relating to such a connection." 
18241msgid ""
18242"These interactions arise from the fact that, amongst other things, a class "
18243"inheriting from <classname>sigc::trackable</classname> will, via that "
18244"inheritance, have a <classname>std::list</classname> object keeping track of "
18245"slots created by calls to <function>sigc::mem_fun()</function> representing "
18246"any of its non-static methods (more particularly it keeps a list of "
18247"callbacks which will null the connected slots on its destruction). Each "
18248"<classname>sigc::slot</classname> object also keeps, via <classname>sigc::"
18249"slot_rep</classname>, its own <classname>sigc::trackable</classname> object "
18250"to track any <classname>sigc::connection</classname> objects which it needs "
18251"to inform about its demise, and also has a function to deregister itself "
18252"from any <classname>sigc::trackable</classname> on disconnection or "
18253"destruction. <classname>sigc::signal</classname> objects also keep lists of "
18254"slots, which will be updated by a call to their <methodname>connect()</"
18255"methodname> method or calls to any <classname>sigc::connection</classname> "
18256"object relating to such a connection."
8885msgstr ""18257msgstr ""
nn18258"Dessa interaktioner kommer från det faktum att, bland annat, en klass som "
18259"ärver från <classname>sigc::trackable</classname> kommer via det arvet ha "
18260"ett <classname>std::list</classname>-objekt som håller koll på fack som "
18261"skapas av anrop till <function>sigc::mem_fun()</function> som representerar "
18262"dess icke-statiska metoder (mer specifikt behåller det en lista över "
18263"återanrop som kommer sätta de anslutna till facken till null vid dess "
18264"förstörelse). Varje <classname>sigc::slot</classname>-objekt behåller också, "
18265"via <classname>sigc::slot_rep</classname>, sitt eget <classname>sigc::"
18266"trackable</classname>-objekt för att spåra <classname>sigc::connection</"
18267"classname>-objekt som det behöver informera om sitt frånfälle, och också har "
18268"en funktion för att avregistrera sig själv från alla <classname>sigc::"
18269"trackable</classname> vid frånkopplande eller förstörelse. <classname>sigc::"
18270"signal</classname>-objekt behåller också en lista över fack som kommer "
18271"uppdateras av ett anrop till deras <methodname>connect()</methodname>-metod "
18272"eller anrop till <classname>sigc::connection</classname>-objekt som är "
18273"relaterade till en sådan anslutning."
888618274
8887#. (itstool) path: section/para18275#. (itstool) path: section/para
8888#: C/index-in.docbook:785918276#: C/index-in.docbook:7859
n8889msgid "Care is required when writing programs based on <application>gtkmm</applin18277#, fuzzy
>cation> using multiple threads of execution, arising from the fact that <applica 
>tion>libsigc++</application>, and in particular <classname>sigc::trackable</clas 
>sname>, are not thread-safe. That's because none of the complex interactions tha 
>t occur behind the scenes when using <application>libsigc++</application> are pr 
>otected by a mutex or other means of synchronization. <_:footnote-1/>" 
18278msgid ""
18279"Care is required when writing programs based on <application>gtkmm</"
18280"application> using multiple threads of execution, arising from the fact that "
18281"<application>libsigc++</application>, and in particular <classname>sigc::"
18282"trackable</classname>, are not thread-safe. That's because none of the "
18283"complex interactions that occur behind the scenes when using "
18284"<application>libsigc++</application> are protected by a mutex or other means "
18285"of synchronization. <_:footnote-1/>"
8890msgstr ""18286msgstr ""
nn18287"Omsorg krävs vid skrivning av program som är baserade på att "
18288"<application>gtkmm</application> använder flera exekveringstrådar, vilket "
18289"kommer från faktumet att <application>libsigc++</application>, och i "
18290"synnerhet <classname>sigc::trackable</classname>, inte är trådsäkert. Detta "
18291"är för att ingen av de komplexa interaktioner som sker bakom scenen när "
18292"<application>libsigc++</application> används skyddas av ett mutex eller "
18293"någon annan sorts synkronisering. <_:footnote-1/>"
889118294
8892#. (itstool) path: section/title18295#. (itstool) path: section/title
8893#: C/index-in.docbook:789218296#: C/index-in.docbook:7892
8894msgid "The rules"18297msgid "The rules"
n8895msgstr ""n18298msgstr "Reglerna"
889618299
8897#. (itstool) path: section/para18300#. (itstool) path: section/para
8898#: C/index-in.docbook:789418301#: C/index-in.docbook:7894
n8899msgid "This requires a number of rules to be observed when writing multi-threaden18302#, fuzzy
>d programs using <application>gtkmm</application>. These are set out below, but  
>one point to note is that extra care is required when deriving classes from <cla 
>ssname>sigc::trackable</classname>, because the effects are unintuitive (see par 
>ticularly points 4 and 5 below)." 
18303msgid ""
18304"This requires a number of rules to be observed when writing multi-threaded "
18305"programs using <application>gtkmm</application>. These are set out below, "
18306"but one point to note is that extra care is required when deriving classes "
18307"from <classname>sigc::trackable</classname>, because the effects are "
18308"unintuitive (see particularly points 4 and 5 below)."
8900msgstr ""18309msgstr ""
nn18310"Detta kräver att ett antal regler följs när flertrådade program skrivs med "
18311"<application>gtkmm</application>. Dessa beskrivs nedan, men punkt att notera "
18312"är att extra försiktighet krävs vid härledning av klasser från "
18313"<classname>sigc::trackable</classname> för att effekterna inte är intuitiva "
18314"(se främst punkterna 4 och 5 nedan)."
890118315
8902#. (itstool) path: listitem/para18316#. (itstool) path: listitem/para
8903#: C/index-in.docbook:790518317#: C/index-in.docbook:7905
n8904msgid "Use <classname>Glib::Dispatcher</classname> to invoke <application>gtkmm<n18318#, fuzzy
>/application> functions from worker threads (this is dealt with in more detail i 
>n the next section)." 
18319msgid ""
18320"Use <classname>Glib::Dispatcher</classname> to invoke <application>gtkmm</"
18321"application> functions from worker threads (this is dealt with in more "
18322"detail in the next section)."
8905msgstr ""18323msgstr ""
nn18324"Använd <classname>Glib::Dispatcher</classname> för att köra "
18325"<application>gtkmm</application>-funktioner från arbetartrådar (detta "
18326"hanteras mer detaljerat i nästa avsnitt)."
890618327
nn18328# TODO: operator() ?
8907#. (itstool) path: listitem/para18329#. (itstool) path: listitem/para
8908#: C/index-in.docbook:791318330#: C/index-in.docbook:7913
n8909msgid "A <classname>sigc::signal</classname> object should be regarded as owned n18331#, fuzzy
>by the thread which created it. Only that thread should connect a <classname>sig 
>c::slot</classname> object to the signal object, and only that thread should <me 
>thodname>emit()</methodname> or call <methodname>operator()()</methodname> on th 
>e signal, or null any connected <classname>sigc::slot</classname> object. It fol 
>lows (amongst other things) that any signal object provided by a <application>gt 
>kmm</application> widget should only be operated on in the main GUI thread and a 
>ny object deriving from <classname>sigc::trackable</classname> having its non-st 
>atic methods referenced by slots connected to the signal object should only be d 
>estroyed in that thread." 
18332msgid ""
18333"A <classname>sigc::signal</classname> object should be regarded as owned by "
18334"the thread which created it. Only that thread should connect a "
18335"<classname>sigc::slot</classname> object to the signal object, and only that "
18336"thread should <methodname>emit()</methodname> or call <methodname>operator()"
18337"()</methodname> on the signal, or null any connected <classname>sigc::slot</"
18338"classname> object. It follows (amongst other things) that any signal object "
18339"provided by a <application>gtkmm</application> widget should only be "
18340"operated on in the main GUI thread and any object deriving from "
18341"<classname>sigc::trackable</classname> having its non-static methods "
18342"referenced by slots connected to the signal object should only be destroyed "
18343"in that thread."
8910msgstr ""18344msgstr ""
nn18345"Ett <classname>sigc::signal</classname>-objekt ska anses som ägt av tråden "
18346"som skapade det. Endast den tråden ska ansluta ett <classname>sigc::slot</"
18347"classname>-objekt till signalobjektet, och endast den tråden ska anropa "
18348"<methodname>emit()</methodname> eller <methodname>operator()()</methodname> "
18349"på signalen, eller göra några anslutna <classname>sigc::slot</classname>-"
18350"objekt till null. Det följer (bland annat) att varje signalobjekt som "
18351"tillhandahålls av en <application>gtkmm</application>-komponent endast ska "
18352"opereras på i GUI-huvudtråden och att alla objekt som härleder från "
18353"<classname>sigc::trackable</classname> och som har sina icke-statiska "
18354"metoder refererade till av fack anslutna till signalobjektet endast ska "
18355"förstöras i den tråden."
891118356
8912#. (itstool) path: listitem/para18357#. (itstool) path: listitem/para
8913#: C/index-in.docbook:792918358#: C/index-in.docbook:7929
n8914msgid "Any <classname>sigc::connection</classname> object should be regarded as n18359#, fuzzy
>owned by the thread in which the method returning the <classname>sigc::connectio 
>n</classname> object was called. Only that thread should call <classname>sigc::c 
>onnection</classname> methods on the object." 
18360msgid ""
18361"Any <classname>sigc::connection</classname> object should be regarded as "
18362"owned by the thread in which the method returning the <classname>sigc::"
18363"connection</classname> object was called. Only that thread should call "
18364"<classname>sigc::connection</classname> methods on the object."
8915msgstr ""18365msgstr ""
nn18366"Alla <classname>sigc::connection</classname>-objekt ska anses ägas av tråden "
18367"i vilken metoden som returnerar <classname>sigc::connection</classname>-"
18368"objektet anropades. Endast den tråden ska anropa <classname>sigc::"
18369"connection</classname>-metoder på objektet."
891618370
8917#. (itstool) path: listitem/para18371#. (itstool) path: listitem/para
8918#: C/index-in.docbook:793918372#: C/index-in.docbook:7939
n8919msgid "A <classname>sigc::slot</classname> object created by a call to <functionn18373#, fuzzy
>>sigc::mem_fun()</function> which references a method of a class deriving from < 
>classname>sigc::trackable</classname> should never be copied to another thread,  
>nor destroyed by a different thread than the one which created it." 
18374msgid ""
18375"A <classname>sigc::slot</classname> object created by a call to "
18376"<function>sigc::mem_fun()</function> which references a method of a class "
18377"deriving from <classname>sigc::trackable</classname> should never be copied "
18378"to another thread, nor destroyed by a different thread than the one which "
18379"created it."
8920msgstr ""18380msgstr ""
nn18381"Ett <classname>sigc::slot</classname>-objekt skapat av ett anrop till "
18382"<function>sigc::mem_fun()</function> som refererar en metod av en klass som "
18383"härleds från <classname>sigc::trackable</classname> bör aldrig kopieras till "
18384"en annan tråd, och inte heller förstöras av en annan tråd än den som skapade "
18385"det."
892118386
8922#. (itstool) path: listitem/para18387#. (itstool) path: listitem/para
8923#: C/index-in.docbook:794918388#: C/index-in.docbook:7949
n8924msgid "If a particular class object derives from <classname>sigc::trackable</clan18389#, fuzzy
>ssname>, only one thread should create <classname>sigc::slot</classname> objects 
> representing any of the class's non-static methods by calling <function>sigc::m 
>em_fun()</function>. The first thread to create such a slot should be regarded a 
>s owning the relevant object for the purpose of creating further slots referenci 
>ng <emphasis>any</emphasis> of its non-static methods using that function, or nu 
>lling those slots by disconnecting them or destroying the trackable object." 
18390msgid ""
18391"If a particular class object derives from <classname>sigc::trackable</"
18392"classname>, only one thread should create <classname>sigc::slot</classname> "
18393"objects representing any of the class's non-static methods by calling "
18394"<function>sigc::mem_fun()</function>. The first thread to create such a slot "
18395"should be regarded as owning the relevant object for the purpose of creating "
18396"further slots referencing <emphasis>any</emphasis> of its non-static methods "
18397"using that function, or nulling those slots by disconnecting them or "
18398"destroying the trackable object."
8925msgstr ""18399msgstr ""
nn18400"Om ett visst klassobjekt härleds från <classname>sigc::trackable</classname> "
18401"ska bara en tråd skapa <classname>sigc::slot</classname>-objekt som "
18402"representerar någon av klassens icke-statiska metoder genom att anropa "
18403"<function>sigc::mem_fun()</function>. Den första tråden som skapar ett "
18404"sådant fack ska anses äga det relevanta objektet i syfte att skapa vidare "
18405"fack som refererar <emphasis>något</emphasis> av dess icke-statiska metoder "
18406"som använder den funktionen, eller göra dessa fack till null genom att "
18407"koppla från dem eller förstöra det spårbara objektet."
892618408
8927#. (itstool) path: listitem/para18409#. (itstool) path: listitem/para
8928#: C/index-in.docbook:796318410#: C/index-in.docbook:7963
n8929msgid "Although <application>glib</application> is itself thread-safe, any <appln18411#, fuzzy
>ication>glibmm</application> wrappers which use <application>libsigc++</applicat 
>ion> will not be. So for example, only the thread in which a main loop runs shou 
>ld call <methodname>Glib::SignalIdle::connect()</methodname>, <methodname>Glib:: 
>SignalIO::connect()</methodname>, <methodname>Glib::SignalTimeout::connect()</me 
>thodname>, <methodname>Glib::SignalTimeout::connect_seconds</methodname> for tha 
>t main loop, or manipulate any <classname>sigc::connection</classname> object re 
>turned by them." 
18412msgid ""
18413"Although <application>glib</application> is itself thread-safe, any "
18414"<application>glibmm</application> wrappers which use <application>libsigc++</"
18415"application> will not be. So for example, only the thread in which a main "
18416"loop runs should call <methodname>Glib::SignalIdle::connect()</methodname>, "
18417"<methodname>Glib::SignalIO::connect()</methodname>, <methodname>Glib::"
18418"SignalTimeout::connect()</methodname>, <methodname>Glib::SignalTimeout::"
18419"connect_seconds</methodname> for that main loop, or manipulate any "
18420"<classname>sigc::connection</classname> object returned by them."
8930msgstr ""18421msgstr ""
nn18422"Även om <application>glib</application> i sig är trådsäkert så kommer "
18423"<application>glibmm</application>-omslag som använder <application>libsigc+"
18424"+</application> inte vara det. Så exempelvis bör endast tråden som en "
18425"huvudslinga körs anropa <methodname>Glib::SignalIdle::connect()</"
18426"methodname>, <methodname>Glib::SignalIO::connect()</methodname>, "
18427"<methodname>Glib::SignalTimeout::connect()</methodname>, <methodname>Glib::"
18428"SignalTimeout::connect_seconds</methodname> för den huvudslingan, eller "
18429"manipulera några <classname>sigc::connection</classname>-objekt som "
18430"returneras av dem."
893118431
8932#. (itstool) path: listitem/para18432#. (itstool) path: listitem/para
8933#: C/index-in.docbook:797518433#: C/index-in.docbook:7975
n8934msgid "The connect*_once() variants, <methodname>Glib::SignalIdle::connect_once(n18434#, fuzzy
>)</methodname>, <methodname>Glib::SignalTimeout::connect_once()</methodname>, <m 
>ethodname>Glib::SignalTimeout::connect_seconds_once()</methodname>, are thread-s 
>afe for any case where the slot is not created by a call to <function>sigc::mem_ 
>fun()</function> which represents a method of a class deriving from <classname>s 
>igc::trackable</classname>." 
18435msgid ""
18436"The connect*_once() variants, <methodname>Glib::SignalIdle::connect_once()</"
18437"methodname>, <methodname>Glib::SignalTimeout::connect_once()</methodname>, "
18438"<methodname>Glib::SignalTimeout::connect_seconds_once()</methodname>, are "
18439"thread-safe for any case where the slot is not created by a call to "
18440"<function>sigc::mem_fun()</function> which represents a method of a class "
18441"deriving from <classname>sigc::trackable</classname>."
8935msgstr ""18442msgstr ""
nn18443"connect*_once()-varianterna, <methodname>Glib::SignalIdle::connect_once()</"
18444"methodname>, <methodname>Glib::SignalTimeout::connect_once()</methodname>, "
18445"<methodname>Glib::SignalTimeout::connect_seconds_once()</methodname> är "
18446"trådsäkra för alla fall där facket inte skapas av ett anrop till "
18447"<function>sigc::mem_fun()</function> som representerar en metod av en klass "
18448"som härleds från <classname>sigc::trackable</classname>."
893618449
8937#. (itstool) path: section/title18450#. (itstool) path: section/title
8938#: C/index-in.docbook:799318451#: C/index-in.docbook:7993
8939msgid "Using Glib::Dispatcher"18452msgid "Using Glib::Dispatcher"
n8940msgstr ""n18453msgstr "Använda Glib::Dispatcher"
894118454
nn18455# TODO: operator() ?
8942#. (itstool) path: section/para18456#. (itstool) path: section/para
8943#: C/index-in.docbook:799518457#: C/index-in.docbook:7995
n8944msgid "The slots connected to <classname>sigc::signal</classname> objects executn18458#, fuzzy
>e in the thread which calls <methodname>emit()</methodname> or <methodname>opera 
>tor()()</methodname> on the signal. <classname>Glib::Dispatcher</classname> does 
> not behave this way: instead its connected slots execute in the thread in which 
> the <classname>Glib::Dispatcher</classname> object was constructed (which must  
>have a glib main loop). If a <classname>Glib::Dispatcher</classname> object is c 
>onstructed in the main GUI thread (which will therefore be the receiver thread), 
> any worker thread can emit on it and have the connected slots safely execute <a 
>pplication>gtkmm</application> functions." 
18459msgid ""
18460"The slots connected to <classname>sigc::signal</classname> objects execute "
18461"in the thread which calls <methodname>emit()</methodname> or "
18462"<methodname>operator()()</methodname> on the signal. <classname>Glib::"
18463"Dispatcher</classname> does not behave this way: instead its connected slots "
18464"execute in the thread in which the <classname>Glib::Dispatcher</classname> "
18465"object was constructed (which must have a glib main loop). If a "
18466"<classname>Glib::Dispatcher</classname> object is constructed in the main "
18467"GUI thread (which will therefore be the receiver thread), any worker thread "
18468"can emit on it and have the connected slots safely execute "
18469"<application>gtkmm</application> functions."
8945msgstr ""18470msgstr ""
nn18471"Facken anslutna till <classname>sigc::signal</classname>-objekt exekverar i "
18472"tråden som anropar <methodname>emit()</methodname> eller "
18473"<methodname>operator()()</methodname> på signalen. <classname>Glib::"
18474"Dispatcher</classname> beter sig inte på detta sätt: i stället exekverar "
18475"dess anslutna fack i tråden i vilken <classname>Glib::Dispatcher</classname>-"
18476"objektet konstruerades (vilken måste ha en glib-mainloop). Om ett "
18477"<classname>Glib::Dispatcher</classname>-objekt konstrueras i GUI-huvudtråden "
18478"(vilken därför kommer vara mottagartråden), kommer alla arbetartrådar kunna "
18479"sända ut på det och ha att de anslutna facken på ett säkert sätt kan "
18480"exekvera <application>gtkmm</application>-funktioner."
894618481
8947#. (itstool) path: section/para18482#. (itstool) path: section/para
8948#: C/index-in.docbook:800918483#: C/index-in.docbook:8009
n8949msgid "Some thread safety rules on the use of <classname>Glib::Dispatcher</classn18484#, fuzzy
>name> still apply. As mentioned, a <classname>Glib::Dispatcher</classname> objec 
>t must be constructed in the receiver thread (the thread in whose main loop it w 
>ill execute its connected slots). By default this is the main program thread, al 
>though there is a <classname>Glib::Dispatcher</classname> constructor which can  
>take the <classname>Glib::MainContext</classname> object of any thread which has 
> a main loop. Only the receiver thread should call <methodname>connect()</method 
>name> on the <classname>Glib::Dispatcher</classname> object, or manipulate any r 
>elated <classname>sigc::connection</classname> object, unless additional synchro 
>nization is employed. However, any worker thread can safely emit on the <classna 
>me>Glib::Dispatcher</classname> object without any locking once the receiver thr 
>ead has connected the slots, provided that it is constructed before the worker t 
>hread is started (if it is constructed after the thread has started, additional  
>synchronization will normally be required to ensure visibility)." 
18485msgid ""
18486"Some thread safety rules on the use of <classname>Glib::Dispatcher</"
18487"classname> still apply. As mentioned, a <classname>Glib::Dispatcher</"
18488"classname> object must be constructed in the receiver thread (the thread in "
18489"whose main loop it will execute its connected slots). By default this is the "
18490"main program thread, although there is a <classname>Glib::Dispatcher</"
18491"classname> constructor which can take the <classname>Glib::MainContext</"
18492"classname> object of any thread which has a main loop. Only the receiver "
18493"thread should call <methodname>connect()</methodname> on the "
18494"<classname>Glib::Dispatcher</classname> object, or manipulate any related "
18495"<classname>sigc::connection</classname> object, unless additional "
18496"synchronization is employed. However, any worker thread can safely emit on "
18497"the <classname>Glib::Dispatcher</classname> object without any locking once "
18498"the receiver thread has connected the slots, provided that it is constructed "
18499"before the worker thread is started (if it is constructed after the thread "
18500"has started, additional synchronization will normally be required to ensure "
18501"visibility)."
8950msgstr ""18502msgstr ""
nn18503"Några trådsäkerhetsregler för användningen av <classname>Glib::Dispatcher</"
18504"classname> gäller fortfarande. Som nämnt måste ett <classname>Glib::"
18505"Dispatcher</classname>-objekt konstrueras i mottagartråden (tråden i vars "
18506"huvudslinga den kommer exekvera sina ansluta fack). Som standard är detta "
18507"huvudprogramtråden, men det finns en <classname>Glib::Dispatcher</classname>-"
18508"konstruktor som kan ta <classname>Glib::MainContext</classname>-objektet för "
18509"vilken tråd som helst som har en huvudslinga. Endast mottagartråden ska "
18510"anropa <methodname>connect()</methodname> på <classname>Glib::Dispatcher</"
18511"classname>-objektet eller manipulera något relaterat <classname>sigc::"
18512"connection</classname>-objekt, om inte ytterligare synkronisering utförs. "
18513"Alla arbetartrådar kan dock säkert sända ut på <classname>Glib::Dispatcher</"
18514"classname>-objektet utan någon låsning när mottagartråden har anslutit "
18515"facken, förutsatt att den konstruerats innan arbetartråden startats (om den "
18516"har konstruerats efter arbetartråden startats kommer ytterligare "
18517"synkronisering vanligen behövas för att försäkra synlighet)."
895118518
8952#. (itstool) path: section/para18519#. (itstool) path: section/para
8953#: C/index-in.docbook:802918520#: C/index-in.docbook:8029
n8954msgid "Aside from the fact that connected slots always execute in the receiver tn18521#, fuzzy
>hread, <classname>Glib::Dispatcher</classname> objects are similar to <classname 
>>sigc::signal&lt;void()&gt;</classname> objects. They therefore cannot pass unbo 
>und arguments nor return a value. The best way to pass unbound arguments is with 
> a thread-safe (asynchronous) queue. At the time of writing <application>glibmm< 
>/application> does not have one, although most people writing multi-threaded cod 
>e will have one available to them (they are relatively easy to write although th 
>ere are subtleties in combining thread safety with strong exception safety)." 
18522msgid ""
18523"Aside from the fact that connected slots always execute in the receiver "
18524"thread, <classname>Glib::Dispatcher</classname> objects are similar to "
18525"<classname>sigc::signal&lt;void()&gt;</classname> objects. They therefore "
18526"cannot pass unbound arguments nor return a value. The best way to pass "
18527"unbound arguments is with a thread-safe (asynchronous) queue. At the time of "
18528"writing <application>glibmm</application> does not have one, although most "
18529"people writing multi-threaded code will have one available to them (they are "
18530"relatively easy to write although there are subtleties in combining thread "
18531"safety with strong exception safety)."
8955msgstr ""18532msgstr ""
nn18533"Förutom faktum att anslutna fack alltid exekverar i mottagartråden så liknar "
18534"<classname>Glib::Dispatcher</classname>-objekts <classname>sigc::signal&lt;"
18535"void()&gt;</classname>-objekt. De kan därför varken skicka obundna argument "
18536"eller returnera ett värde. Det bästa sättet att skicka obundna argument är "
18537"med en trådsäker (asynkron) kö. I skrivande stund har <application>glibmm</"
18538"application> inte någon, även om de flesta som skriver flertrådad kod kommer "
18539"ha en tillgänglig (de är relativt lätta att skriva även om det finns subtila "
18540"saker att tänka på vid kombination av trådsäkerhet med stark "
18541"undantagssäkerhet)."
895618542
nn18543# TODO: emitted on by??
8957#. (itstool) path: section/para18544#. (itstool) path: section/para
8958#: C/index-in.docbook:804218545#: C/index-in.docbook:8042
n8959msgid "A <classname>Glib::Dispatcher</classname> object can be emitted on by then18546#, fuzzy
> receiver thread as well as by a worker thread, although this should be done wit 
>hin reasonable bounds. On unix-like systems <classname>Glib::Dispatcher</classna 
>me> objects share a single common pipe, which could in theory at least fill up o 
>n a very heavily loaded system running a program with a very large number of <cl 
>assname>Dispatcher</classname> objects in use. Were the pipe to fill up before t 
>he receiver thread's main loop has had an opportunity to read from it to empty i 
>t, and the receiver thread attempt to emit and so write to it when it is in that 
> condition, the receiver thread would block on the write, so deadlocking. Where  
>the receiver thread is to emit, a normal <classname>sigc::signal&lt;void()&gt;</ 
>classname> object could of course be used instead." 
18547msgid ""
18548"A <classname>Glib::Dispatcher</classname> object can be emitted on by the "
18549"receiver thread as well as by a worker thread, although this should be done "
18550"within reasonable bounds. On unix-like systems <classname>Glib::Dispatcher</"
18551"classname> objects share a single common pipe, which could in theory at "
18552"least fill up on a very heavily loaded system running a program with a very "
18553"large number of <classname>Dispatcher</classname> objects in use. Were the "
18554"pipe to fill up before the receiver thread's main loop has had an "
18555"opportunity to read from it to empty it, and the receiver thread attempt to "
18556"emit and so write to it when it is in that condition, the receiver thread "
18557"would block on the write, so deadlocking. Where the receiver thread is to "
18558"emit, a normal <classname>sigc::signal&lt;void()&gt;</classname> object "
18559"could of course be used instead."
8960msgstr ""18560msgstr ""
nn18561"Ett <classname>Glib::Dispatcher</classname>-objekt kan sändas ut av "
18562"mottagartråden såväl som av en arbetartråd, även om detta ska göras inom "
18563"rimliga gränser. På unix-liknande system delar <classname>Glib::Dispatcher</"
18564"classname>-objekt ett gemensamt rör, vilket i alla fall i teorin skulle "
18565"kunna bli fullt på ett system under väldigt tung belastning som kör ett "
18566"program med ett väldigt stort antal <classname>Dispatcher</classname>-objekt "
18567"som används. Om röret skulle fyllas innan mottagartrådens huvudslinga har "
18568"haft en chans att läsa från det för att tömma det, och mottagartråden "
18569"försöker att sända ut och skriva till det när det är i det tillståndet, så "
18570"skulle mottagartråden blockera på skrivningen, vilket ger ett dödläge. Där "
18571"mottagartråden ska sända ut skulle förstås ett vanligt <classname>sigc::"
18572"signal&lt;void()&gt;</classname>-objekt användas i stället."
896118573
8962#. (itstool) path: section/para18574#. (itstool) path: section/para
8963#: C/index-in.docbook:806318575#: C/index-in.docbook:8063
n8964msgid "This is an example program with two threads, one GUI thread, like in all n18576#, fuzzy
><application>gtkmm</application> programs, and one worker thread. The worker thr 
>ead is created when you press the <literal>Start work</literal> button. It is de 
>leted when the work is finished, when you press the <literal>Stop work</literal> 
> button, or when you press the <literal>Quit</literal> button." 
18577msgid ""
18578"This is an example program with two threads, one GUI thread, like in all "
18579"<application>gtkmm</application> programs, and one worker thread. The worker "
18580"thread is created when you press the <literal>Start work</literal> button. "
18581"It is deleted when the work is finished, when you press the <literal>Stop "
18582"work</literal> button, or when you press the <literal>Quit</literal> button."
8965msgstr ""18583msgstr ""
nn18584"Detta är ett exempelprogram med två trådar, en GUI-tråd, som i alla "
18585"<application>gtkmm</application>-program, och en arbetartråd. Arbetartråden "
18586"skapas när du trycker på knappen <literal>Start work</literal>. Den tas bort "
18587"när arbetet är slutfört, när du trycker på knappen <literal>Stop work</"
18588"literal> eller när du trycker på knappen <literal>Quit</literal>."
896618589
8967#. (itstool) path: section/para18590#. (itstool) path: section/para
8968#: C/index-in.docbook:807118591#: C/index-in.docbook:8071
n8969msgid "A <classname>Glib::Dispatcher</classname> is used for sending notification18592#, fuzzy
>ns from the worker thread to the GUI thread. The <classname>ExampleWorker</class 
>name> class contains data which is accessed by both threads. This data is protec 
>ted by a <classname>std::mutex</classname>. Only the GUI thread updates the GUI. 
>" 
18593msgid ""
18594"A <classname>Glib::Dispatcher</classname> is used for sending notifications "
18595"from the worker thread to the GUI thread. The <classname>ExampleWorker</"
18596"classname> class contains data which is accessed by both threads. This data "
18597"is protected by a <classname>std::mutex</classname>. Only the GUI thread "
18598"updates the GUI."
8970msgstr ""18599msgstr ""
nn18600"En <classname>Glib::Dispatcher</classname> används för att skicka "
18601"aviseringar från arbetartråden till GUI-tråden. Klassen "
18602"<classname>ExampleWorker</classname> innehåller data som koms åt av båda "
18603"trådar. Dessa data skuddas av en <classname>std::mutex</classname>. Endast "
18604"GUI-tråden uppdaterar GUI:t."
897118605
8972#. (itstool) path: section/para18606#. (itstool) path: section/para
8973#: C/index-in.docbook:807918607#: C/index-in.docbook:8079
n8974msgid "Compiling and linking a multi-threaded program can require special compiln18608#, fuzzy
>er and linker options. If you use the <application>g++</application> compiler, a 
>dd the <literal>-pthread</literal> option. Other compilers may require other opt 
>ions. If you build with <application>meson</application>, it handles the multi-t 
>hreading complications for you, if you add <function>dependency('threads')</func 
>tion>." 
18609msgid ""
18610"Compiling and linking a multi-threaded program can require special compiler "
18611"and linker options. If you use the <application>g++</application> compiler, "
18612"add the <literal>-pthread</literal> option. Other compilers may require "
18613"other options. If you build with <application>meson</application>, it "
18614"handles the multi-threading complications for you, if you add "
18615"<function>dependency('threads')</function>."
8975msgstr ""18616msgstr ""
nn18617"Kompilering och länkning av ett flertrådat program kan kräva speciella "
18618"kompilator- och länkar-flaggor. Om du använder kompilatorn <application>g++</"
18619"application> lägger du till flaggan <literal>-pthread</literal>. Andra "
18620"kompilatorer kan kräva andra flaggor. Om du bygger med <application>meson</"
18621"application> hanterar det komplikationerna med flertrådning åt dig om du "
18622"lägger till <function>dependency('threads')</function>."
897618623
8977#. (itstool) path: figure/title18624#. (itstool) path: figure/title
8978#: C/index-in.docbook:808818625#: C/index-in.docbook:8088
8979msgid "Multi-Threaded Program"18626msgid "Multi-Threaded Program"
n8980msgstr ""n18627msgstr "Flertrådat program"
898118628
8982#. (itstool) path: imageobject/imagedata18629#. (itstool) path: imageobject/imagedata
8983#. This is a reference to an external file such as an image or video. When18630#. This is a reference to an external file such as an image or video. When
8984#. the file changes, the md5 hash will change to let you know you need to18631#. the file changes, the md5 hash will change to let you know you need to
8985#. update your localized copy. The msgstr is not used at all. Set it to18632#. update your localized copy. The msgstr is not used at all. Set it to
8986#. whatever you like once you have updated your copy of the file.18633#. whatever you like once you have updated your copy of the file.
8987#: C/index-in.docbook:809018634#: C/index-in.docbook:8090
nn18635#, fuzzy
8988msgctxt "_"18636msgctxt "_"
nn18637msgid ""
8989msgid "external ref='figures/multithread.png' md5='acc87c2afb17321ab098b7f0b8a4618638"external ref='figures/multithread.png' md5='acc87c2afb17321ab098b7f0b8a46b27'"
>b27'" 
8990msgstr ""18639msgstr ""
nn18640"external ref='figures/multithread.png' md5='acc87c2afb17321ab098b7f0b8a46b27'"
899118641
8992#. (itstool) path: section/para18642#. (itstool) path: section/para
8993#: C/index-in.docbook:809418643#: C/index-in.docbook:8094
n8994msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren18644msgid ""
>e/master/examples/book/multithread\">Source Code</link>" 
18645"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
18646"master/examples/book/multithread\">Source Code</link>"
8995msgstr ""18647msgstr ""
nn18648"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
18649"master/examples/book/multithread\">Källkod</link>"
899618650
8997#. (itstool) path: chapter/title18651#. (itstool) path: chapter/title
8998#: C/index-in.docbook:810118652#: C/index-in.docbook:8101
8999msgid "Recommended Techniques"18653msgid "Recommended Techniques"
n9000msgstr ""n18654msgstr "Rekommenderade tekniker"
900118655
9002#. (itstool) path: chapter/para18656#. (itstool) path: chapter/para
9003#: C/index-in.docbook:810318657#: C/index-in.docbook:8103
n9004msgid "This section is simply a gathering of wisdom, general style guidelines ann18658msgid ""
>d hints for creating <application>gtkmm</application> applications." 
18659"This section is simply a gathering of wisdom, general style guidelines and "
18660"hints for creating <application>gtkmm</application> applications."
9005msgstr ""18661msgstr ""
nn18662"Detta avsnitt är helt enkelt samlad kunskap, allmänna stilriktlinjer och "
18663"tips för att skapa <application>gtkmm</application>-program."
900618664
9007#. (itstool) path: chapter/para18665#. (itstool) path: chapter/para
9008#: C/index-in.docbook:810718666#: C/index-in.docbook:8107
n9009msgid "Use <application>Meson</application>! It is your friend :) It examines C n18667#, fuzzy
>and <phrase role=\"nowrap\">C++</phrase> files, determines how they depend on ea 
>ch other, and generates <filename>build.ninja</filename> or an equivalent file s 
>o the files can be compiled in the correct order. <application>Meson</applicatio 
>n> permits automatic configuration of software installation, handling a large nu 
>mber of system quirks to increase portability." 
18668msgid ""
18669"Use <application>Meson</application>! It is your friend :) It examines C and "
18670"<phrase role=\"nowrap\">C++</phrase> files, determines how they depend on "
18671"each other, and generates <filename>build.ninja</filename> or an equivalent "
18672"file so the files can be compiled in the correct order. <application>Meson</"
18673"application> permits automatic configuration of software installation, "
18674"handling a large number of system quirks to increase portability."
9010msgstr ""18675msgstr ""
nn18676"Använd<application>Meson</application>! Det är din vän :) Det undersöker C- "
18677"och C++-filer, avgör hur de beror på varandra, och genererar <filename>build."
18678"ninja</filename> eller en motsvarande fil så att filerna kan kompileras i "
18679"rätt ordning. <application>Meson</application> tillåter automatisk "
18680"konfiguration av programvaruinstallation, och hanterar ett stort antal "
18681"systemabrovinkar för att öka portabilitet."
901118682
9012#. (itstool) path: chapter/para18683#. (itstool) path: chapter/para
9013#: C/index-in.docbook:811518684#: C/index-in.docbook:8115
n9014msgid "Subclass Widgets to better organize your code. You should probably subclan18685#, fuzzy
>ss your main <classname>Window</classname> at least. Then you can make your chil 
>d Widgets and signal handlers members of that class." 
18686msgid ""
18687"Subclass Widgets to better organize your code. You should probably subclass "
18688"your main <classname>Window</classname> at least. Then you can make your "
18689"child Widgets and signal handlers members of that class."
9015msgstr ""18690msgstr ""
nn18691"Gör underklasser till Widget-komponenter för att bättre organisera din kod. "
18692"Du bör troligen åtminstone göra en underklass till ditt <classname>Window</"
18693"classname>. Sedan kan du göra dina underordnade Widget och signalhanterare "
18694"till medlemmar av den klassen."
901618695
9017#. (itstool) path: chapter/para18696#. (itstool) path: chapter/para
9018#: C/index-in.docbook:812018697#: C/index-in.docbook:8120
n9019msgid "Create your own signals instead of passing pointers around. Objects can cn18698#, fuzzy
>ommunicate with each other via signals and signal handlers. This is much simpler 
> than objects holding pointers to each other and calling each other's methods. < 
>application>gtkmm</application>'s classes use special versions of <classname>sig 
>c::signal</classname>, but you should use normal <classname>sigc::signal</classn 
>ame>s, as described in the <application>libsigc++</application> documentation." 
18699msgid ""
18700"Create your own signals instead of passing pointers around. Objects can "
18701"communicate with each other via signals and signal handlers. This is much "
18702"simpler than objects holding pointers to each other and calling each other's "
18703"methods. <application>gtkmm</application>'s classes use special versions of "
18704"<classname>sigc::signal</classname>, but you should use normal "
18705"<classname>sigc::signal</classname>s, as described in the "
18706"<application>libsigc++</application> documentation."
9020msgstr ""18707msgstr ""
nn18708"Skapa dina egna signaler i stället för att skicka runt pekare. Objekt kan "
18709"kommunicera med varandra via signaler och signalhanterare. Detta är mycket "
18710"enklare än objekt som håller pekare till varandra och anropar varandras "
18711"metoder. <application>gtkmm</application>s klasser använder specialversioner "
18712"av <classname>sigc::signal</classname>, men du bör använda vanliga "
18713"<classname>sigc::signal</classname>-signaler, som beskrivet i "
18714"<application>libsigc++</application>-dokumentationen."
902118715
9022#. (itstool) path: section/title18716#. (itstool) path: section/title
9023#: C/index-in.docbook:812918717#: C/index-in.docbook:8129
9024msgid "Application Lifetime"18718msgid "Application Lifetime"
n9025msgstr ""n18719msgstr "Livslängd för program"
902618720
9027#. (itstool) path: section/para18721#. (itstool) path: section/para
9028#: C/index-in.docbook:813018722#: C/index-in.docbook:8130
n9029msgid "Most applications will have only one <classname>Window</classname>, or onn18723#, fuzzy
>ly one main window. These applications can use <methodname>Gtk::Application::mak 
>e_window_and_run(int argc, char** argv, T_Args&amp;&amp;... args)</methodname>.  
>It creates and shows a window. When the window is hidden, <methodname>make_windo 
>w_and_run()</methodname> deletes the window and returns to the caller. This migh 
>t happen when the user closes the window, or when your code decides to hide the  
>window with <methodname>set_visible(false)</methodname>. You can prevent the use 
>r from closing the window (for instance, if there are unsaved changes) by overri 
>ding <methodname>Gtk::Window::on_close_request()</methodname>." 
18724msgid ""
18725"Most applications will have only one <classname>Window</classname>, or only "
18726"one main window. These applications can use <methodname>Gtk::Application::"
18727"make_window_and_run(int argc, char** argv, T_Args&amp;&amp;... args)</"
18728"methodname>. It creates and shows a window. When the window is hidden, "
18729"<methodname>make_window_and_run()</methodname> deletes the window and "
18730"returns to the caller. This might happen when the user closes the window, or "
18731"when your code decides to hide the window with "
18732"<methodname>set_visible(false)</methodname>. You can prevent the user from "
18733"closing the window (for instance, if there are unsaved changes) by "
18734"overriding <methodname>Gtk::Window::on_close_request()</methodname>."
9030msgstr ""18735msgstr ""
nn18736"De flesta program kommer endast ha ett <classname>Window</classname>, eller "
18737"endast ett huvudfönster. Dessa program kan använda <methodname>Gtk::"
18738"Application::make_window_and_run(int argc, char** argv, T_Args&amp;&amp;... "
18739"args)</methodname>. Det skapar och visar ett fönster. När fönstret är dolt "
18740"tar <methodname>make_window_and_run()</methodname> bort fönstret och "
18741"returnerar till anroparen. Detta kan hända när användaren stänger fönstret, "
18742"eller när din kod bestämmer sig för att dölja fönstret med "
18743"<methodname>set_visible(false)</methodname>. Du kan förhindra användaren "
18744"från att stränga fönstret (exempelvis om det finns osparade ändringar) genom "
18745"att åsidosätta <methodname>Gtk::Window::on_close_request()</methodname>."
903118746
9032#. (itstool) path: section/para18747#. (itstool) path: section/para
9033#: C/index-in.docbook:813918748#: C/index-in.docbook:8139
9034msgid "Most of our examples use this technique."18749msgid "Most of our examples use this technique."
n9035msgstr ""n18750msgstr "De flesta av våra exempel använder denna teknik."
903618751
9037#. (itstool) path: section/title18752#. (itstool) path: section/title
9038#: C/index-in.docbook:814318753#: C/index-in.docbook:8143
9039msgid "Using a <application>gtkmm</application> widget"18754msgid "Using a <application>gtkmm</application> widget"
n9040msgstr ""n18755msgstr "Använda en <application>gtkmm</application>-komponent"
904118756
9042#. (itstool) path: section/para18757#. (itstool) path: section/para
9043#: C/index-in.docbook:814518758#: C/index-in.docbook:8145
nn18759msgid ""
9044msgid "Our examples all tend to have the same structure. They follow these steps18760"Our examples all tend to have the same structure. They follow these steps "
> for using a <classname>Widget</classname>:" 
18761"for using a <classname>Widget</classname>:"
9045msgstr ""18762msgstr ""
nn18763"Våra exempel tenderar att ha samma struktur. De följer dessa steg för att "
18764"använda en <classname>Widget</classname>:"
904618765
9047#. (itstool) path: listitem/para18766#. (itstool) path: listitem/para
9048#: C/index-in.docbook:815418767#: C/index-in.docbook:8154
n9049msgid "Declare a variable of the type of <classname>Widget</classname> you wish n18768#, fuzzy
>to use, generally as member variable of a derived container class. You could als 
>o declare a pointer to the widget type, and then create it with <literal>new</li 
>teral> or <function>Gtk::make_managed()</function> in your code." 
18769msgid ""
18770"Declare a variable of the type of <classname>Widget</classname> you wish to "
18771"use, generally as member variable of a derived container class. You could "
18772"also declare a pointer to the widget type, and then create it with "
18773"<literal>new</literal> or <function>Gtk::make_managed()</function> in your "
18774"code."
9050msgstr ""18775msgstr ""
nn18776"Deklarera en variabel av typen av <classname>Widget</classname> som du vill "
18777"använda, allmänt som medlemsvariabel av en härledd behållarklass. Du skulle "
18778"också kunna deklarera en pekare till komponenttypen och sedan skapa den med "
18779"<literal>new</literal> eller <function>Gtk::make_managed()</function> i din "
18780"kod."
905118781
9052#. (itstool) path: listitem/para18782#. (itstool) path: listitem/para
9053#: C/index-in.docbook:816318783#: C/index-in.docbook:8163
n9054msgid "Set the attributes of the widget. If the widget has no default constructon18784#, fuzzy
>r, then you will need to initialize the widget in the initializer list of your c 
>ontainer class's constructor." 
18785msgid ""
18786"Set the attributes of the widget. If the widget has no default constructor, "
18787"then you will need to initialize the widget in the initializer list of your "
18788"container class's constructor."
9055msgstr ""18789msgstr ""
nn18790"Ställ in komponentens attribut. Om komponenten inte har någon "
18791"standardkonstruktor kommer du behöva initiera komponenten i initierarlistan "
18792"för din behållarklass konstruktor."
905618793
9057#. (itstool) path: listitem/para18794#. (itstool) path: listitem/para
9058#: C/index-in.docbook:817118795#: C/index-in.docbook:8171
9059msgid "Connect any signals you wish to use to the appropriate handlers."18796msgid "Connect any signals you wish to use to the appropriate handlers."
n9060msgstr ""n18797msgstr "Anslut alla signaler som du vill använda till lämpliga hanterare."
906118798
9062#. (itstool) path: listitem/para18799#. (itstool) path: listitem/para
9063#: C/index-in.docbook:817718800#: C/index-in.docbook:8177
n9064msgid "Pack the widget into a container using the appropriate call, e.g. <methodn18801msgid ""
>name>Gtk::Box::append()</methodname>." 
18802"Pack the widget into a container using the appropriate call, e.g. "
18803"<methodname>Gtk::Box::append()</methodname>."
9065msgstr ""18804msgstr ""
nn18805"Packa komponenten i en behållare med lämpligt anrop, t.ex. <methodname>Gtk::"
18806"Box::append()</methodname>."
906618807
9067#. (itstool) path: section/para18808#. (itstool) path: section/para
9068#: C/index-in.docbook:818718809#: C/index-in.docbook:8187
n9069msgid "If you don't want all widgets to be shown, call <methodname>Gtk::Widget::n18810msgid ""
>set_visible(false)</methodname> on the widgets that you don't want to show. If a 
> container widget is hidden, all of its child widgets are also hidden, even if < 
>methodname>set_visible(false)</methodname> is not called on the child widgets." 
18811"If you don't want all widgets to be shown, call <methodname>Gtk::Widget::"
18812"set_visible(false)</methodname> on the widgets that you don't want to show. "
18813"If a container widget is hidden, all of its child widgets are also hidden, "
18814"even if <methodname>set_visible(false)</methodname> is not called on the "
18815"child widgets."
9070msgstr ""18816msgstr ""
nn18817"Om du inte vill att alla komponenter ska visas anropar du <methodname>Gtk::"
18818"Widget::set_visible(false)</methodname> på komponenterna som du inte vill "
18819"ska visas. Om en behållarkomponent är dold så är även alla dess underordnade "
18820"komponenter dolda, även om <methodname>set_visible(false)</methodname> inte "
18821"anropas på de underordnade komponenterna."
907118822
9072#. (itstool) path: chapter/title18823#. (itstool) path: chapter/title
9073#: C/index-in.docbook:819818824#: C/index-in.docbook:8198
9074msgid "Building applications"18825msgid "Building applications"
n9075msgstr ""n18826msgstr "Bygga program"
907618827
9077#. (itstool) path: chapter/para18828#. (itstool) path: chapter/para
9078#: C/index-in.docbook:820018829#: C/index-in.docbook:8200
n9079msgid "This chapter is similar to <emphasis>Building applications</emphasis> andn18830#, fuzzy
> following sections in the <link xlink:href=\"https://docs.gtk.org/gtk4/getting_ 
>started.html\">Getting Started</link> chapter in the GTK documentation. The same 
> application is built, but <application>gtkmm</application> is used instead of < 
>application>GTK</application>." 
18831msgid ""
18832"This chapter is similar to <emphasis>Building applications</emphasis> and "
18833"following sections in the <link xlink:href=\"https://docs.gtk.org/gtk4/"
18834"getting_started.html\">Getting Started</link> chapter in the GTK "
18835"documentation. The same application is built, but <application>gtkmm</"
18836"application> is used instead of <application>GTK</application>."
9080msgstr ""18837msgstr ""
nn18838"Detta kapitel liknar <emphasis>Bygga program</emphasis> och följande avsnitt "
18839"i <link xlink:href=\"https://docs.gtk.org/gtk4/getting_started.html\">Komma "
18840"igång</link>-kapitlet i GTK-dokumentationen. Samma program byggs, men "
18841"<application>gtkmm</application> används i stället för <application>GTK</"
18842"application>."
908118843
9082#. (itstool) path: varlistentry/term18844#. (itstool) path: varlistentry/term
9083#: C/index-in.docbook:821018845#: C/index-in.docbook:8210
9084msgid "The binary file"18846msgid "The binary file"
n9085msgstr ""n18847msgstr "Binärfilen"
908618848
9087#. (itstool) path: listitem/para18849#. (itstool) path: listitem/para
9088#: C/index-in.docbook:821118850#: C/index-in.docbook:8211
9089msgid "This gets installed in <filename>/usr/bin</filename>."18851msgid "This gets installed in <filename>/usr/bin</filename>."
n9090msgstr ""n18852msgstr "Denna installeras i <filename>/usr/bin</filename>."
909118853
9092#. (itstool) path: varlistentry/term18854#. (itstool) path: varlistentry/term
9093#: C/index-in.docbook:821418855#: C/index-in.docbook:8214
nn18856#, fuzzy
9094msgid "A desktop file"18857msgid "A desktop file"
n9095msgstr ""n18858msgstr "En desktop-fil"
909618859
9097#. (itstool) path: listitem/para18860#. (itstool) path: listitem/para
9098#: C/index-in.docbook:821518861#: C/index-in.docbook:8215
n9099msgid "The desktop file provides important information about the application to n18862#, fuzzy
>the desktop shell, such as its name, icon, D-Bus name, commandline to launch it, 
> etc. It is installed in <filename>/usr/share/applications</filename>." 
18863msgid ""
18864"The desktop file provides important information about the application to the "
18865"desktop shell, such as its name, icon, D-Bus name, commandline to launch it, "
18866"etc. It is installed in <filename>/usr/share/applications</filename>."
9100msgstr ""18867msgstr ""
nn18868"Desktop-filen tillhandahåller viktig information om programmet till "
18869"skrivbordsskalet, som dess namn, ikon, D-Bus-namn, kommandorad för att köra "
18870"den o.s.v. Den installeras i <filename>/usr/share/applications</filename>."
910118871
9102#. (itstool) path: varlistentry/term18872#. (itstool) path: varlistentry/term
9103#: C/index-in.docbook:822018873#: C/index-in.docbook:8220
9104msgid "An icon"18874msgid "An icon"
n9105msgstr ""n18875msgstr "En ikon"
910618876
9107#. (itstool) path: listitem/para18877#. (itstool) path: listitem/para
9108#: C/index-in.docbook:822118878#: C/index-in.docbook:8221
n9109msgid "The icon gets installed in <filename>/usr/share/icons/hicolor/48x48/apps<n18879msgid ""
>/filename>, where it will be found regardless of the current theme." 
18880"The icon gets installed in <filename>/usr/share/icons/hicolor/48x48/apps</"
18881"filename>, where it will be found regardless of the current theme."
9110msgstr ""18882msgstr ""
nn18883"Ikonen installeras i <filename>/usr/share/icons/hicolor/48x48/apps</"
18884"filename>, där den kommer hittas oavsett aktuellt tema."
911118885
9112#. (itstool) path: varlistentry/term18886#. (itstool) path: varlistentry/term
9113#: C/index-in.docbook:822518887#: C/index-in.docbook:8225
9114msgid "A settings schema"18888msgid "A settings schema"
n9115msgstr ""n18889msgstr "Ett inställningsschema"
911618890
9117#. (itstool) path: listitem/para18891#. (itstool) path: listitem/para
9118#: C/index-in.docbook:822618892#: C/index-in.docbook:8226
n9119msgid "If the application uses <classname>Gio::Settings</classname>, it will insn18893msgid ""
>tall its schema in <filename>/usr/share/glib-2.0/schemas</filename>, so that too 
>ls like dconf-editor can find it." 
18894"If the application uses <classname>Gio::Settings</classname>, it will "
18895"install its schema in <filename>/usr/share/glib-2.0/schemas</filename>, so "
18896"that tools like dconf-editor can find it."
9120msgstr ""18897msgstr ""
nn18898"Om programmet använder <classname>Gio::Settings</classname> kommer det "
18899"installera sitt schema i <filename>/usr/share/glib-2.0/schemas</filename> så "
18900"att verktyg som dconf-editor kan hitta det."
912118901
9122#. (itstool) path: varlistentry/term18902#. (itstool) path: varlistentry/term
9123#: C/index-in.docbook:823118903#: C/index-in.docbook:8231
9124msgid "Other resources"18904msgid "Other resources"
n9125msgstr ""n18905msgstr "Andra resurser"
912618906
9127#. (itstool) path: listitem/para18907#. (itstool) path: listitem/para
9128#: C/index-in.docbook:823218908#: C/index-in.docbook:8232
n9129msgid "Other files, such as <classname>Gtk::Builder</classname> ui files, are ben18909#, fuzzy
>st loaded from resources stored in the application binary itself. This eliminate 
>s the need for most of the files that would traditionally be installed in an app 
>lication-specific location in <filename>/usr/share</filename>." 
18910msgid ""
18911"Other files, such as <classname>Gtk::Builder</classname> ui files, are best "
18912"loaded from resources stored in the application binary itself. This "
18913"eliminates the need for most of the files that would traditionally be "
18914"installed in an application-specific location in <filename>/usr/share</"
18915"filename>."
9130msgstr ""18916msgstr ""
nn18917"Andra filer som <classname>Gtk::Builder</classname>-ui-filer läses bäst in "
18918"från resurser som lagras i själva programbinären. Detta eliminerar behovet "
18919"av de flesta filer som traditionellt skulle installeras på en "
18920"programspecifik plats i <filename>/usr/share</filename>."
913118921
9132#. (itstool) path: chapter/para18922#. (itstool) path: chapter/para
9133#: C/index-in.docbook:820618923#: C/index-in.docbook:8206
9134msgid "An application consists of a number of files: <_:variablelist-1/>"18924msgid "An application consists of a number of files: <_:variablelist-1/>"
n9135msgstr ""n18925msgstr "Ett program består av ett antal filer: <_:variablelist-1/>"
913618926
9137#. (itstool) path: chapter/para18927#. (itstool) path: chapter/para
9138#: C/index-in.docbook:824018928#: C/index-in.docbook:8240
n9139msgid "<application>gtkmm</application> includes application support that is buin18929#, fuzzy
>lt on top of <classname>Gio::Application</classname>. In this chapter we'll buil 
>d a simple application by starting from scratch, adding more and more pieces ove 
>r time. Along the way, we'll learn about <classname>Gtk::Application</classname> 
>, <classname>Gtk::Builder</classname>, resources, menus, settings, <classname>Gt 
>k::HeaderBar</classname>, <classname>Gtk::Stack</classname>, <classname>Gtk::Sea 
>rchBar</classname>, <classname>Gtk::ListBox</classname>, and more." 
18930msgid ""
18931"<application>gtkmm</application> includes application support that is built "
18932"on top of <classname>Gio::Application</classname>. In this chapter we'll "
18933"build a simple application by starting from scratch, adding more and more "
18934"pieces over time. Along the way, we'll learn about <classname>Gtk::"
18935"Application</classname>, <classname>Gtk::Builder</classname>, resources, "
18936"menus, settings, <classname>Gtk::HeaderBar</classname>, <classname>Gtk::"
18937"Stack</classname>, <classname>Gtk::SearchBar</classname>, <classname>Gtk::"
18938"ListBox</classname>, and more."
9140msgstr ""18939msgstr ""
nn18940"<application>gtkmm</application> inkluderar programstöd som byggts på "
18941"<classname>Gio::Application</classname>. I detta kapitel kommer vi bygga ett "
18942"enkelt program genom att starta från grunden och stegvis lägga till fler och "
18943"fler bitar. På vägen kommer vi lära oss om <classname>Gtk::Application</"
18944"classname>, <classname>Gtk::Builder</classname>, resurser, menyer, "
18945"inställningar, <classname>Gtk::HeaderBar</classname>, <classname>Gtk::Stack</"
18946"classname>, <classname>Gtk::SearchBar</classname>, <classname>Gtk::ListBox</"
18947"classname> med mera."
914118948
9142#. (itstool) path: chapter/para18949#. (itstool) path: chapter/para
9143#: C/index-in.docbook:824918950#: C/index-in.docbook:8249
n9144msgid "The full, buildable sources for these examples can be found in the <filenn18951#, fuzzy
>ame>examples/book/buildapp</filename> directory of the <application>gtkmm-docume 
>ntation</application> source distribution, or online in the <link xlink:href=\"h 
>ttps://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/master/examples/book/buil 
>dapp\"><application>gtkmm-documentation</application> git repository</link>. You 
> can build each example separately by using <command>meson</command> and <comman 
>d>ninja</command> with the <filename>meson.build</filename> file or by using <co 
>mmand>make</command> with the <filename>Makefile.example</filename> file. For mo 
>re information, see the <filename>README</filename> included in the <filename>bu 
>ildapp</filename> directory." 
18952msgid ""
18953"The full, buildable sources for these examples can be found in the "
18954"<filename>examples/book/buildapp</filename> directory of the "
18955"<application>gtkmm-documentation</application> source distribution, or "
18956"online in the <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-"
18957"documentation/tree/master/examples/book/buildapp\"><application>gtkmm-"
18958"documentation</application> git repository</link>. You can build each "
18959"example separately by using <command>meson</command> and <command>ninja</"
18960"command> with the <filename>meson.build</filename> file or by using "
18961"<command>make</command> with the <filename>Makefile.example</filename> file. "
18962"For more information, see the <filename>README</filename> included in the "
18963"<filename>buildapp</filename> directory."
9145msgstr ""18964msgstr ""
nn18965"De fullständiga byggbara källorna för dessa exempel kan hittas i katalogen "
18966"<filename>examples/book/buildapp</filename> för källkodsdistributionen av "
18967"<application>gtkmm-documentation</application>, eller på nätet i <link xlink:"
18968"href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/master/"
18969"examples/book/buildapp\">git-arkivet för <application>gtkmm-documentation</"
18970"application></link>. Du kan bygga varje exempel separat genom att använda "
18971"<command>meson</command> och <command>ninja</command> med filen "
18972"<filename>meson.build</filename> eller genom att använda <command>make</"
18973"command> med filen <filename>Makefile.example</filename>. För mer "
18974"information kan du se <filename>README</filename> som finns i katalogen "
18975"<filename>buildapp</filename>."
914618976
9147#. (itstool) path: section/title18977#. (itstool) path: section/title
9148#. (itstool) path: figure/title18978#. (itstool) path: figure/title
n9149#: C/index-in.docbook:8262n18979#: C/index-in.docbook:8262 C/index-in.docbook:8306
9150#: C/index-in.docbook:8306
9151msgid "A trivial application"18980msgid "A trivial application"
n9152msgstr ""n18981msgstr "Ett simpelt program"
915318982
9154#. (itstool) path: section/para18983#. (itstool) path: section/para
9155#: C/index-in.docbook:826418984#: C/index-in.docbook:8264
n9156msgid "When using <classname>Gtk::Application</classname>, the <function>main()<n18985#, fuzzy
>/function> function can be very simple. We just call <methodname>Gtk::Applicatio 
>n::run()</methodname> on an instance of our application class." 
18986msgid ""
18987"When using <classname>Gtk::Application</classname>, the <function>main()</"
18988"function> function can be very simple. We just call <methodname>Gtk::"
18989"Application::run()</methodname> on an instance of our application class."
9157msgstr ""18990msgstr ""
nn18991"När <classname>Gtk::Application</classname> används kan <function>main()</"
18992"function>-funktionen vara väldigt enkel. Vi anropar helt enkelt "
18993"<methodname>Gtk::Application::run()</methodname> på en instans av vår "
18994"programklass."
915818995
9159#. (itstool) path: section/para18996#. (itstool) path: section/para
9160#: C/index-in.docbook:827018997#: C/index-in.docbook:8270
n9161msgid "All the application logic is in the application class, which is a subclasn18998#, fuzzy
>s of <classname>Gtk::Application</classname>. Our example does not yet have any  
>interesting functionality. All it does is open a window when it is activated wit 
>hout arguments, and open the files it is given, if it is started with arguments. 
> (Or rather, our application class tries to open the files, but our subclassed a 
>pplication window does not yet do what it's told to do.)" 
18999msgid ""
19000"All the application logic is in the application class, which is a subclass "
19001"of <classname>Gtk::Application</classname>. Our example does not yet have "
19002"any interesting functionality. All it does is open a window when it is "
19003"activated without arguments, and open the files it is given, if it is "
19004"started with arguments. (Or rather, our application class tries to open the "
19005"files, but our subclassed application window does not yet do what it's told "
19006"to do.)"
9162msgstr ""19007msgstr ""
nn19008"All programlogik är i programklassen, vilket är en underklass till "
19009"<classname>Gtk::Application</classname>. Vårt exempel har ännu inte någon "
19010"intressant funktionalitet. Allt det gör är att öppna ett fönster när det "
19011"aktiveras utan argument, och öppna filerna som det ges om det startas med "
19012"argument. (Eller snarare försöker vår programklass öppna filerna, men vårt "
19013"underklassade programfönster gör inte ännu vad det ombes att göra.)"
916319014
9164#. (itstool) path: section/para19015#. (itstool) path: section/para
9165#: C/index-in.docbook:827919016#: C/index-in.docbook:8279
n9166msgid "To handle these two cases, we override <methodname>signal_activate()</metn19017#, fuzzy
>hodname>'s default handler, which gets called when the application is launched w 
>ithout commandline arguments, and <methodname>signal_open()</methodname>'s defau 
>lt handler, which gets called when the application is launched with commandline  
>arguments." 
19018msgid ""
19019"To handle these two cases, we override <methodname>signal_activate()</"
19020"methodname>'s default handler, which gets called when the application is "
19021"launched without commandline arguments, and <methodname>signal_open()</"
19022"methodname>'s default handler, which gets called when the application is "
19023"launched with commandline arguments."
9167msgstr ""19024msgstr ""
nn19025"För att hantera dessa två fall åsidosätter vi <methodname>signal_activate()</"
19026"methodname>:s standardhanterare, som anropas när programmet körs utan "
19027"kommandoradsargument, och <methodname>signal_open()</methodname>:s "
19028"standardhanterare, som anropas när programmet körs med kommandoradsargument."
916819029
9169#. (itstool) path: section/para19030#. (itstool) path: section/para
9170#: C/index-in.docbook:828619031#: C/index-in.docbook:8286
n9171msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/classGio_1n19032msgid ""
>_1Application.html\">Gio::Application Reference</link>" 
19033"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
19034"classGio_1_1Application.html\">Gio::Application Reference</link>"
9172msgstr ""19035msgstr ""
nn19036"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
19037"classGio_1_1Application.html\">Referens för Gio::Application</link>"
917319038
9174#. (itstool) path: section/para19039#. (itstool) path: section/para
9175#: C/index-in.docbook:828719040#: C/index-in.docbook:8287
n9176msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/classGtk_1_n19041msgid ""
>1Application.html\">Gtk::Application Reference</link>" 
19042"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
19043"classGtk_1_1Application.html\">Gtk::Application Reference</link>"
9177msgstr ""19044msgstr ""
nn19045"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/gtkmm/"
19046"classGtk_1_1Application.html\">Referens för Gtk::Application</link>"
917819047
9179#. (itstool) path: section/para19048#. (itstool) path: section/para
9180#: C/index-in.docbook:828919049#: C/index-in.docbook:8289
n9181msgid "Another important class that is part of the application support in <applin19050#, fuzzy
>cation>gtkmm</application> is <classname>Gtk::ApplicationWindow</classname>. It  
>is typically subclassed as well. Our subclass does not do anything yet, so we wi 
>ll just get an empty window." 
19051msgid ""
19052"Another important class that is part of the application support in "
19053"<application>gtkmm</application> is <classname>Gtk::ApplicationWindow</"
19054"classname>. It is typically subclassed as well. Our subclass does not do "
19055"anything yet, so we will just get an empty window."
9182msgstr ""19056msgstr ""
nn19057"En annan viktig klass som är del av programstödet i <application>gtkmm</"
19058"application> is <classname>Gtk::ApplicationWindow</classname>. Den "
19059"underklassas vanligen också. Vår underklass gör inte något ännu, så vi får "
19060"bara ett tomt fönster."
918319061
9184#. (itstool) path: section/para19062#. (itstool) path: section/para
9185#: C/index-in.docbook:829519063#: C/index-in.docbook:8295
n9186msgid "As part of the initial setup of our application, we also create an icon an19064#, fuzzy
>nd a desktop file. Note that @bindir@ in the desktop file needs to be replaced w 
>ith the actual path to the binary before this desktop file can be used." 
19065msgid ""
19066"As part of the initial setup of our application, we also create an icon and "
19067"a desktop file. Note that @bindir@ in the desktop file needs to be replaced "
19068"with the actual path to the binary before this desktop file can be used."
9187msgstr ""19069msgstr ""
nn19070"Som del av den initiala konfigurationen av ditt program skapar vi även en "
19071"ikon och en desktop-fil. Observera att @bindir@ i desktop-filen behöver "
19072"ersättas med den faktiska sökvägen till binären innan denna desktop-fil kan "
19073"användas."
918819074
9189#. (itstool) path: section/para19075#. (itstool) path: section/para
9190#: C/index-in.docbook:830119076#: C/index-in.docbook:8301
9191msgid "Here is what we've achieved so far:"19077msgid "Here is what we've achieved so far:"
n9192msgstr ""n19078msgstr "Här är vad vi har uppnått så här långt:"
919319079
9194#. (itstool) path: imageobject/imagedata19080#. (itstool) path: imageobject/imagedata
9195#. This is a reference to an external file such as an image or video. When19081#. This is a reference to an external file such as an image or video. When
9196#. the file changes, the md5 hash will change to let you know you need to19082#. the file changes, the md5 hash will change to let you know you need to
9197#. update your localized copy. The msgstr is not used at all. Set it to19083#. update your localized copy. The msgstr is not used at all. Set it to
9198#. whatever you like once you have updated your copy of the file.19084#. whatever you like once you have updated your copy of the file.
9199#: C/index-in.docbook:830819085#: C/index-in.docbook:8308
nn19086#, fuzzy
9200msgctxt "_"19087msgctxt "_"
n9201msgid "external ref='figures/buildapp_trivial_app.png' md5='fe94e3d80cb888d18279n19088msgid ""
>12f49af7a6f3'" 
19089"external ref='figures/buildapp_trivial_app.png' "
19090"md5='fe94e3d80cb888d1827912f49af7a6f3'"
9202msgstr ""19091msgstr ""
nn19092"external ref='figures/buildapp_trivial_app.png' "
19093"md5='fe94e3d80cb888d1827912f49af7a6f3'"
920319094
9204#. (itstool) path: section/para19095#. (itstool) path: section/para
9205#: C/index-in.docbook:831219096#: C/index-in.docbook:8312
n9206msgid "This does not look very impressive yet, but our application is already prn19097#, fuzzy
>esenting itself on the session bus, it has single-instance semantics, and it acc 
>epts files as commandline arguments." 
19098msgid ""
19099"This does not look very impressive yet, but our application is already "
19100"presenting itself on the session bus, it has single-instance semantics, and "
19101"it accepts files as commandline arguments."
9207msgstr ""19102msgstr ""
nn19103"Det här ser inte ut så imponerande än, men vårt program presenterar sig "
19104"redan på sessionsbussen, har enkelinstanssemantik och accepterar filer som "
19105"kommandoradsargument."
920819106
9209#. (itstool) path: section/para19107#. (itstool) path: section/para
9210#: C/index-in.docbook:831719108#: C/index-in.docbook:8317
n9211msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19109msgid ""
>e/master/examples/book/buildapp/step1\">Source Code</link>" 
19110"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19111"master/examples/book/buildapp/step1\">Source Code</link>"
9212msgstr ""19112msgstr ""
nn19113"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19114"master/examples/book/buildapp/step1\">Källkod</link>"
921319115
9214#. (itstool) path: section/title19116#. (itstool) path: section/title
9215#. (itstool) path: figure/title19117#. (itstool) path: figure/title
n9216#: C/index-in.docbook:8322n19118#: C/index-in.docbook:8322 C/index-in.docbook:8365
9217#: C/index-in.docbook:836519119#, fuzzy
9218msgid "Populating the window"19120msgid "Populating the window"
n9219msgstr ""n19121msgstr "Fylla fönstret"
922019122
9221#. (itstool) path: section/para19123#. (itstool) path: section/para
9222#: C/index-in.docbook:832419124#: C/index-in.docbook:8324
n9223msgid "In this step, we use a <classname>Gtk::Builder</classname> instance to asn19125#, fuzzy
>sociate a <classname>Gtk::Builder</classname> ui file with our application windo 
>w class." 
19126msgid ""
19127"In this step, we use a <classname>Gtk::Builder</classname> instance to "
19128"associate a <classname>Gtk::Builder</classname> ui file with our application "
19129"window class."
9224msgstr ""19130msgstr ""
nn19131"I detta steg använder vi en <classname>Gtk::Builder</classname>-instans för "
19132"att associera en <classname>Gtk::Builder</classname>-ui-fil med vår "
19133"programfönsterklass."
922519134
9226#. (itstool) path: section/para19135#. (itstool) path: section/para
9227#: C/index-in.docbook:832919136#: C/index-in.docbook:8329
n9228msgid "Our simple ui file gives the window a title, and puts a <classname>Gtk::Sn19137#, fuzzy
>tack</classname> widget as the main content." 
19138msgid ""
19139"Our simple ui file gives the window a title, and puts a <classname>Gtk::"
19140"Stack</classname> widget as the main content."
9229msgstr ""19141msgstr ""
nn19142"Vår enkla ui-fil ger fönstret en titel och sätter en <classname>Gtk::Stack</"
19143"classname>-komponent som huvudinnehållet."
923019144
9231#. (itstool) path: section/para19145#. (itstool) path: section/para
9232#: C/index-in.docbook:833419146#: C/index-in.docbook:8334
n9233msgid "To make use of this file in our application, we revisit our <classname>Gtn19147#, fuzzy
>k::ApplicationWindow</classname> subclass, and call <methodname>Gtk::Builder::cr 
>eate_from_resource()</methodname> and <methodname>Gtk::Builder::get_widget_deriv 
>ed()</methodname> from the <methodname>ExampleAppWindow::create()</methodname> m 
>ethod to get an instance of our subclassed <classname>Gtk::ApplicationWindow</cl 
>assname>. See the <link linkend=\"sec-builder-using-derived-widgets\">Using deri 
>ved widgets</link> section for more information about <methodname>get_widget_der 
>ived()</methodname>." 
19148msgid ""
19149"To make use of this file in our application, we revisit our <classname>Gtk::"
19150"ApplicationWindow</classname> subclass, and call <methodname>Gtk::Builder::"
19151"create_from_resource()</methodname> and <methodname>Gtk::Builder::"
19152"get_widget_derived()</methodname> from the <methodname>ExampleAppWindow::"
19153"create()</methodname> method to get an instance of our subclassed "
19154"<classname>Gtk::ApplicationWindow</classname>. See the <link linkend=\"sec-"
19155"builder-using-derived-widgets\">Using derived widgets</link> section for "
19156"more information about <methodname>get_widget_derived()</methodname>."
9234msgstr ""19157msgstr ""
nn19158"För att använda denna fil i vårt program besöker vi åter vår underklass "
19159"<classname>Gtk::ApplicationWindow</classname>, och anropar <methodname>Gtk::"
19160"Builder::create_from_resource()</methodname> och <methodname>Gtk::Builder::"
19161"get_widget_derived()</methodname> från metoden <methodname>ExampleAppWindow::"
19162"create()</methodname> för att får en instans av vårt underklassade "
19163"<classname>Gtk::ApplicationWindow</classname>. Se avsnittet <link "
19164"linkend=\"sec-builder-using-derived-widgets\">Använda härledda komponenter</"
19165"link> för mer information om <methodname>get_widget_derived()</methodname>."
923519166
9236#. (itstool) path: para/screen19167#. (itstool) path: para/screen
9237#: C/index-in.docbook:835319168#: C/index-in.docbook:8353
n9238#, no-wrapn19169#, fuzzy, no-wrap
9239msgid ""
9240"$ glib-compile-resources --target=resources.c --generate-source exampleapp.gres19170msgid "$ glib-compile-resources --target=resources.c --generate-source exampleap
>ource.xml">p.gresource.xml"
9241msgstr ""19171msgstr "$ glib-compile-resources --target=resources.c --generate-source examplea
 >pp.gresource.xml"
924219172
9243#. (itstool) path: section/para19173#. (itstool) path: section/para
9244#: C/index-in.docbook:834519174#: C/index-in.docbook:8345
n9245msgid "You may have noticed that we use the <methodname>_from_resource()</methodn19175#, fuzzy
>name> variant of the method that reads the ui file. Now we need to use <applicat 
>ion>GLib</application>'s resource functionality to include the ui file in the bi 
>nary. This is commonly done by listing all resources in a .gresource.xml file. T 
>his file has to be converted into a C source file that will be compiled and link 
>ed into the application together with the other source files. To do so, we use t 
>he <application>glib-compile-resources</application> utility: <_:screen-1/> The  
><link linkend=\"sec-gio-resource\">Gio::Resource and glib-compile-resources</lin 
>k> section contains more information about resource files. If you build with Mes 
>on, use the <function>compile_resources()</function> function in Meson's <link x 
>link:href=\"https://mesonbuild.com/Gnome-module.html\">GNOME module</link>." 
19176msgid ""
19177"You may have noticed that we use the <methodname>_from_resource()</"
19178"methodname> variant of the method that reads the ui file. Now we need to use "
19179"<application>GLib</application>'s resource functionality to include the ui "
19180"file in the binary. This is commonly done by listing all resources in a ."
19181"gresource.xml file. This file has to be converted into a C source file that "
19182"will be compiled and linked into the application together with the other "
19183"source files. To do so, we use the <application>glib-compile-resources</"
19184"application> utility: <_:screen-1/> The <link linkend=\"sec-gio-"
19185"resource\">Gio::Resource and glib-compile-resources</link> section contains "
19186"more information about resource files. If you build with Meson, use the "
19187"<function>compile_resources()</function> function in Meson's <link xlink:"
19188"href=\"https://mesonbuild.com/Gnome-module.html\">GNOME module</link>."
9246msgstr ""19189msgstr ""
nn19190"Du kan ha upptäckt att vi använder varianten <methodname>_from_resource()</"
19191"methodname> för metoden som läser ui-filen. Nu behöver vi använda "
19192"<application>GLib</application>s resursfunktionalitet för att inkludera ui-"
19193"filen i binären. Detta görs vanligen genom att lista alla resurser i en ."
19194"gresource.xml-fil. Denna fil måste konverteras till en C-källfil som kommer "
19195"kompileras och länkas till av programmet tillsammans med de andra "
19196"källfilerna. För att göra det använder vi verktyget <application>glib-"
19197"compile-resources</application>: <_:screen-1/> Avsnittet <link linkend=\"sec-"
19198"gio-resource\">Gio::Resource och glib-compile-resources</link> innehåller "
19199"mer information om resursfiler. Om du bygger med Meson använder du "
19200"funktionen <function>compile_resources()</function> i Mesons <link xlink:"
19201"href=\"https://mesonbuild.com/Gnome-module.html\">GNOME-modul</link>."
924719202
9248#. (itstool) path: section/para19203#. (itstool) path: section/para
9249#: C/index-in.docbook:836019204#: C/index-in.docbook:8360
9250msgid "Our application now looks like this:"19205msgid "Our application now looks like this:"
n9251msgstr ""n19206msgstr "Vårt program ser nu ut så här:"
925219207
9253#. (itstool) path: imageobject/imagedata19208#. (itstool) path: imageobject/imagedata
9254#. This is a reference to an external file such as an image or video. When19209#. This is a reference to an external file such as an image or video. When
9255#. the file changes, the md5 hash will change to let you know you need to19210#. the file changes, the md5 hash will change to let you know you need to
9256#. update your localized copy. The msgstr is not used at all. Set it to19211#. update your localized copy. The msgstr is not used at all. Set it to
9257#. whatever you like once you have updated your copy of the file.19212#. whatever you like once you have updated your copy of the file.
9258#: C/index-in.docbook:836719213#: C/index-in.docbook:8367
nn19214#, fuzzy
9259msgctxt "_"19215msgctxt "_"
n9260msgid "external ref='figures/buildapp_populating_window.png' md5='4af45b6a60b397n19216msgid ""
>3334ac91eb3f1dcf91'" 
19217"external ref='figures/buildapp_populating_window.png' "
19218"md5='4af45b6a60b3973334ac91eb3f1dcf91'"
9261msgstr ""19219msgstr ""
nn19220"external ref='figures/buildapp_populating_window.png' "
19221"md5='4af45b6a60b3973334ac91eb3f1dcf91'"
926219222
9263#. (itstool) path: section/para19223#. (itstool) path: section/para
9264#: C/index-in.docbook:837119224#: C/index-in.docbook:8371
n9265msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19225msgid ""
>e/master/examples/book/buildapp/step2\">Source Code</link>" 
19226"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19227"master/examples/book/buildapp/step2\">Source Code</link>"
9266msgstr ""19228msgstr ""
nn19229"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19230"master/examples/book/buildapp/step2\">Källkod</link>"
926719231
9268#. (itstool) path: section/title19232#. (itstool) path: section/title
9269#. (itstool) path: figure/title19233#. (itstool) path: figure/title
n9270#: C/index-in.docbook:8376n19234#: C/index-in.docbook:8376 C/index-in.docbook:8412
9271#: C/index-in.docbook:8412
9272msgid "Opening files"19235msgid "Opening files"
n9273msgstr ""n19236msgstr "Öppna filer"
927419237
9275#. (itstool) path: section/para19238#. (itstool) path: section/para
9276#: C/index-in.docbook:837819239#: C/index-in.docbook:8378
nn19240msgid ""
9277msgid "In this step, we make our application show the contents of all the files 19241"In this step, we make our application show the contents of all the files "
>that it is given on the commandline." 
19242"that it is given on the commandline."
9278msgstr ""19243msgstr ""
nn19244"I detta steg får vi vårt program att visa innehållet för alla filer som det "
19245"fått på kommandoraden."
927919246
9280#. (itstool) path: section/para19247#. (itstool) path: section/para
9281#: C/index-in.docbook:838319248#: C/index-in.docbook:8383
n9282msgid "To this end, we add a data member to our application window and keep a pon19249#, fuzzy
>inter to the <classname>Gtk::Stack</classname> there. We get the pointer with a  
>call to <methodname>Gtk::Builder::get_widget()</methodname> in the application w 
>indow's constructor." 
19250msgid ""
19251"To this end, we add a data member to our application window and keep a "
19252"pointer to the <classname>Gtk::Stack</classname> there. We get the pointer "
19253"with a call to <methodname>Gtk::Builder::get_widget()</methodname> in the "
19254"application window's constructor."
9283msgstr ""19255msgstr ""
nn19256"För detta lägger vi till en datamedlem till vårt programfönster och behåller "
19257"en pekare till vår <classname>Gtk::Stack</classname> där. Vi får pekaren med "
19258"ett anrop till <methodname>Gtk::Builder::get_widget()</methodname> i "
19259"programfönstrets konstruktor."
928419260
9285#. (itstool) path: section/para19261#. (itstool) path: section/para
9286#: C/index-in.docbook:838919262#: C/index-in.docbook:8389
n9287msgid "Now we revisit the <methodname>ExampleAppWindow::open_file_view()</methodn19263#, fuzzy
>name> method that is called for each commandline argument, and construct a <clas 
>sname>Gtk::TextView</classname> that we then add as a page to the stack." 
19264msgid ""
19265"Now we revisit the <methodname>ExampleAppWindow::open_file_view()</"
19266"methodname> method that is called for each commandline argument, and "
19267"construct a <classname>Gtk::TextView</classname> that we then add as a page "
19268"to the stack."
9288msgstr ""19269msgstr ""
nn19270"Nu besöker vi åter metoden <methodname>ExampleAppWindow::open_file_view()</"
19271"methodname> som anropas för varje kommandoradsargument, och konstruerar en "
19272"<classname>Gtk::TextView</classname> som vi sedan lägger till som en sida i "
19273"stacken."
928919274
9290#. (itstool) path: section/para19275#. (itstool) path: section/para
9291#: C/index-in.docbook:839519276#: C/index-in.docbook:8395
n9292msgid "Lastly, we add a <classname>Gtk::StackSwitcher</classname> to the titleban19277#, fuzzy
>r area in the ui file, and we tell it to display information about our stack." 
19278msgid ""
19279"Lastly, we add a <classname>Gtk::StackSwitcher</classname> to the titlebar "
19280"area in the ui file, and we tell it to display information about our stack."
9293msgstr ""19281msgstr ""
nn19282"Slutligen lägger vi till en <classname>Gtk::StackSwitcher</classname> till "
19283"namnlistsområdet i ui-filen, och säger till den att visa information om vår "
19284"stack."
929419285
9295#. (itstool) path: section/para19286#. (itstool) path: section/para
9296#: C/index-in.docbook:840019287#: C/index-in.docbook:8400
n9297msgid "The stack switcher gets all its information it needs to display tabs fromn19288#, fuzzy
> the stack that it belongs to. Here, we are passing the label to show for each f 
>ile as the last argument to the <methodname>Gtk::Stack::add()</methodname> metho 
>d." 
19289msgid ""
19290"The stack switcher gets all its information it needs to display tabs from "
19291"the stack that it belongs to. Here, we are passing the label to show for "
19292"each file as the last argument to the <methodname>Gtk::Stack::add()</"
19293"methodname> method."
9298msgstr ""19294msgstr ""
nn19295"Stackväxlaren får all information den behöver för att visa flika rån stacken "
19296"som den hör till. Här skickar vi etiketten att visa för varje fil som det "
19297"sista argumentet till <methodname>Gtk::Stack::add()</methodname>-metoden."
929919298
9300#. (itstool) path: section/para19299#. (itstool) path: section/para
9301#: C/index-in.docbook:840719300#: C/index-in.docbook:8407
9302msgid "Our application is beginning to take shape:"19301msgid "Our application is beginning to take shape:"
n9303msgstr ""n19302msgstr "Vårt program börjar få form:"
930419303
9305#. (itstool) path: imageobject/imagedata19304#. (itstool) path: imageobject/imagedata
9306#. This is a reference to an external file such as an image or video. When19305#. This is a reference to an external file such as an image or video. When
9307#. the file changes, the md5 hash will change to let you know you need to19306#. the file changes, the md5 hash will change to let you know you need to
9308#. update your localized copy. The msgstr is not used at all. Set it to19307#. update your localized copy. The msgstr is not used at all. Set it to
9309#. whatever you like once you have updated your copy of the file.19308#. whatever you like once you have updated your copy of the file.
9310#: C/index-in.docbook:841419309#: C/index-in.docbook:8414
nn19310#, fuzzy
9311msgctxt "_"19311msgctxt "_"
n9312msgid "external ref='figures/buildapp_opening_files.png' md5='ad2373e10879d9724cn19312msgid ""
>91408aa6dbd4c3'" 
19313"external ref='figures/buildapp_opening_files.png' "
19314"md5='ad2373e10879d9724c91408aa6dbd4c3'"
9313msgstr ""19315msgstr ""
nn19316"external ref='figures/buildapp_opening_files.png' "
19317"md5='ad2373e10879d9724c91408aa6dbd4c3'"
931419318
9315#. (itstool) path: section/para19319#. (itstool) path: section/para
9316#: C/index-in.docbook:841819320#: C/index-in.docbook:8418
n9317msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19321msgid ""
>e/master/examples/book/buildapp/step3\">Source Code</link>" 
19322"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19323"master/examples/book/buildapp/step3\">Source Code</link>"
9318msgstr ""19324msgstr ""
nn19325"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19326"master/examples/book/buildapp/step3\">Källkod</link>"
931919327
9320#. (itstool) path: section/title19328#. (itstool) path: section/title
9321#. (itstool) path: figure/title19329#. (itstool) path: figure/title
n9322#: C/index-in.docbook:8423n19330#: C/index-in.docbook:8423 C/index-in.docbook:8458
9323#: C/index-in.docbook:8458
9324msgid "A menu"19331msgid "A menu"
n9325msgstr ""n19332msgstr "En meny"
932619333
9327#. (itstool) path: section/para19334#. (itstool) path: section/para
9328#: C/index-in.docbook:842519335#: C/index-in.docbook:8425
n9329msgid "The menu is shown at the right side of the headerbar. It is meant to colln19336msgid ""
>ect infrequently used actions that affect the whole application." 
19337"The menu is shown at the right side of the headerbar. It is meant to collect "
19338"infrequently used actions that affect the whole application."
9330msgstr ""19339msgstr ""
nn19340"Menyn visas på höger sida av rubrikraden. Den är tänkt att samla mer sällan "
19341"använda åtgärder som påverkar hela programmet."
933119342
9332#. (itstool) path: section/para19343#. (itstool) path: section/para
9333#: C/index-in.docbook:843019344#: C/index-in.docbook:8430
nn19345#, fuzzy
19346msgid ""
9334msgid "Just like the application window, we specify our menu in a ui file, and a19347"Just like the application window, we specify our menu in a ui file, and add "
>dd it as a resource to our binary." 
19348"it as a resource to our binary."
9335msgstr ""19349msgstr ""
nn19350"Precis som programfönstret specificerar vi vår meny i en ui-fil, och lägger "
19351"till den som en resurs till vår binär."
933619352
9337#. (itstool) path: section/para19353#. (itstool) path: section/para
9338#: C/index-in.docbook:843519354#: C/index-in.docbook:8435
n9339msgid "To make the menu appear, we have to load the ui file and associate the ren19355#, fuzzy
>sulting menu model with the menu button that we've added to the headerbar. Since 
> menus work by activating <classname>Gio::Action</classname>s, we also have to a 
>dd a suitable set of actions to our application." 
19356msgid ""
19357"To make the menu appear, we have to load the ui file and associate the "
19358"resulting menu model with the menu button that we've added to the headerbar. "
19359"Since menus work by activating <classname>Gio::Action</classname>s, we also "
19360"have to add a suitable set of actions to our application."
9340msgstr ""19361msgstr ""
nn19362"För att få menyn att dyka upp måste vi läsa in ui-filen och associera den "
19363"resulterande menymodellen med menyknappen som vi lagt till i rubrikraden. Då "
19364"menyer fungerar genom att aktivera <classname>Gio::Action</classname>-"
19365"åtgärder så måste vi också lägga till en lämplig uppsättning åtgärder till "
19366"vårt program."
934119367
9342#. (itstool) path: section/para19368#. (itstool) path: section/para
9343#: C/index-in.docbook:844219369#: C/index-in.docbook:8442
n9344msgid "Adding the actions is best done in the <methodname>on_startup()</methodnan19370#, fuzzy
>me> default signal handler, which is guaranteed to be called once for each prima 
>ry application instance." 
19371msgid ""
19372"Adding the actions is best done in the <methodname>on_startup()</methodname> "
19373"default signal handler, which is guaranteed to be called once for each "
19374"primary application instance."
9345msgstr ""19375msgstr ""
nn19376"Att lägga till åtgärderna görs bäst i standardsignalhanteraren "
19377"<methodname>on_startup()</methodname>, vilken är garanterad att anropas en "
19378"gång för varje primär programinstans."
934619379
9347#. (itstool) path: section/para19380#. (itstool) path: section/para
9348#: C/index-in.docbook:844719381#: C/index-in.docbook:8447
n9349msgid "Our preferences menu item does not do anything yet, but the Quit menu iten19382#, fuzzy
>m is fully functional. It can also be activated by the usual Ctrl-Q shortcut. Th 
>e shortcut is added with <methodname>Gtk::Application::set_accel_for_action()</m 
>ethodname>." 
19383msgid ""
19384"Our preferences menu item does not do anything yet, but the Quit menu item "
19385"is fully functional. It can also be activated by the usual Ctrl-Q shortcut. "
19386"The shortcut is added with <methodname>Gtk::Application::"
19387"set_accel_for_action()</methodname>."
9350msgstr ""19388msgstr ""
nn19389"Vårt inställningsmenyobjekt gör inte något ännu, men Quit-menyobjektet "
19390"fungerar. Det kan också aktiveras genom det vanliga kortkommandot Ctrl-Q. "
19391"Kortkommandot läggs till med <methodname>Gtk::Application::"
19392"set_accel_for_action()</methodname>."
935119393
9352#. (itstool) path: section/para19394#. (itstool) path: section/para
9353#: C/index-in.docbook:845319395#: C/index-in.docbook:8453
9354msgid "The menu looks like this:"19396msgid "The menu looks like this:"
n9355msgstr ""n19397msgstr "Menyn ser ut så här:"
935619398
9357#. (itstool) path: imageobject/imagedata19399#. (itstool) path: imageobject/imagedata
9358#. This is a reference to an external file such as an image or video. When19400#. This is a reference to an external file such as an image or video. When
9359#. the file changes, the md5 hash will change to let you know you need to19401#. the file changes, the md5 hash will change to let you know you need to
9360#. update your localized copy. The msgstr is not used at all. Set it to19402#. update your localized copy. The msgstr is not used at all. Set it to
9361#. whatever you like once you have updated your copy of the file.19403#. whatever you like once you have updated your copy of the file.
9362#: C/index-in.docbook:846019404#: C/index-in.docbook:8460
nn19405#, fuzzy
9363msgctxt "_"19406msgctxt "_"
n9364msgid "external ref='figures/buildapp_menu.png' md5='a9d0d291ab0f472a7cd9c38c011n19407msgid ""
>30d8d'" 
19408"external ref='figures/buildapp_menu.png' "
19409"md5='a9d0d291ab0f472a7cd9c38c01130d8d'"
9365msgstr ""19410msgstr ""
nn19411"external ref='figures/buildapp_menu.png' "
19412"md5='a9d0d291ab0f472a7cd9c38c01130d8d'"
936619413
9367#. (itstool) path: section/para19414#. (itstool) path: section/para
9368#: C/index-in.docbook:846419415#: C/index-in.docbook:8464
n9369msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19416msgid ""
>e/master/examples/book/buildapp/step4\">Source Code</link>" 
19417"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19418"master/examples/book/buildapp/step4\">Source Code</link>"
9370msgstr ""19419msgstr ""
nn19420"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19421"master/examples/book/buildapp/step4\">Källkod</link>"
937119422
9372#. (itstool) path: section/title19423#. (itstool) path: section/title
9373#. (itstool) path: figure/title19424#. (itstool) path: figure/title
n9374#: C/index-in.docbook:8469n19425#: C/index-in.docbook:8469 C/index-in.docbook:8539
9375#: C/index-in.docbook:8539
9376msgid "A preference dialog"19426msgid "A preference dialog"
n9377msgstr ""n19427msgstr "En inställningsdialog"
937819428
9379#. (itstool) path: section/para19429#. (itstool) path: section/para
9380#: C/index-in.docbook:847119430#: C/index-in.docbook:8471
n9381msgid "A typical application will have some preferences that should be rememberen19431msgid ""
>d from one run to the next. Even for our simple example application, we may want 
> to change the font that is used for the content." 
19432"A typical application will have some preferences that should be remembered "
19433"from one run to the next. Even for our simple example application, we may "
19434"want to change the font that is used for the content."
9382msgstr ""19435msgstr ""
nn19436"Ett typiskt program kommer ha några inställningar som ska kommas ihåg från "
19437"en körning till den andra. Även för vårt enkla exempelprogram kan vi vilja "
19438"ändra typsnittet som används för innehållet."
938319439
9384#. (itstool) path: section/para19440#. (itstool) path: section/para
9385#: C/index-in.docbook:847719441#: C/index-in.docbook:8477
n9386msgid "We are going to use <classname>Gio::Settings</classname> to store our pren19442#, fuzzy
>ferences. <classname>Gio::Settings</classname> requires a schema that describes  
>our settings, in our case the <filename>org.gtkmm.exampleapp.gschema.xml</filena 
>me> file." 
19443msgid ""
19444"We are going to use <classname>Gio::Settings</classname> to store our "
19445"preferences. <classname>Gio::Settings</classname> requires a schema that "
19446"describes our settings, in our case the <filename>org.gtkmm.exampleapp."
19447"gschema.xml</filename> file."
9387msgstr ""19448msgstr ""
nn19449"Vi kommer använda <classname>Gio::Settings</classname> för att lagra våra "
19450"inställningar. <classname>Gio::Settings</classname> kräver ett schema som "
19451"beskriver våra inställningar, i vårt fall filen <filename>org.gtkmm."
19452"exampleapp.gschema.xml</filename>."
938819453
9389#. (itstool) path: section/para19454#. (itstool) path: section/para
9390#: C/index-in.docbook:848319455#: C/index-in.docbook:8483
n9391msgid "Before we can make use of this schema in our application, we need to compn19456#, fuzzy
>ile it into the binary form that <classname>Gio::Settings</classname> expects. G 
>IO provides macros to do this in autotools-based projects. See the description o 
>f <link xlink:href=\"https://docs.gtk.org/gio/class.Settings.html\">GSettings</l 
>ink>. Meson provides the <function>compile_schemas()</function> function in the  
><link xlink:href=\"https://mesonbuild.com/Gnome-module.html\">GNOME module</link 
>>." 
19457msgid ""
19458"Before we can make use of this schema in our application, we need to compile "
19459"it into the binary form that <classname>Gio::Settings</classname> expects. "
19460"GIO provides macros to do this in autotools-based projects. See the "
19461"description of <link xlink:href=\"https://docs.gtk.org/gio/class.Settings."
19462"html\">GSettings</link>. Meson provides the <function>compile_schemas()</"
19463"function> function in the <link xlink:href=\"https://mesonbuild.com/Gnome-"
19464"module.html\">GNOME module</link>."
9392msgstr ""19465msgstr ""
nn19466"Innan vi kan använda detta schema i vårt program behöver vi kompilera det "
19467"till den binärform som <classname>Gio::Settings</classname> förväntar sig. "
19468"GIO tillhandahåller makron för att göra detta i autotools-baserade projekt. "
19469"Se beskrivningen av <link xlink:href=\"https://docs.gtk.org/gio/class."
19470"Settings.html\">GSettings</link>. Meson tillhandahåller funktionen "
19471"<function>compile_schemas()</function> i <link xlink:href=\"https://"
19472"mesonbuild.com/Gnome-module.html\">GNOME-modulen</link>."
939319473
9394#. (itstool) path: section/para19474#. (itstool) path: section/para
9395#: C/index-in.docbook:849219475#: C/index-in.docbook:8492
n9396msgid "Next, we need to connect our settings to the widgets that they are supposn19476#, fuzzy
>ed to control. One convenient way to do this is to use <methodname>Gio::Settings 
>::bind()</methodname> to bind settings keys to object properties, as we do for t 
>he transition setting in <classname>ExampleAppWindow</classname>'s constructor." 
19477msgid ""
19478"Next, we need to connect our settings to the widgets that they are supposed "
19479"to control. One convenient way to do this is to use <methodname>Gio::"
19480"Settings::bind()</methodname> to bind settings keys to object properties, as "
19481"we do for the transition setting in <classname>ExampleAppWindow</"
19482"classname>'s constructor."
9397msgstr ""19483msgstr ""
nn19484"Härnäst behöver vi ansluta våra inställningar till komponenterna som de "
19485"förväntas styra. Ett praktiskt sätt att göra detta är att använda "
19486"<methodname>Gio::Settings::bind()</methodname> för att binda "
19487"inställningstangenter som vi gör för övergångsinställningen i "
19488"<classname>ExampleAppWindow</classname>s konstruktor."
939819489
9399#. (itstool) path: section/programlisting19490#. (itstool) path: section/programlisting
9400#: C/index-in.docbook:849819491#: C/index-in.docbook:8498
n9401#, no-wrapn19492#, fuzzy, no-wrap
9402msgid ""19493msgid ""
9403"<code>m_settings = Gio::Settings::create(\"org.gtkmm.exampleapp\");\n"19494"<code>m_settings = Gio::Settings::create(\"org.gtkmm.exampleapp\");\n"
9404"m_settings-&gt;bind(\"transition\", m_stack-&gt;property_transition_type());\n"19495"m_settings-&gt;bind(\"transition\", m_stack-&gt;property_transition_type());\n"
9405"</code>"19496"</code>"
9406msgstr ""19497msgstr ""
nn19498"\n"
19499"m_settings = Gio::Settings::create(\"org.gtkmm.exampleapp\");\n"
19500"m_settings-&gt;bind(\"transition\", m_stack-&gt;property_transition_type());\n"
940719501
9408#. (itstool) path: section/para19502#. (itstool) path: section/para
9409#: C/index-in.docbook:850219503#: C/index-in.docbook:8502
n9410msgid "The code to connect the font setting is a little more involved, since it n19504#, fuzzy
>corresponds to an object property in a <classname>Gtk::TextTag</classname> that  
>we must first create. The code is in <methodname>ExampleAppWindow::open_file_vie 
>w()</methodname>." 
19505msgid ""
19506"The code to connect the font setting is a little more involved, since it "
19507"corresponds to an object property in a <classname>Gtk::TextTag</classname> "
19508"that we must first create. The code is in <methodname>ExampleAppWindow::"
19509"open_file_view()</methodname>."
9411msgstr ""19510msgstr ""
nn19511"Koden för att ansluta till typsnittsinställningen är lite mer avancerad då "
19512"den motsvarar en objektegenskap i en <classname>Gtk::TextTag</classname> som "
19513"vi först måste skapa. Koden finns i <methodname>ExampleAppWindow::"
19514"open_file_view()</methodname>."
941219515
9413#. (itstool) path: section/programlisting19516#. (itstool) path: section/programlisting
9414#: C/index-in.docbook:850719517#: C/index-in.docbook:8507
n9415#, no-wrapn19518#, fuzzy, no-wrap
9416msgid ""19519msgid ""
9417"<code>auto tag = buffer-&gt;create_tag();\n"19520"<code>auto tag = buffer-&gt;create_tag();\n"
9418"m_settings-&gt;bind(\"font\", tag-&gt;property_font());\n"19521"m_settings-&gt;bind(\"font\", tag-&gt;property_font());\n"
9419"buffer-&gt;apply_tag(tag, buffer-&gt;begin(), buffer-&gt;end());\n"19522"buffer-&gt;apply_tag(tag, buffer-&gt;begin(), buffer-&gt;end());\n"
9420"</code>"19523"</code>"
9421msgstr ""19524msgstr ""
nn19525"\n"
19526"auto tag = buffer-&gt;create_tag();\n"
19527"m_settings-&gt;bind(\"font\", tag-&gt;property_font());\n"
19528"buffer-&gt;apply_tag(tag, buffer-&gt;begin(), buffer-&gt;end());\n"
942219529
9423#. (itstool) path: section/para19530#. (itstool) path: section/para
9424#: C/index-in.docbook:851219531#: C/index-in.docbook:8512
n9425msgid "At this point, the application will already react if you change one of thn19532#, fuzzy
>e settings, e.g. using the <command>gsettings</command> commandline tool. Of cou 
>rse, we expect the application to provide a preference dialog for these. So lets 
> do that now. Our preference dialog will be a subclass of <classname>Gtk::Window 
></classname>, and we'll use the same techniques that we've already seen in <clas 
>sname>ExampleAppWindow</classname>: a <classname>Gtk::Builder</classname> ui fil 
>e and settings bindings. In this case the bindings are more involved, though. We 
> use <classname>Gtk::FontDialogButton</classname> and <classname>Gtk::DropDown</ 
>classname> in the preference dialog. The types of the properties in these classe 
>s can't be automatically converted to the string type that <classname>Gio::Setti 
>ngs</classname> requires." 
19533msgid ""
19534"At this point, the application will already react if you change one of the "
19535"settings, e.g. using the <command>gsettings</command> commandline tool. Of "
19536"course, we expect the application to provide a preference dialog for these. "
19537"So lets do that now. Our preference dialog will be a subclass of "
19538"<classname>Gtk::Window</classname>, and we'll use the same techniques that "
19539"we've already seen in <classname>ExampleAppWindow</classname>: a "
19540"<classname>Gtk::Builder</classname> ui file and settings bindings. In this "
19541"case the bindings are more involved, though. We use <classname>Gtk::"
19542"FontDialogButton</classname> and <classname>Gtk::DropDown</classname> in the "
19543"preference dialog. The types of the properties in these classes can't be "
19544"automatically converted to the string type that <classname>Gio::Settings</"
19545"classname> requires."
9426msgstr ""19546msgstr ""
nn19547"Vid denna punkt kommer programmet redan reagera om du ändrar en av "
19548"inställningarna, exempelvis genom att använda kommandoradsverktyget "
19549"<command>gsettings</command>. Vi förväntar oss förstås att programmet "
19550"tillhandahåller en inställningsdialog för dessa. Så låt oss göra så nu. Vår "
19551"inställningsdialog kommer vara en underklass av <classname>Gtk::Dialog</"
19552"classname>, och vi kommer använda samma tekniker som vi redan sett i "
19553"<classname>ExampleAppWindow</classname>: en <classname>Gtk::Builder</"
19554"classname>-ui-fil och inställningsbindningar. I detta fall är dock "
19555"bindningarna mer avancerade. Vi använder <classname>Gtk::FontDialogButton</"
19556"classname> och <classname>Gtk::DropDown</classname> i inställningsdialogen. "
19557"Typerna för egenskaperna i dessa klasser kan inte automatiskt konverteras "
19558"till den strängtyp som <classname>Gio::Settings</classname> kräver."
942719559
9428#. (itstool) path: section/para19560#. (itstool) path: section/para
9429#: C/index-in.docbook:852519561#: C/index-in.docbook:8525
n9430msgid "When we've created the <filename>prefs.ui</filename> file and the <classnn19562#, fuzzy
>ame>ExampleAppPrefs</classname> class, we revisit the <methodname>ExampleApplica 
>tion::on_action_preferences()</methodname> method in our application class, and  
>make it open a new preference dialog." 
19563msgid ""
19564"When we've created the <filename>prefs.ui</filename> file and the "
19565"<classname>ExampleAppPrefs</classname> class, we revisit the "
19566"<methodname>ExampleApplication::on_action_preferences()</methodname> method "
19567"in our application class, and make it open a new preference dialog."
9431msgstr ""19568msgstr ""
nn19569"När vi skapat filen <filename>prefs.ui</filename> och klassen "
19570"<classname>ExampleAppPrefs</classname> besöker vi åter metoden "
19571"<methodname>ExampleApplication::on_action_preferences()</methodname> i vår "
19572"programklass, och får den att öppna en ny inställningsdialog."
943219573
9433#. (itstool) path: section/programlisting19574#. (itstool) path: section/programlisting
9434#: C/index-in.docbook:853019575#: C/index-in.docbook:8530
n9435#, no-wrapn19576#, fuzzy, no-wrap
19577#| msgid ""
19578#| "\n"
19579#| "auto prefs_dialog = ExampleAppPrefs::create(*get_active_window());\n"
19580#| "prefs_dialog-&gt;present();\n"
9436msgid ""19581msgid ""
9437"<code>auto prefs_dialog = ExampleAppPrefs::create(*get_active_window());\n"19582"<code>auto prefs_dialog = ExampleAppPrefs::create(*get_active_window());\n"
9438"prefs_dialog-&gt;present();\n"19583"prefs_dialog-&gt;present();\n"
9439"</code>"19584"</code>"
9440msgstr ""19585msgstr ""
nn19586"\n"
19587"auto prefs_dialog = ExampleAppPrefs::create(*get_active_window());\n"
19588"prefs_dialog-&gt;present();\n"
944119589
9442#. (itstool) path: section/para19590#. (itstool) path: section/para
9443#: C/index-in.docbook:853419591#: C/index-in.docbook:8534
nn19592msgid ""
9444msgid "After all this work, our application can now show a preference dialog lik19593"After all this work, our application can now show a preference dialog like "
>this:" 
19594"this:"
9445msgstr ""19595msgstr ""
nn19596"Efter allt detta arbete kan vårt program nu visa en sådan här "
19597"inställningsdialog:"
944619598
9447#. (itstool) path: imageobject/imagedata19599#. (itstool) path: imageobject/imagedata
9448#. This is a reference to an external file such as an image or video. When19600#. This is a reference to an external file such as an image or video. When
9449#. the file changes, the md5 hash will change to let you know you need to19601#. the file changes, the md5 hash will change to let you know you need to
9450#. update your localized copy. The msgstr is not used at all. Set it to19602#. update your localized copy. The msgstr is not used at all. Set it to
9451#. whatever you like once you have updated your copy of the file.19603#. whatever you like once you have updated your copy of the file.
9452#: C/index-in.docbook:854119604#: C/index-in.docbook:8541
nn19605#, fuzzy
9453msgctxt "_"19606msgctxt "_"
n9454msgid "external ref='figures/buildapp_pref_dialog.png' md5='ecc7fa5d31086c536a5an19607msgid ""
>d279eddfbf23'" 
19608"external ref='figures/buildapp_pref_dialog.png' "
19609"md5='ecc7fa5d31086c536a5ad279eddfbf23'"
9455msgstr ""19610msgstr ""
nn19611"external ref='figures/buildapp_pref_dialog.png' "
19612"md5='ecc7fa5d31086c536a5ad279eddfbf23'"
945619613
9457#. (itstool) path: section/para19614#. (itstool) path: section/para
9458#: C/index-in.docbook:854519615#: C/index-in.docbook:8545
n9459msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19616msgid ""
>e/master/examples/book/buildapp/step5\">Source Code</link>" 
19617"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19618"master/examples/book/buildapp/step5\">Source Code</link>"
9460msgstr ""19619msgstr ""
nn19620"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19621"master/examples/book/buildapp/step5\">Källkod</link>"
946119622
9462#. (itstool) path: section/title19623#. (itstool) path: section/title
9463#. (itstool) path: figure/title19624#. (itstool) path: figure/title
n9464#: C/index-in.docbook:8550n19625#: C/index-in.docbook:8550 C/index-in.docbook:8592
9465#: C/index-in.docbook:8592
9466msgid "Adding a search bar"19626msgid "Adding a search bar"
n9467msgstr ""n19627msgstr "Lägga till en sökrad"
946819628
9469#. (itstool) path: section/para19629#. (itstool) path: section/para
9470#: C/index-in.docbook:855219630#: C/index-in.docbook:8552
n9471msgid "We continue to flesh out the functionality of our application. For now, wn19631#, fuzzy
>e add search. <application>gtkmm</application> supports this with <classname>Gtk 
>::SearchEntry</classname> and <classname>Gtk::SearchBar</classname>. The search  
>bar is a widget that can slide in from the top to present a search entry." 
19632msgid ""
19633"We continue to flesh out the functionality of our application. For now, we "
19634"add search. <application>gtkmm</application> supports this with "
19635"<classname>Gtk::SearchEntry</classname> and <classname>Gtk::SearchBar</"
19636"classname>. The search bar is a widget that can slide in from the top to "
19637"present a search entry."
9472msgstr ""19638msgstr ""
nn19639"Vi fortsätter fylla ut vårt programs funktionalitet. Nu lägger vi till "
19640"sökning. <application>gtkmm</application> stöder detta med <classname>Gtk::"
19641"SearchEntry</classname> och <classname>Gtk::SearchBar</classname>. Sökraden "
19642"är en komponent som kan glida ner från toppen för att visa ett sökfält."
947319643
9474#. (itstool) path: section/para19644#. (itstool) path: section/para
9475#: C/index-in.docbook:855819645#: C/index-in.docbook:8558
n9476msgid "We add a toggle button to the header bar, which can be used to slide out n19646#, fuzzy
>the search bar below the header bar. The new widgets are added in the <filename> 
>window.ui</filename> file." 
19647msgid ""
19648"We add a toggle button to the header bar, which can be used to slide out the "
19649"search bar below the header bar. The new widgets are added in the "
19650"<filename>window.ui</filename> file."
9477msgstr ""19651msgstr ""
nn19652"Vi lägger till en växlingsknapp till rubrikraden, som kan användas för att "
19653"glida ut sökraden nedanför rubrikraden. De nya komponenterna läggs till i "
19654"filen <filename>window.ui</filename>."
947819655
9479#. (itstool) path: section/para19656#. (itstool) path: section/para
9480#: C/index-in.docbook:856319657#: C/index-in.docbook:8563
n9481msgid "Implementing the search needs quite a few code changes that we are not gon19658#, fuzzy
>ing to completely go over here. The central piece of the search implementation i 
>s a signal handler that listens for text changes in the search entry, shown here 
> without error handling." 
19659msgid ""
19660"Implementing the search needs quite a few code changes that we are not going "
19661"to completely go over here. The central piece of the search implementation "
19662"is a signal handler that listens for text changes in the search entry, shown "
19663"here without error handling."
9482msgstr ""19664msgstr ""
nn19665"Att implementera sökningen kräver ganska många kodändringar som vi inte "
19666"fullständigt kommer beskriva här. Den centrala delen av sökimplementationen "
19667"är en signalhanterare som lyssnar på textändringar i sökfältet, visat här "
19668"utan felhantering."
948319669
9484#. (itstool) path: section/programlisting19670#. (itstool) path: section/programlisting
9485#: C/index-in.docbook:856819671#: C/index-in.docbook:8568
n9486#, no-wrapn19672#, fuzzy, no-wrap
19673#| msgid ""
19674#| "\n"
19675#| "void ExampleAppWindow::on_search_text_changed()\n"
19676#| "{\n"
19677#| "  const auto text = m_searchentry-&gt;get_text();\n"
19678#| "  auto tab = dynamic_cast&lt;Gtk::ScrolledWindow*&gt;(m_stack-&gt;get_visibl
 >e_child());\n"
19679#| "  auto view = dynamic_cast&lt;Gtk::TextView*&gt;(tab-&gt;get_child());\n"
19680#| "\n"
19681#| "  // Very simple-minded search implementation.\n"
19682#| "  auto buffer = view-&gt;get_buffer();\n"
19683#| "  Gtk::TextIter match_start;\n"
19684#| "  Gtk::TextIter match_end;\n"
19685#| "  if (buffer-&gt;begin().forward_search(text, Gtk::TextSearchFlags::CASE_INS
 >ENSITIVE,\n"
19686#| "      match_start, match_end))\n"
19687#| "  {\n"
19688#| "    buffer-&gt;select_range(match_start, match_end);\n"
19689#| "    view-&gt;scroll_to(match_start);\n"
19690#| "  }\n"
19691#| "}\n"
9487msgid ""19692msgid ""
9488"<code>void ExampleAppWindow::on_search_text_changed()\n"19693"<code>void ExampleAppWindow::on_search_text_changed()\n"
9489"{\n"19694"{\n"
9490"  const auto text = m_searchentry-&gt;get_text();\n"19695"  const auto text = m_searchentry-&gt;get_text();\n"
9491"  auto tab = dynamic_cast&lt;Gtk::ScrolledWindow*&gt;(m_stack-&gt;get_visible_c19696"  auto tab = dynamic_cast&lt;Gtk::ScrolledWindow*&gt;(m_stack-&gt;get_visible_c
>hild());\n">hild());\n"
9502"    view-&gt;scroll_to(match_start);\n"19707"    view-&gt;scroll_to(match_start);\n"
9503"  }\n"19708"  }\n"
9504"}\n"19709"}\n"
9505"</code>"19710"</code>"
9506msgstr ""19711msgstr ""
nn19712"\n"
19713"void ExampleAppWindow::on_search_text_changed()\n"
19714"{\n"
19715"  const auto text = m_searchentry-&gt;get_text();\n"
19716"  auto tab = dynamic_cast&lt;Gtk::ScrolledWindow*&gt;(m_stack-&gt;get_visible_c
 >hild());\n"
19717"  auto view = dynamic_cast&lt;Gtk::TextView*&gt;(tab-&gt;get_child());\n"
19718"\n"
19719"  // Väldigt enkel sökimplementation.\n"
19720"  auto buffer = view-&gt;get_buffer();\n"
19721"  Gtk::TextIter match_start;\n"
19722"  Gtk::TextIter match_end;\n"
19723"  if (buffer-&gt;begin().forward_search(text, Gtk::TextSearchFlags::CASE_INSENS
 >ITIVE,\n"
19724"      match_start, match_end))\n"
19725"  {\n"
19726"    buffer-&gt;select_range(match_start, match_end);\n"
19727"    view-&gt;scroll_to(match_start);\n"
19728"  }\n"
19729"}\n"
950719730
9508#. (itstool) path: section/para19731#. (itstool) path: section/para
9509#: C/index-in.docbook:858719732#: C/index-in.docbook:8587
9510msgid "With the search bar, our application now looks like this:"19733msgid "With the search bar, our application now looks like this:"
n9511msgstr ""n19734msgstr "Med sökraden ser vårt program nu ut så här:"
951219735
9513#. (itstool) path: imageobject/imagedata19736#. (itstool) path: imageobject/imagedata
9514#. This is a reference to an external file such as an image or video. When19737#. This is a reference to an external file such as an image or video. When
9515#. the file changes, the md5 hash will change to let you know you need to19738#. the file changes, the md5 hash will change to let you know you need to
9516#. update your localized copy. The msgstr is not used at all. Set it to19739#. update your localized copy. The msgstr is not used at all. Set it to
9517#. whatever you like once you have updated your copy of the file.19740#. whatever you like once you have updated your copy of the file.
9518#: C/index-in.docbook:859419741#: C/index-in.docbook:8594
nn19742#, fuzzy
9519msgctxt "_"19743msgctxt "_"
n9520msgid "external ref='figures/buildapp_search_bar.png' md5='ca0d7fdb0f37cbd592f2cn19744msgid ""
>55904bb6f3f'" 
19745"external ref='figures/buildapp_search_bar.png' "
19746"md5='ca0d7fdb0f37cbd592f2c55904bb6f3f'"
9521msgstr ""19747msgstr ""
nn19748"external ref='figures/buildapp_search_bar.png' "
19749"md5='ca0d7fdb0f37cbd592f2c55904bb6f3f'"
952219750
9523#. (itstool) path: section/para19751#. (itstool) path: section/para
9524#: C/index-in.docbook:859819752#: C/index-in.docbook:8598
n9525msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19753msgid ""
>e/master/examples/book/buildapp/step6\">Source Code</link>" 
19754"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19755"master/examples/book/buildapp/step6\">Source Code</link>"
9526msgstr ""19756msgstr ""
nn19757"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19758"master/examples/book/buildapp/step6\">Källkod</link>"
952719759
9528#. (itstool) path: section/title19760#. (itstool) path: section/title
9529#. (itstool) path: figure/title19761#. (itstool) path: figure/title
n9530#: C/index-in.docbook:8603n19762#: C/index-in.docbook:8603 C/index-in.docbook:8637
9531#: C/index-in.docbook:8637
9532msgid "Adding a side bar"19763msgid "Adding a side bar"
n9533msgstr ""n19764msgstr "Lägga till en sidopanel"
953419765
9535#. (itstool) path: section/para19766#. (itstool) path: section/para
9536#: C/index-in.docbook:860519767#: C/index-in.docbook:8605
n9537msgid "As another piece of functionality, we are adding a sidebar, which demonstn19768#, fuzzy
>rates <classname>Gtk::Revealer</classname> and <classname>Gtk::ListBox</classnam 
>e>. The new widgets are added in the <filename>window.ui</filename> file." 
19769msgid ""
19770"As another piece of functionality, we are adding a sidebar, which "
19771"demonstrates <classname>Gtk::Revealer</classname> and <classname>Gtk::"
19772"ListBox</classname>. The new widgets are added in the <filename>window.ui</"
19773"filename> file."
9538msgstr ""19774msgstr ""
nn19775"Som en annan funktionalitetsdel lägger vi till en sidopanel som demonstrerar "
19776"<classname>Gtk::Revealer</classname> och <classname>Gtk::ListBox</"
19777"classname>. De nya komponenterna läggs till i filen <filename>window.ui</"
19778"filename>."
953919779
9540#. (itstool) path: section/para19780#. (itstool) path: section/para
9541#: C/index-in.docbook:861119781#: C/index-in.docbook:8611
n9542msgid "The code to populate the sidebar with buttons for the words found in eachn19782#, fuzzy
> file is a little too involved to go into here. But we'll look at the code to ad 
>d a checkbutton for the new feature to the menu. A menu item is added to the ui  
>file <filename>gears_menu.ui</filename>." 
19783msgid ""
19784"The code to populate the sidebar with buttons for the words found in each "
19785"file is a little too involved to go into here. But we'll look at the code to "
19786"add a checkbutton for the new feature to the menu. A menu item is added to "
19787"the ui file <filename>gears_menu.ui</filename>."
9543msgstr ""19788msgstr ""
nn19789"Koden för att fylla sidopanelen med knappar för orden som hittas i varje fil "
19790"är lite för avancerad för att gå in på här. Men vi kommer titta på koden för "
19791"att lägga till en kryssruta för den nya funktionen i menyn. Ett menyobjetk "
19792"läggs till i ui-filen <filename>gears_menu.ui</filename>."
954419793
9545#. (itstool) path: section/para19794#. (itstool) path: section/para
9546#: C/index-in.docbook:861819795#: C/index-in.docbook:8618
n9547msgid "To connect the menu item to the new <literal>show-words</literal> settingn19796#, fuzzy
>, we use a <classname>Gio::Action</classname> corresponding to the given <classn 
>ame>Gio::Settings</classname> key. In <classname>ExampleAppWindow</classname>'s  
>constructor:" 
19797msgid ""
19798"To connect the menu item to the new <literal>show-words</literal> setting, "
19799"we use a <classname>Gio::Action</classname> corresponding to the given "
19800"<classname>Gio::Settings</classname> key. In <classname>ExampleAppWindow</"
19801"classname>'s constructor:"
9548msgstr ""19802msgstr ""
nn19803"För att ansluta menyobjektet till den nya inställningen <literal>show-words</"
19804"literal> använder vi en <classname>Gio::Action</classname> som motsvarar den "
19805"angivna <classname>Gio::Settings</classname>-nyckeln. I "
19806"<classname>ExampleAppWindow</classname>s konstruktor:"
954919807
9550#. (itstool) path: section/programlisting19808#. (itstool) path: section/programlisting
9551#: C/index-in.docbook:862319809#: C/index-in.docbook:8623
n9552#, no-wrapn19810#, fuzzy, no-wrap
9553msgid ""19811msgid ""
9554"<code>// Connect the menu to the MenuButton m_gears, and bind the show-words se19812"<code>// Connect the menu to the MenuButton m_gears, and bind the show-words se
>tting\n">tting\n"
9555"// to the win.show-words action and the \"Words\" menu item.\n"19813"// to the win.show-words action and the \"Words\" menu item.\n"
9556"// (The connection between action and menu item is specified in gears_menu.ui.)19814"// (The connection between action and menu item is specified in gears_menu.ui.)
>\n">\n"
9557"auto menu_builder = Gtk::Builder::create_from_resource(\"/org/gtkmm/exampleapp/19815"auto menu_builder = Gtk::Builder::create_from_resource(\"/org/gtkmm/exampleapp/
>gears_menu.ui\");\n">gears_menu.ui\");\n"
9558"auto menu = menu_builder-&gt;get_object&lt;Gio::MenuModel&gt;(\"menu\");\n"19816"auto menu = menu_builder-&gt;get_object&lt;Gio::MenuModel&gt;(\"menu\");\n"
9559"m_gears-&gt;set_menu_model(menu);\n"19817"m_gears-&gt;set_menu_model(menu);\n"
9560"add_action(m_settings-&gt;create_action(\"show-words\"));\n"19818"add_action(m_settings-&gt;create_action(\"show-words\"));\n"
9561"</code>"19819"</code>"
9562msgstr ""19820msgstr ""
nn19821"\n"
19822"// Anslut menyn till MenuButton-knappen m_gears, och bind inställningen show-wo
 >rds\n"
19823"// till åtgärden win.show-words och menyobjektet ”Words”.\n"
19824"// (Anslutningen mellan åtgärd och menyobjekt anges i gears_menu.ui.)\n"
19825"auto menu_builder = Gtk::Builder::create_from_resource(\"/org/gtkmm/exampleapp/
 >gears_menu.ui\");\n"
19826"auto menu = menu_builder-&gt;get_object&lt;Gio::MenuModel&gt;(\"menu\");\n"
19827"m_gears-&gt;set_menu_model(menu);\n"
19828"add_action(m_settings-&gt;create_action(\"show-words\"));\n"
956319829
9564#. (itstool) path: section/para19830#. (itstool) path: section/para
9565#: C/index-in.docbook:863219831#: C/index-in.docbook:8632
9566msgid "What our application looks like now:"19832msgid "What our application looks like now:"
n9567msgstr ""n19833msgstr "Hur vårt program ser ut nu:"
956819834
9569#. (itstool) path: imageobject/imagedata19835#. (itstool) path: imageobject/imagedata
9570#. This is a reference to an external file such as an image or video. When19836#. This is a reference to an external file such as an image or video. When
9571#. the file changes, the md5 hash will change to let you know you need to19837#. the file changes, the md5 hash will change to let you know you need to
9572#. update your localized copy. The msgstr is not used at all. Set it to19838#. update your localized copy. The msgstr is not used at all. Set it to
9573#. whatever you like once you have updated your copy of the file.19839#. whatever you like once you have updated your copy of the file.
9574#: C/index-in.docbook:863919840#: C/index-in.docbook:8639
nn19841#, fuzzy
9575msgctxt "_"19842msgctxt "_"
n9576msgid "external ref='figures/buildapp_side_bar.png' md5='e13a4b6ebbcf73692dc59a0n19843msgid ""
>ba08e59e7'" 
19844"external ref='figures/buildapp_side_bar.png' "
19845"md5='e13a4b6ebbcf73692dc59a0ba08e59e7'"
9577msgstr ""19846msgstr ""
nn19847"external ref='figures/buildapp_side_bar.png' "
19848"md5='e13a4b6ebbcf73692dc59a0ba08e59e7'"
957819849
9579#. (itstool) path: section/para19850#. (itstool) path: section/para
9580#: C/index-in.docbook:864319851#: C/index-in.docbook:8643
n9581msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19852msgid ""
>e/master/examples/book/buildapp/step7\">Source Code</link>" 
19853"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19854"master/examples/book/buildapp/step7\">Source Code</link>"
9582msgstr ""19855msgstr ""
nn19856"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19857"master/examples/book/buildapp/step7\">Källkod</link>"
958319858
9584#. (itstool) path: section/title19859#. (itstool) path: section/title
9585#. (itstool) path: figure/title19860#. (itstool) path: figure/title
n9586#: C/index-in.docbook:8648n19861#: C/index-in.docbook:8648 C/index-in.docbook:8690
9587#: C/index-in.docbook:8690
9588msgid "Properties"19862msgid "Properties"
n9589msgstr ""n19863msgstr "Egenskaper"
959019864
9591#. (itstool) path: section/para19865#. (itstool) path: section/para
9592#: C/index-in.docbook:865019866#: C/index-in.docbook:8650
n9593msgid "Widgets and other objects have many useful properties. Here we show some n19867#, fuzzy
>ways to use them in new and flexible ways, by wrapping them in actions with <cla 
>ssname>Gio::PropertyAction</classname> or by binding them with <classname>Glib:: 
>Binding</classname>." 
19868msgid ""
19869"Widgets and other objects have many useful properties. Here we show some "
19870"ways to use them in new and flexible ways, by wrapping them in actions with "
19871"<classname>Gio::PropertyAction</classname> or by binding them with "
19872"<classname>Glib::Binding</classname>."
9594msgstr ""19873msgstr ""
nn19874"Komponenter och andra objekt har många användbara egenskaper. Här visar vi "
19875"några sätt att använda dem på nya och flexibla sätt genom att omsluta dem i "
19876"åtgärder med <classname>Gio::PropertyAction</classname> eller genom att "
19877"binda dem med <classname>Glib::Binding</classname>."
959519878
9596#. (itstool) path: section/para19879#. (itstool) path: section/para
9597#: C/index-in.docbook:865619880#: C/index-in.docbook:8656
n9598msgid "To set this up, we add two labels to the header bar in our <filename>windn19881#, fuzzy
>ow.ui</filename> file, named <literal>lines_label</literal> and <literal>lines</ 
>literal>, and get pointers to them in the application window's constructor, as w 
>e've seen a couple of times by now. We add a new \"Lines\" menu item to the gear 
>s menu, which triggers the <literal>show-lines</literal> action." 
19882msgid ""
19883"To set this up, we add two labels to the header bar in our <filename>window."
19884"ui</filename> file, named <literal>lines_label</literal> and <literal>lines</"
19885"literal>, and get pointers to them in the application window's constructor, "
19886"as we've seen a couple of times by now. We add a new \"Lines\" menu item to "
19887"the gears menu, which triggers the <literal>show-lines</literal> action."
9599msgstr ""19888msgstr ""
nn19889"För att konfigurera detta lägger vi till två etiketter till rubrikraden i "
19890"vår <filename>window.ui</filename>-fil, med namnen <literal>lines_label</"
19891"literal> och <literal>lines</literal>, och får pekare till dem i "
19892"programfönstrets konstruktor, som vi sett några gånger nu. Vi lägger till "
19893"ett nytt menyobjekt ”Lines” vilket utlöser åtgärden <literal>show-lines</"
19894"literal> till kugghjulsmenyn."
960019895
9601#. (itstool) path: section/para19896#. (itstool) path: section/para
9602#: C/index-in.docbook:866419897#: C/index-in.docbook:8664
n9603msgid "To make this menu item do something, we create a property action for the n19898#, fuzzy
><literal>visible</literal> property of the <literal>lines</literal> label, and a 
>dd it to the actions of the window. The effect of this is that the visibility of 
> the label gets toggled every time the action is activated. Since we want both l 
>abels to appear and disappear together, we bind the <literal>visible</literal> p 
>roperty of the <literal>lines_label</literal> widget to the same property of the 
> <literal>lines</literal> widget. In <classname>ExampleAppWindow</classname>'s c 
>onstructor:" 
19899msgid ""
19900"To make this menu item do something, we create a property action for the "
19901"<literal>visible</literal> property of the <literal>lines</literal> label, "
19902"and add it to the actions of the window. The effect of this is that the "
19903"visibility of the label gets toggled every time the action is activated. "
19904"Since we want both labels to appear and disappear together, we bind the "
19905"<literal>visible</literal> property of the <literal>lines_label</literal> "
19906"widget to the same property of the <literal>lines</literal> widget. In "
19907"<classname>ExampleAppWindow</classname>'s constructor:"
9604msgstr ""19908msgstr ""
nn19909"För att få detta menyobjekt att göra något skapar vi en egenskapsåtgärd för "
19910"egenskapen <literal>visible</literal> för etiketten <literal>lines</"
19911"literal>, och lägger till den till fönstrets åtgärder. Effekten av detta är "
19912"avv synligheten för etiketten växlas varje gång åtgärden aktiveras. Då vi "
19913"vill att båda etiketterna ska visas och försvinna samtidigt binder vi "
19914"egenskapen <literal>visible</literal> för komponenten <literal>lines_label</"
19915"literal> till samma egenskap för komponenten <literal>lines</literal>. I "
19916"<classname>ExampleAppWindow</classname>s konstruktor:"
960519917
9606#. (itstool) path: section/programlisting19918#. (itstool) path: section/programlisting
9607#: C/index-in.docbook:867419919#: C/index-in.docbook:8674
n9608#, no-wrapn19920#, fuzzy, no-wrap
19921#| msgid ""
19922#| "add_action(Gio::PropertyAction::create(\"show-lines\", m_lines-&gt;property_
 >visible()));\n"
19923#| "m_binding_lines_visible = Glib::Binding::bind_property(m_lines-&gt;property_
 >visible(),\n"
19924#| "  m_lines_label-&gt;property_visible());\n"
19925#| "\n"
9609msgid ""19926msgid ""
9610"<code>add_action(Gio::PropertyAction::create(\"show-lines\", m_lines-&gt;proper19927"<code>add_action(Gio::PropertyAction::create(\"show-lines\", m_lines-&gt;proper
>ty_visible()));\n">ty_visible()));\n"
9611"m_binding_lines_visible = Glib::Binding::bind_property(m_lines-&gt;property_vis19928"m_binding_lines_visible = Glib::Binding::bind_property(m_lines-&gt;property_vis
>ible(),\n">ible(),\n"
9612"  m_lines_label-&gt;property_visible());\n"19929"  m_lines_label-&gt;property_visible());\n"
9613"\n"19930"\n"
9614"</code>"19931"</code>"
9615msgstr ""19932msgstr ""
nn19933"add_action(Gio::PropertyAction::create(\"show-lines\", m_lines-&gt;property_vis
 >ible()));\n"
19934"m_binding_lines_visible = Glib::Binding::bind_property(m_lines-&gt;property_vis
 >ible(),\n"
19935"  m_lines_label-&gt;property_visible());\n"
19936"\n"
961619937
9617#. (itstool) path: section/para19938#. (itstool) path: section/para
9618#: C/index-in.docbook:868019939#: C/index-in.docbook:8680
n9619msgid "We also need a function that counts the lines of the currently active tabn19940#, fuzzy
>, and updates the <literal>lines</literal> label. See the full source if you are 
> interested in the details." 
19941msgid ""
19942"We also need a function that counts the lines of the currently active tab, "
19943"and updates the <literal>lines</literal> label. See the full source if you "
19944"are interested in the details."
9620msgstr ""19945msgstr ""
nn19946"Vi behöver också en funktion som räknar raderna för den för närvarande "
19947"aktiva fliken och uppdaterar etiketten <literal>lines</literal>. Se den "
19948"fullständiga källkoden om du är intresserad av detaljerna."
962119949
9622#. (itstool) path: section/para19950#. (itstool) path: section/para
9623#: C/index-in.docbook:868519951#: C/index-in.docbook:8685
9624msgid "This brings our example application to this appearance:"19952msgid "This brings our example application to this appearance:"
n9625msgstr ""n19953msgstr "Detta får vårt exempelprogram att se ut så här:"
962619954
9627#. (itstool) path: imageobject/imagedata19955#. (itstool) path: imageobject/imagedata
9628#. This is a reference to an external file such as an image or video. When19956#. This is a reference to an external file such as an image or video. When
9629#. the file changes, the md5 hash will change to let you know you need to19957#. the file changes, the md5 hash will change to let you know you need to
9630#. update your localized copy. The msgstr is not used at all. Set it to19958#. update your localized copy. The msgstr is not used at all. Set it to
9631#. whatever you like once you have updated your copy of the file.19959#. whatever you like once you have updated your copy of the file.
9632#: C/index-in.docbook:869219960#: C/index-in.docbook:8692
nn19961#, fuzzy
9633msgctxt "_"19962msgctxt "_"
n9634msgid "external ref='figures/buildapp_properties.png' md5='46c52e09cc1b4ddbc095en19963msgid ""
>12f763a4427'" 
19964"external ref='figures/buildapp_properties.png' "
19965"md5='46c52e09cc1b4ddbc095e12f763a4427'"
9635msgstr ""19966msgstr ""
nn19967"external ref='figures/buildapp_properties.png' "
19968"md5='46c52e09cc1b4ddbc095e12f763a4427'"
963619969
9637#. (itstool) path: section/para19970#. (itstool) path: section/para
9638#: C/index-in.docbook:869619971#: C/index-in.docbook:8696
n9639msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren19972msgid ""
>e/master/examples/book/buildapp/step8\">Source Code</link>" 
19973"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19974"master/examples/book/buildapp/step8\">Source Code</link>"
9640msgstr ""19975msgstr ""
nn19976"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
19977"master/examples/book/buildapp/step8\">Källkod</link>"
964119978
9642#. (itstool) path: section/title19979#. (itstool) path: section/title
9643#. (itstool) path: figure/title19980#. (itstool) path: figure/title
n9644#: C/index-in.docbook:8701n19981#: C/index-in.docbook:8701 C/index-in.docbook:8727
9645#: C/index-in.docbook:8727
9646msgid "Header bar"19982msgid "Header bar"
n9647msgstr ""n19983msgstr "Rubrikrad"
964819984
9649#. (itstool) path: section/para19985#. (itstool) path: section/para
9650#: C/index-in.docbook:870319986#: C/index-in.docbook:8703
n9651msgid "Our application already uses a <classname>Gtk::HeaderBar</classname> instn19987#, fuzzy
>ead of a 'normal' window titlebar. The header bar is a direct child of the windo 
>w, and its type is <literal>titlebar</literal>. This is set in the <filename>win 
>dow.ui</filename> file." 
19988msgid ""
19989"Our application already uses a <classname>Gtk::HeaderBar</classname> instead "
19990"of a 'normal' window titlebar. The header bar is a direct child of the "
19991"window, and its type is <literal>titlebar</literal>. This is set in the "
19992"<filename>window.ui</filename> file."
9652msgstr ""19993msgstr ""
nn19994"Vårt program använder redan en <classname>Gtk::HeaderBar</classname> i "
19995"stället för en ”vanlig” fönsternamnlist. Rubrikraden är en direkt "
19996"underordnad till fönstret, och dess typ är <literal>titlebar</literal>. "
19997"Detta ställs in i filen <filename>window.ui</filename>."
965319998
9654#. (itstool) path: section/para19999#. (itstool) path: section/para
9655#: C/index-in.docbook:871020000#: C/index-in.docbook:8710
n9656msgid "Here we'll just make two small changes to the header bar. The <literal>den20001#, fuzzy
>coration-layout</literal> property is set in the <filename>window.ui</filename>  
>file, to show only the close button, and hide the minimize and maximize buttons. 
> We also include an icon in the resource file, and set up this icon as the windo 
>w icon. In <classname>ExampleAppWindow</classname>'s constructor:" 
20002msgid ""
20003"Here we'll just make two small changes to the header bar. The "
20004"<literal>decoration-layout</literal> property is set in the <filename>window."
20005"ui</filename> file, to show only the close button, and hide the minimize and "
20006"maximize buttons. We also include an icon in the resource file, and set up "
20007"this icon as the window icon. In <classname>ExampleAppWindow</classname>'s "
20008"constructor:"
9657msgstr ""20009msgstr ""
nn20010"Här gör vi bara två små ändringar till rubrikraden. Egenskapen "
20011"<literal>decoration-layout</literal> ställs in i <filename>window.ui</"
20012"filename>-filen så den endast visar stängningsknappen, och döljer knapparna "
20013"för minimering och maximering. Vi inkluderar också en ikon i resursfilen, "
20014"och konfigurerar denna ikon som fönsterikonen. I "
20015"<classname>ExampleAppWindow</classname>s konstruktor:"
965820016
9659#. (itstool) path: section/programlisting20017#. (itstool) path: section/programlisting
9660#: C/index-in.docbook:871720018#: C/index-in.docbook:8717
n9661#, no-wrapn20019#, fuzzy, no-wrap
9662msgid ""20020msgid ""
9663"<code>Gtk::IconTheme::get_for_display(get_display())-&gt;add_resource_path(\"/o20021"<code>Gtk::IconTheme::get_for_display(get_display())-&gt;add_resource_path(\"/o
>rg/gtkmm/exampleapp\");\n">rg/gtkmm/exampleapp\");\n"
9664"set_icon_name(\"exampleapp\");\n"20022"set_icon_name(\"exampleapp\");\n"
9665"\n"20023"\n"
9666"</code>"20024"</code>"
9667msgstr ""20025msgstr ""
nn20026"Gtk::IconTheme::get_for_display(get_display())-&gt;add_resource_path(\"/org/gtk
 >mm/exampleapp\");\n"
20027"set_icon_name(\"exampleapp\");\n"
20028"\n"
966820029
9669#. (itstool) path: section/para20030#. (itstool) path: section/para
9670#: C/index-in.docbook:872220031#: C/index-in.docbook:8722
9671msgid "Here is how the application now looks:"20032msgid "Here is how the application now looks:"
n9672msgstr ""n20033msgstr "Här är hur programmet ser ut nu:"
967320034
9674#. (itstool) path: imageobject/imagedata20035#. (itstool) path: imageobject/imagedata
9675#. This is a reference to an external file such as an image or video. When20036#. This is a reference to an external file such as an image or video. When
9676#. the file changes, the md5 hash will change to let you know you need to20037#. the file changes, the md5 hash will change to let you know you need to
9677#. update your localized copy. The msgstr is not used at all. Set it to20038#. update your localized copy. The msgstr is not used at all. Set it to
9678#. whatever you like once you have updated your copy of the file.20039#. whatever you like once you have updated your copy of the file.
9679#: C/index-in.docbook:872920040#: C/index-in.docbook:8729
nn20041#, fuzzy
9680msgctxt "_"20042msgctxt "_"
n9681msgid "external ref='figures/buildapp_header_bar.png' md5='b2ab5d871b0deff13f04an20043msgid ""
>ac71700b1a0'" 
20044"external ref='figures/buildapp_header_bar.png' "
20045"md5='b2ab5d871b0deff13f04aac71700b1a0'"
9682msgstr ""20046msgstr ""
nn20047"external ref='figures/buildapp_header_bar.png' "
20048"md5='b2ab5d871b0deff13f04aac71700b1a0'"
968320049
9684#. (itstool) path: section/para20050#. (itstool) path: section/para
9685#: C/index-in.docbook:873320051#: C/index-in.docbook:8733
n9686msgid "The <filename>window.ui</filename> file sets a header bar title, but thisn20052#, fuzzy
> title is not shown. That's because the stack switcher is a child of type <liter 
>al>title</literal>. The stack switcher becomes a custom title that hides the tit 
>le label." 
20053msgid ""
20054"The <filename>window.ui</filename> file sets a header bar title, but this "
20055"title is not shown. That's because the stack switcher is a child of type "
20056"<literal>title</literal>. The stack switcher becomes a custom title that "
20057"hides the title label."
9687msgstr ""20058msgstr ""
nn20059"<filename>window.ui</filename>-filen ställer in en rubriksradstitel, men "
20060"denna titel visas inte. Dett är för att stackväxlaren är en underordnad av "
20061"typen <literal>title</literal>. Stackväxlaren blir en anpassad titel som "
20062"döljer titeletiketten."
968820063
9689#. (itstool) path: section/para20064#. (itstool) path: section/para
9690#: C/index-in.docbook:873920065#: C/index-in.docbook:8739
n9691msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren20066msgid ""
>e/master/examples/book/buildapp/step9\">Source Code</link>" 
20067"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
20068"master/examples/book/buildapp/step9\">Source Code</link>"
9692msgstr ""20069msgstr ""
nn20070"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
20071"master/examples/book/buildapp/step9\">Källkod</link>"
969320072
9694#. (itstool) path: chapter/title20073#. (itstool) path: chapter/title
9695#: C/index-in.docbook:874620074#: C/index-in.docbook:8746
9696msgid "Contributing"20075msgid "Contributing"
n9697msgstr ""n20076msgstr "Bidra"
969820077
9699#. (itstool) path: chapter/para20078#. (itstool) path: chapter/para
9700#: C/index-in.docbook:874820079#: C/index-in.docbook:8748
n9701msgid "This document, like so much other great software out there, was created fn20080#, fuzzy
>or free by volunteers. If you are at all knowledgeable about any aspect of <appl 
>ication>gtkmm</application> that does not already have documentation, please con 
>sider contributing to this document." 
20081msgid ""
20082"This document, like so much other great software out there, was created for "
20083"free by volunteers. If you are at all knowledgeable about any aspect of "
20084"<application>gtkmm</application> that does not already have documentation, "
20085"please consider contributing to this document."
9702msgstr ""20086msgstr ""
nn20087"Detta dokument, som så mycket annan fantastisk programvara, skapades gratis "
20088"av frivilliga. Om du är det minsta insatt i någon aspekt av "
20089"<application>gtkmm</application> som inte redan har dokumentation kan du "
20090"gärna bidra till detta dokument."
970320091
9704#. (itstool) path: chapter/para20092#. (itstool) path: chapter/para
9705#: C/index-in.docbook:875420093#: C/index-in.docbook:8754
n9706msgid "Ideally, we would like you to <link xlink:href=\"https://gitlab.gnome.orgn20094#, fuzzy
>/GNOME/gtkmm-documentation/-/merge_requests\"> provide a merge request</link> to 
> the <filename>docs/tutorial/C/index-in.docbook</filename> file. This file is in 
> the <literal>gtkmm-documentation</literal> module in GNOME git." 
20095msgid ""
20096"Ideally, we would like you to <link xlink:href=\"https://gitlab.gnome.org/"
20097"GNOME/gtkmm-documentation/-/merge_requests\"> provide a merge request</link> "
20098"to the <filename>docs/tutorial/C/index-in.docbook</filename> file. This file "
20099"is in the <literal>gtkmm-documentation</literal> module in GNOME git."
9707msgstr ""20100msgstr ""
nn20101"Idealiskt skulle vi vilja att du <link xlink:href=\"https://gitlab.gnome.org/"
20102"GNOME/gtkmm-documentation/-/merge_requests\"> tillhandahåller en merge-"
20103"förfrågan</link> till filen <filename>docs/tutorial/C/index-in.docbook</"
20104"filename>. Denna fil finns i modulen <literal>gtkmm-documentation</literal> "
20105"i GNOME git."
970820106
9709#. (itstool) path: chapter/para20107#. (itstool) path: chapter/para
9710#: C/index-in.docbook:876020108#: C/index-in.docbook:8760
n9711msgid "If you do decide to contribute, please post your contribution as an issuen20109msgid ""
> or merge request to <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-doc 
>umentation\">GitLab</link>. You can also discuss your ideas on GNOME's <link xli 
>nk:href=\"https://discourse.gnome.org\">Discourse</link> instance, under the <li 
>nk xlink:href=\"https://discourse.gnome.org/c/platform/language-bindings\"> Plat 
>form/Language bindings</link> category with a <literal>cplusplus</literal> tag.  
>Also, be aware that the entirety of this document is free, and any addition you  
>provide must also be free. That is, people must be able to use any portion of yo 
>ur examples in their programs, and copies of this document (including your contr 
>ibution) may be distributed freely." 
20110"If you do decide to contribute, please post your contribution as an issue or "
20111"merge request to <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-"
20112"documentation\">GitLab</link>. You can also discuss your ideas on GNOME's "
20113"<link xlink:href=\"https://discourse.gnome.org\">Discourse</link> instance, "
20114"under the <link xlink:href=\"https://discourse.gnome.org/c/platform/language-"
20115"bindings\"> Platform/Language bindings</link> category with a "
20116"<literal>cplusplus</literal> tag. Also, be aware that the entirety of this "
20117"document is free, and any addition you provide must also be free. That is, "
20118"people must be able to use any portion of your examples in their programs, "
20119"and copies of this document (including your contribution) may be distributed "
20120"freely."
9712msgstr ""20121msgstr ""
nn20122"Om du bestämmer dig för att bidra kan du skicka ditt bidrag som ett ärende "
20123"eller en merge-förfrågan till <link xlink:href=\"https://gitlab.gnome.org/"
20124"GNOME/gtkmm-documentation\">GitLab</link>. Du kan också diskutera dina idéer "
20125"på GNOMEs <link xlink:href=\"https://discourse.gnome.org\">Discourse</link>-"
20126"instans, under kategorin <link xlink:href=\"https://discourse.gnome.org/c/"
20127"platform/language-bindings\"> Platform/Language bindings</link> med en "
20128"<literal>cplusplus</literal>-tagg. Var också medveten om att hela detta "
20129"dokument är fritt, och alla tillägg du gör också måste vara fria. Det vill "
20130"säga att personer måste kunna använda alla delar av dina exempel i sina "
20131"program, och kopior av detta dokument (med ditt bidrag) måste kunna spridas "
20132"fritt."
971320133
9714#. (itstool) path: appendix/title20134#. (itstool) path: appendix/title
9715#: C/index-in.docbook:877520135#: C/index-in.docbook:8775
9716msgid "The RefPtr smartpointer"20136msgid "The RefPtr smartpointer"
n9717msgstr ""n20137msgstr "RefPtr-smartpekaren"
971820138
9719#. (itstool) path: appendix/para20139#. (itstool) path: appendix/para
9720#: C/index-in.docbook:877720140#: C/index-in.docbook:8777
n9721msgid "<classname>Glib::RefPtr</classname> is a smartpointer. Specifically, it in20141#, fuzzy
>s a reference-counting smartpointer. You might be familiar with <classname>std:: 
>unique_ptr&lt;&gt;</classname> and <classname>std::shared_ptr&lt;&gt;</classname 
>>, which are also smartpointers. In <application>gtkmm</application>-4.0 <classn 
>ame>Glib::RefPtr&lt;&gt;</classname> is an alias for <classname>std::shared_ptr& 
>lt;&gt;</classname>, which is reference-counting. <classname>Glib::RefPtr&lt;&gt 
>;</classname> was introduced long before there was a reference-counting smartpoi 
>nter in the <phrase role=\"nowrap\">C++</phrase> Standard Library." 
20142msgid ""
20143"<classname>Glib::RefPtr</classname> is a smartpointer. Specifically, it is a "
20144"reference-counting smartpointer. You might be familiar with <classname>std::"
20145"unique_ptr&lt;&gt;</classname> and <classname>std::shared_ptr&lt;&gt;</"
20146"classname>, which are also smartpointers. In <application>gtkmm</"
20147"application>-4.0 <classname>Glib::RefPtr&lt;&gt;</classname> is an alias for "
20148"<classname>std::shared_ptr&lt;&gt;</classname>, which is reference-counting. "
20149"<classname>Glib::RefPtr&lt;&gt;</classname> was introduced long before there "
20150"was a reference-counting smartpointer in the <phrase role=\"nowrap\">C++</"
20151"phrase> Standard Library."
9722msgstr ""20152msgstr ""
nn20153"<classname>Glib::RefPtr</classname> är en smartpekare. Mer specifikt är det "
20154"en referensräknande smartpekare. Du kanske är bekant med <classname>std::"
20155"unique_ptr&lt;&gt;</classname> och <classname>std::shared_ptr&lt;&gt;</"
20156"classname> vilka också är smartpekare. I <application>gtkmm</"
20157"application>-4.0 är <classname>Glib::RefPtr&lt;&gt;</classname> ett alias "
20158"för <classname>std::shared_ptr&lt;&gt;</classname> som är referensräknande. "
20159"<classname>Glib::RefPtr&lt;&gt;</classname> introducerades långt innan det "
20160"fanns en referensräknande smartpekare i C++-standardbiblioteket."
972320161
9724#. (itstool) path: appendix/para20162#. (itstool) path: appendix/para
9725#: C/index-in.docbook:878820163#: C/index-in.docbook:8788
n9726msgid "If you make your own <classname>Glib::ObjectBase</classname>-derived clasn20164#, fuzzy
>ses with <methodname>create()</methodname> methods that return a <classname>Glib 
>::RefPtr</classname>, you must use <function>Glib::make_refptr_for_instance()</f 
>unction> in your <methodname>create()</methodname> methods. This function create 
>s a <classname>std::shared_ptr</classname> with a special deleter, which handles 
> the reference-count for the wrapped C object." 
20165msgid ""
20166"If you make your own <classname>Glib::ObjectBase</classname>-derived classes "
20167"with <methodname>create()</methodname> methods that return a "
20168"<classname>Glib::RefPtr</classname>, you must use <function>Glib::"
20169"make_refptr_for_instance()</function> in your <methodname>create()</"
20170"methodname> methods. This function creates a <classname>std::shared_ptr</"
20171"classname> with a special deleter, which handles the reference-count for the "
20172"wrapped C object."
9727msgstr ""20173msgstr ""
nn20174"Om du gör dina egna <classname>Glib::ObjectBase</classname>-härledda klasser "
20175"med <methodname>create()</methodname>-metoder som returnerar en "
20176"<classname>Glib::RefPtr</classname> måste du använda <function>Glib::"
20177"make_refptr_for_instance()</function> i dina <methodname>create()</"
20178"methodname>-metoder. Denna funktion skapar en <classname>std::shared_ptr</"
20179"classname> med en speciell borttagare som hanterar referensräkningen för det "
20180"omslutna C-objektet."
972820181
9729#. (itstool) path: appendix/para20182#. (itstool) path: appendix/para
9730#: C/index-in.docbook:879620183#: C/index-in.docbook:8796
n9731msgid "<classname>Glib::RefPtr</classname> is not used for storing widgets derivn20184msgid ""
>ed from <classname>Gtk::Widget</classname>. Widgets have public constructors ins 
>tead of protected constructors and <methodname>create()</methodname> methods." 
20185"<classname>Glib::RefPtr</classname> is not used for storing widgets derived "
20186"from <classname>Gtk::Widget</classname>. Widgets have public constructors "
20187"instead of protected constructors and <methodname>create()</methodname> "
20188"methods."
9732msgstr ""20189msgstr ""
973320190
9734#. (itstool) path: appendix/para20191#. (itstool) path: appendix/para
9735#: C/index-in.docbook:880220192#: C/index-in.docbook:8802
nn20193msgid ""
9736msgid "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/group__Ref20194"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/group__RefPtr."
>Ptr.html\">Reference</link>" 
20195"html\">Reference</link>"
9737msgstr ""20196msgstr ""
nn20197"<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/group__RefPtr."
20198"html\">Referens</link>"
973820199
9739#. (itstool) path: appendix/para20200#. (itstool) path: appendix/para
9740#: C/index-in.docbook:880420201#: C/index-in.docbook:8804
nn20202msgid ""
9741msgid "A smartpointer acts much like a normal pointer. Here are a few examples."20203"A smartpointer acts much like a normal pointer. Here are a few examples."
9742msgstr ""20204msgstr ""
nn20205"En smartpekare agerar i stort sett som en vanlig pekare. Här är några "
20206"exempel."
974320207
9744#. (itstool) path: section/title20208#. (itstool) path: section/title
9745#: C/index-in.docbook:880720209#: C/index-in.docbook:8807
9746msgid "Copying"20210msgid "Copying"
n9747msgstr ""n20211msgstr "Kopiering"
974820212
9749#. (itstool) path: section/para20213#. (itstool) path: section/para
9750#: C/index-in.docbook:880820214#: C/index-in.docbook:8808
n9751msgid "You can copy <classname>RefPtr</classname>s, just like normal pointers. Bn20215#, fuzzy
>ut unlike normal pointers, you don't need to worry about deleting the underlying 
> instance." 
20216msgid ""
20217"You can copy <classname>RefPtr</classname>s, just like normal pointers. But "
20218"unlike normal pointers, you don't need to worry about deleting the "
20219"underlying instance."
9752msgstr ""20220msgstr ""
nn20221"Du kan kopiera <classname>RefPtr</classname>-pekare, precis som vanliga "
20222"pekare. Men till skillnad från vanliga pekare behöver du inte oroa dig om "
20223"att ta bort den underliggande instansen."
975320224
9754#. (itstool) path: section/programlisting20225#. (itstool) path: section/programlisting
9755#: C/index-in.docbook:881320226#: C/index-in.docbook:8813
n9756#, no-wrapn20227#, fuzzy, no-wrap
9757msgid ""20228msgid ""
9758"<code>auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"20229"<code>auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"
9759"auto refPixbuf2 = refPixbuf;\n"20230"auto refPixbuf2 = refPixbuf;\n"
9760"</code>"20231"</code>"
9761msgstr ""20232msgstr ""
nn20233"\n"
20234"auto refPixbuf = Gdk::Pixbuf::create_from_file(filnamn);\n"
20235"auto refPixbuf2 = refPixbuf;\n"
976220236
9763#. (itstool) path: section/para20237#. (itstool) path: section/para
9764#: C/index-in.docbook:881620238#: C/index-in.docbook:8816
n9765msgid "Of course this means that you can store <classname>RefPtr</classname>s inn20239#, fuzzy
> standard containers, such as <classname>std::vector</classname> or <classname>s 
>td::list</classname>." 
20240msgid ""
20241"Of course this means that you can store <classname>RefPtr</classname>s in "
20242"standard containers, such as <classname>std::vector</classname> or "
20243"<classname>std::list</classname>."
9766msgstr ""20244msgstr ""
nn20245"Detta betyder förstås att du kan lagra <classname>RefPtr</classname>-pekare "
20246"i standardbehållare, som <classname>std::vector</classname> eller "
20247"<classname>std::list</classname>."
976720248
9768#. (itstool) path: section/programlisting20249#. (itstool) path: section/programlisting
9769#: C/index-in.docbook:882020250#: C/index-in.docbook:8820
n9770#, no-wrapn20251#, fuzzy, no-wrap
9771msgid ""20252msgid ""
9772"<code>std::list&lt;Glib::RefPtr&lt;Gdk::Pixbuf&gt;&gt; listPixbufs;\n"20253"<code>std::list&lt;Glib::RefPtr&lt;Gdk::Pixbuf&gt;&gt; listPixbufs;\n"
9773"auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"20254"auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"
9774"listPixbufs.push_back(refPixbuf);\n"20255"listPixbufs.push_back(refPixbuf);\n"
9775"</code>"20256"</code>"
9776msgstr ""20257msgstr ""
nn20258"\n"
20259"std::list&lt;Glib::RefPtr&lt;Gdk::Pixbuf&gt;&gt; listPixbufs;\n"
20260"auto refPixbuf = Gdk::Pixbuf::create_from_file(filnamn);\n"
20261"listPixbufs.push_back(refPixbuf);\n"
977720262
9778#. (itstool) path: section/title20263#. (itstool) path: section/title
9779#: C/index-in.docbook:882720264#: C/index-in.docbook:8827
nn20265#, fuzzy
9780msgid "Dereferencing"20266msgid "Dereferencing"
n9781msgstr ""n20267msgstr "Dereferering"
978220268
9783#. (itstool) path: section/para20269#. (itstool) path: section/para
9784#: C/index-in.docbook:882820270#: C/index-in.docbook:8828
n9785msgid "You can dereference a smartpointer with the -&gt; operator, to call the mn20271#, fuzzy
>ethods of the underlying instance, just like a normal pointer." 
20272msgid ""
20273"You can dereference a smartpointer with the -&gt; operator, to call the "
20274"methods of the underlying instance, just like a normal pointer."
9786msgstr ""20275msgstr ""
nn20276"Du kan dereferera en smartpekare med operatorn -&gt; för att anropa "
20277"metoderna för den underliggande instansen, precis som en vanlig pekare."
978720278
9788#. (itstool) path: section/programlisting20279#. (itstool) path: section/programlisting
9789#: C/index-in.docbook:883120280#: C/index-in.docbook:8831
n9790#, no-wrapn20281#, fuzzy, no-wrap
20282#| msgid ""
20283#| "\n"
20284#| "auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"
20285#| "auto width = refPixbuf-&gt;get_width();\n"
9791msgid ""20286msgid ""
9792"<code>auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"20287"<code>auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"
9793"auto width = refPixbuf-&gt;get_width();\n"20288"auto width = refPixbuf-&gt;get_width();\n"
9794"</code>"20289"</code>"
9795msgstr ""20290msgstr ""
nn20291"\n"
20292"auto refPixbuf = Gdk::Pixbuf::create_from_file(filnamn);\n"
20293"auto width = refPixbuf-&gt;get_width();\n"
979620294
9797#. (itstool) path: section/para20295#. (itstool) path: section/para
9798#: C/index-in.docbook:883420296#: C/index-in.docbook:8834
n9799msgid "You can also use the * operator and the <methodname>get()</methodname> men20297#, fuzzy
>thod to access the underlying instance, but it's usually a bad idea to do so. Un 
>less you are careful, you can end up with a pointer or a reference which is not  
>included in the reference count." 
20298msgid ""
20299"You can also use the * operator and the <methodname>get()</methodname> "
20300"method to access the underlying instance, but it's usually a bad idea to do "
20301"so. Unless you are careful, you can end up with a pointer or a reference "
20302"which is not included in the reference count."
9800msgstr ""20303msgstr ""
nn20304"Du kan också använda *-operatorn och <methodname>get()</methodname>-metoden "
20305"för att komma åt den underliggande instansen, men det är vanligen en dålig "
20306"idé att göra det. Om du inte är försiktig kan du råka ut för en pekare eller "
20307"referens som inte inkluderas i referensantalet."
980120308
9802#. (itstool) path: section/programlisting20309#. (itstool) path: section/programlisting
9803#: C/index-in.docbook:883920310#: C/index-in.docbook:8839
n9804#, no-wrapn20311#, fuzzy, no-wrap
9805msgid ""20312msgid ""
9806"<code>auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"20313"<code>auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);\n"
9807"auto&amp; underlying = *refPixbuf; // Possible, but not recommended\n"20314"auto&amp; underlying = *refPixbuf; // Possible, but not recommended\n"
9808"</code>"20315"</code>"
9809msgstr ""20316msgstr ""
nn20317"\n"
20318"auto refPixbuf = Gdk::Pixbuf::create_from_file(filnamn);\n"
20319"auto&amp; underlying = *refPixbuf; // Möjligt, men rekommenderas inte\n"
981020320
9811#. (itstool) path: section/title20321#. (itstool) path: section/title
9812#: C/index-in.docbook:884520322#: C/index-in.docbook:8845
9813msgid "Casting"20323msgid "Casting"
n9814msgstr ""n20324msgstr "Typkonvertering"
981520325
9816#. (itstool) path: section/para20326#. (itstool) path: section/para
9817#: C/index-in.docbook:884620327#: C/index-in.docbook:8846
nn20328msgid ""
9818msgid "You can cast <classname>RefPtr</classname>s to base types, just like norm20329"You can cast <classname>RefPtr</classname>s to base types, just like normal "
>al pointers." 
20330"pointers."
9819msgstr ""20331msgstr ""
nn20332"Du kan typkonvertera <classname>RefPtr</classname>-pekare till bastyper, "
20333"precis som vanliga pekare."
982020334
9821#. (itstool) path: section/programlisting20335#. (itstool) path: section/programlisting
9822#: C/index-in.docbook:885020336#: C/index-in.docbook:8850
n9823#, no-wrapn20337#, fuzzy, no-wrap
9824msgid ""20338msgid ""
9825"<code>auto refStore = Gtk::TreeStore::create(columns);\n"20339"<code>auto refStore = Gtk::TreeStore::create(columns);\n"
9826"Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = refStore;\n"20340"Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = refStore;\n"
9827"</code>"20341"</code>"
9828msgstr ""20342msgstr ""
nn20343"\n"
20344"auto refStore = Gtk::TreeStore::create(columns);\n"
20345"Glib::RefPtr&lt;Gtk::TreeModel&gt; refModel = refStore;\n"
982920346
9830#. (itstool) path: section/para20347#. (itstool) path: section/para
9831#: C/index-in.docbook:885320348#: C/index-in.docbook:8853
n9832msgid "This means that any method which takes a <type>const Glib::RefPtr&lt;Basen20349#, fuzzy
>Type&gt;&amp;</type> argument can also take a <type>const Glib::RefPtr&lt;Derive 
>dType&gt;&amp;</type>. The cast is implicit, just as it would be for a normal po 
>inter." 
20350msgid ""
20351"This means that any method which takes a <type>const Glib::RefPtr&lt;"
20352"BaseType&gt;&amp;</type> argument can also take a <type>const Glib::"
20353"RefPtr&lt;DerivedType&gt;&amp;</type>. The cast is implicit, just as it "
20354"would be for a normal pointer."
9833msgstr ""20355msgstr ""
nn20356"Detta betyder att alla metoder som tar ett <type>const Glib::RefPtr&lt;"
20357"BaseType&gt;&amp;</type>-argument också kan ta en <type>const Glib::"
20358"RefPtr&lt;DerivedType&gt;&amp;</type>. Typkonverteringen är implicit, precis "
20359"som den skulle vara för en vanlig pekare."
983420360
9835#. (itstool) path: section/para20361#. (itstool) path: section/para
9836#: C/index-in.docbook:885720362#: C/index-in.docbook:8857
nn20363msgid ""
9837msgid "You can also cast to a derived type, but the syntax is a little different20364"You can also cast to a derived type, but the syntax is a little different "
> than with a normal pointer." 
20365"than with a normal pointer."
9838msgstr ""20366msgstr ""
nn20367"Du kan också typkonvertera till en härledd typ, men syntaxen är lite annars "
20368"än med en vanlig pekare."
983920369
9840#. (itstool) path: section/programlisting20370#. (itstool) path: section/programlisting
9841#: C/index-in.docbook:886020371#: C/index-in.docbook:8860
n9842#, no-wrapn20372#, fuzzy, no-wrap
20373#| msgid ""
20374#| "\n"
20375#| "auto refStore = std::dynamic_pointer_cast&lt;Gtk::TreeStore&gt;(refModel);\n
 >"
20376#| "auto refStore2 = std::static_pointer_cast&lt;Gtk::TreeStore&gt;(refModel);\n
 >"
9843msgid ""20377msgid ""
9844"<code>auto refStore = std::dynamic_pointer_cast&lt;Gtk::TreeStore&gt;(refModel)20378"<code>auto refStore = std::dynamic_pointer_cast&lt;Gtk::TreeStore&gt;(refModel)
>;\n">;\n"
9845"auto refStore2 = std::static_pointer_cast&lt;Gtk::TreeStore&gt;(refModel);\n"20379"auto refStore2 = std::static_pointer_cast&lt;Gtk::TreeStore&gt;(refModel);\n"
9846"</code>"20380"</code>"
9847msgstr ""20381msgstr ""
nn20382"\n"
20383"auto refStore = std::dynamic_pointer_cast&lt;Gtk::TreeStore&gt;(refModel);\n"
20384"auto refStore2 = std::static_pointer_cast&lt;Gtk::TreeStore&gt;(refModel);\n"
984820385
9849#. (itstool) path: section/title20386#. (itstool) path: section/title
9850#: C/index-in.docbook:886620387#: C/index-in.docbook:8866
nn20388#, fuzzy
9851msgid "Checking for nullptr"20389msgid "Checking for nullptr"
n9852msgstr ""n20390msgstr "Kontrollera nullptr"
985320391
9854#. (itstool) path: section/para20392#. (itstool) path: section/para
9855#: C/index-in.docbook:886720393#: C/index-in.docbook:8867
nn20394#, fuzzy
20395msgid ""
9856msgid "Just like normal pointers, you can check whether a <classname>RefPtr</cla20396"Just like normal pointers, you can check whether a <classname>RefPtr</"
>ssname> points to anything." 
20397"classname> points to anything."
9857msgstr ""20398msgstr ""
nn20399"Precis som vanliga pekare kan du kontrollera om en <classname>RefPtr</"
20400"classname> pekar på något."
985820401
9859#. (itstool) path: section/programlisting20402#. (itstool) path: section/programlisting
9860#: C/index-in.docbook:887120403#: C/index-in.docbook:8871
n9861#, no-wrapn20404#, fuzzy, no-wrap
9862msgid ""20405msgid ""
9863"<code>auto refModel = m_TreeView.get_model();\n"20406"<code>auto refModel = m_TreeView.get_model();\n"
9864"if (refModel)\n"20407"if (refModel)\n"
9865"{\n"20408"{\n"
9866"  auto cols_count = refModel-&gt;get_n_columns();\n"20409"  auto cols_count = refModel-&gt;get_n_columns();\n"
9867"  ...\n"20410"  ...\n"
9868"}\n"20411"}\n"
9869"</code>"20412"</code>"
9870msgstr ""20413msgstr ""
nn20414"\n"
20415"auto refModel = m_TreeView.get_model();\n"
20416"if (refModel)\n"
20417"{\n"
20418"  auto cols_count = refModel-&gt;get_n_columns();\n"
20419"  ...\n"
20420"}\n"
987120421
9872#. (itstool) path: section/para20422#. (itstool) path: section/para
9873#: C/index-in.docbook:887820423#: C/index-in.docbook:8878
n9874msgid "But unlike normal pointers, <classname>RefPtr</classname>s are automatican20424msgid ""
>lly initialized to <literal>nullptr</literal> so you don't need to remember to d 
>o that yourself." 
20425"But unlike normal pointers, <classname>RefPtr</classname>s are automatically "
20426"initialized to <literal>nullptr</literal> so you don't need to remember to "
20427"do that yourself."
9875msgstr ""20428msgstr ""
nn20429"Men till skillnad från vanliga pekare så initieras <classname>RefPtr</"
20430"classname>-pekare automatiskt till <literal>nullptr</literal>, så du behöver "
20431"inte komma ihåg att göra det själv."
987620432
9877#. (itstool) path: section/title20433#. (itstool) path: section/title
9878#: C/index-in.docbook:888520434#: C/index-in.docbook:8885
nn20435#, fuzzy
9879msgid "Constness"20436msgid "Constness"
n9880msgstr ""n20437msgstr "Const-het"
988120438
nn20439# TODO: realize
9882#. (itstool) path: section/para20440#. (itstool) path: section/para
9883#: C/index-in.docbook:888620441#: C/index-in.docbook:8886
n9884msgid "The use of the <literal>const</literal> keyword in <phrase role=\"nowrap\n20442#, fuzzy
>">C++</phrase> is not always clear. You might not realize that <type>const Somet 
>hing*</type> declares a pointer to a <type>const Something</type>. The pointer c 
>an be changed, but not the <type>Something</type> that it points to." 
20443msgid ""
20444"The use of the <literal>const</literal> keyword in <phrase role=\"nowrap\">C+"
20445"+</phrase> is not always clear. You might not realize that <type>const "
20446"Something*</type> declares a pointer to a <type>const Something</type>. The "
20447"pointer can be changed, but not the <type>Something</type> that it points to."
9885msgstr ""20448msgstr ""
nn20449"Användningen av nyckelordet <literal>const</literal> i C++ är inte alltid "
20450"tydlig. Du kanske inte inser att <type>const Something*</type> deklarerar en "
20451"pekare till ett <type>const Something</type>. Pekaren kan ändras, men inte "
20452"<type>Something</type> som den pekar på."
988620453
9887#. (itstool) path: section/para20454#. (itstool) path: section/para
9888#: C/index-in.docbook:889220455#: C/index-in.docbook:8892
n9889msgid "Therefore, the <classname>RefPtr</classname> equivalent of <type>Somethinn20456#, fuzzy
>g*</type> for a method parameter is <type>const Glib::RefPtr&lt;Something&gt;&am 
>p;</type>, and the equivalent of <type>const Something*</type> is <type>const Gl 
>ib::RefPtr&lt;const Something&gt;&amp;</type>." 
20457msgid ""
20458"Therefore, the <classname>RefPtr</classname> equivalent of <type>Something*</"
20459"type> for a method parameter is <type>const Glib::RefPtr&lt;Something&gt;"
20460"&amp;</type>, and the equivalent of <type>const Something*</type> is "
20461"<type>const Glib::RefPtr&lt;const Something&gt;&amp;</type>."
9890msgstr ""20462msgstr ""
nn20463"Därför är <classname>RefPtr</classname>-motsvarigheten till "
20464"<type>Something*</type> för en metodparameter <type>const Glib::RefPtr&lt;"
20465"Something&gt;&amp;</type>, och motsvarigheten för <type>const Something*</"
20466"type> är <type>const Glib::RefPtr&lt;const Something&gt;&amp;</type>."
989120467
9892#. (itstool) path: section/para20468#. (itstool) path: section/para
9893#: C/index-in.docbook:889920469#: C/index-in.docbook:8899
n9894msgid "The <literal>const ... &amp;</literal> around both is just for efficiencyn20470#, fuzzy
>, like using <classname>const std::string&amp;</classname> instead of <classname 
>>std::string</classname> for a method parameter to avoid unnecessary copying." 
20471msgid ""
20472"The <literal>const ... &amp;</literal> around both is just for efficiency, "
20473"like using <classname>const std::string&amp;</classname> instead of "
20474"<classname>std::string</classname> for a method parameter to avoid "
20475"unnecessary copying."
9895msgstr ""20476msgstr ""
nn20477"<literal>const ... &amp;</literal> runt båda är bara för effektivitet, som "
20478"att använda <classname>const std::string&amp;</classname> i stället för "
20479"<classname>std::string</classname> för en metodparameter för att undvika "
20480"onödig kopiering."
989620481
9897#. (itstool) path: section/title20482#. (itstool) path: section/title
9898#: C/index-in.docbook:891320483#: C/index-in.docbook:8913
9899msgid "Connecting signal handlers"20484msgid "Connecting signal handlers"
n9900msgstr ""n20485msgstr "Ansluta signalhanterare"
990120486
9902#. (itstool) path: section/para20487#. (itstool) path: section/para
9903#: C/index-in.docbook:891520488#: C/index-in.docbook:8915
n9904msgid "<application>gtkmm</application> widget classes have signal accessor methn20489#, fuzzy
>ods, such as <methodname>Gtk::Button::signal_clicked()</methodname>, which allow 
> you to connect your signal handler. Thanks to the flexibility of <application>l 
>ibsigc++</application>, the callback library used by <application>gtkmm</applica 
>tion>, the signal handler can be almost any kind of function, but you will proba 
>bly want to use a class method. Among <application>GTK</application> C coders, t 
>hese signal handlers are often named callbacks." 
20490msgid ""
20491"<application>gtkmm</application> widget classes have signal accessor "
20492"methods, such as <methodname>Gtk::Button::signal_clicked()</methodname>, "
20493"which allow you to connect your signal handler. Thanks to the flexibility of "
20494"<application>libsigc++</application>, the callback library used by "
20495"<application>gtkmm</application>, the signal handler can be almost any kind "
20496"of function, but you will probably want to use a class method. Among "
20497"<application>GTK</application> C coders, these signal handlers are often "
20498"named callbacks."
9905msgstr ""20499msgstr ""
nn20500"<application>gtkmm</application>-komponentklasser har åtkomstmetoder för "
20501"signaler, som <methodname>Gtk::Button::signal_clicked()</methodname>, vilken "
20502"låter dig ansluta din signalhanterare. Tack vare flexibiliteten hos "
20503"<application>libsigc++</application>, återanropsbiblioteket som används av "
20504"<application>gtkmm</application>, så kan signalhanteraren vara nästan vilken "
20505"sorts funktion som helst, men du kommer troligen vilja använda en "
20506"klassmetod. Bland <application>GTK</application>:s C-kodare kallas dessa "
20507"signalhanterare ofta återanrop."
990620508
9907#. (itstool) path: section/para20509#. (itstool) path: section/para
9908#: C/index-in.docbook:892520510#: C/index-in.docbook:8925
9909msgid "Here's an example of a signal handler being connected to a signal:"20511msgid "Here's an example of a signal handler being connected to a signal:"
n9910msgstr ""n20512msgstr "Här är ett exempel på en signalhanterare som ansluts till en signal:"
991120513
9912#. (itstool) path: section/programlisting20514#. (itstool) path: section/programlisting
9913#: C/index-in.docbook:892920515#: C/index-in.docbook:8929
n9914#, no-wrapn20516#, fuzzy, no-wrap
9915msgid ""20517msgid ""
9916"<code>\n"20518"<code>\n"
9917"#include &lt;gtkmm/button.h&gt;\n"20519"#include &lt;gtkmm/button.h&gt;\n"
9918"\n"20520"\n"
9919"void on_button_clicked()\n"20521"void on_button_clicked()\n"
9931"private:\n"20533"private:\n"
9932"  Gtk::Button button {\"Hello World\"};\n"20534"  Gtk::Button button {\"Hello World\"};\n"
9933"};\n"20535"};\n"
9934"</code>"20536"</code>"
9935msgstr ""20537msgstr ""
nn20538"\n"
20539"#include &lt;gtkmm/button.h&gt;\n"
20540"\n"
20541"void on_button_clicked()\n"
20542"{\n"
20543"  std::cout &lt;&lt; \"Hej världen\" &lt;&lt; std::endl;\n"
20544"}\n"
20545"\n"
20546"class some_class\n"
20547"{\n"
20548"public:\n"
20549"  some_class\n"
20550"  {\n"
20551"    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));\n"
20552"  }\n"
20553"private:\n"
20554"  Gtk::Button button {\"Hej världen\"};\n"
20555"};\n"
993620556
9937#. (itstool) path: section/para20557#. (itstool) path: section/para
9938#: C/index-in.docbook:894920558#: C/index-in.docbook:8949
nn20559#, fuzzy
20560msgid ""
9939msgid "There's rather a lot to think about in this (non-functional) code. First 20561"There's rather a lot to think about in this (non-functional) code. First "
>let's identify the parties involved:" 
20562"let's identify the parties involved:"
9940msgstr ""20563msgstr ""
nn20564"Det finns ganska mycket att fundera på i denna (ej fungerande) kod. Låt oss "
20565"först identifiera de involverade parterna:"
994120566
9942#. (itstool) path: listitem/para20567#. (itstool) path: listitem/para
9943#: C/index-in.docbook:895720568#: C/index-in.docbook:8957
9944msgid "The signal handler is <methodname>on_button_clicked()</methodname>."20569msgid "The signal handler is <methodname>on_button_clicked()</methodname>."
n9945msgstr ""n20570msgstr "Signalhanteraren är <methodname>on_button_clicked()</methodname>."
994620571
9947#. (itstool) path: listitem/para20572#. (itstool) path: listitem/para
9948#: C/index-in.docbook:896320573#: C/index-in.docbook:8963
nn20574#, fuzzy
20575msgid ""
9949msgid "We're hooking it up to the <classname>Gtk::Button</classname> object call20576"We're hooking it up to the <classname>Gtk::Button</classname> object called "
>ed <varname>button</varname>." 
20577"<varname>button</varname>."
9950msgstr ""20578msgstr ""
nn20579"Vi kopplar ihop den med <classname>Gtk::Button</classname>-objektet kallat "
20580"<varname>button</varname>."
995120581
9952#. (itstool) path: listitem/para20582#. (itstool) path: listitem/para
9953#: C/index-in.docbook:897020583#: C/index-in.docbook:8970
n9954msgid "When the Button emits its <literal>clicked</literal> signal, <methodname>n20584msgid ""
>on_button_clicked()</methodname> will be called." 
20585"When the Button emits its <literal>clicked</literal> signal, "
20586"<methodname>on_button_clicked()</methodname> will be called."
9955msgstr ""20587msgstr ""
nn20588"När denna Button sänder ut sin <literal>clicked</literal>-signal kommer "
20589"<methodname>on_button_clicked()</methodname> att anropas."
995620590
9957#. (itstool) path: section/para20591#. (itstool) path: section/para
9958#: C/index-in.docbook:897820592#: C/index-in.docbook:8978
9959msgid "Now let's look at the connection again:"20593msgid "Now let's look at the connection again:"
n9960msgstr ""n20594msgstr "Låt oss titta på anslutningen igen:"
996120595
9962#. (itstool) path: section/programlisting20596#. (itstool) path: section/programlisting
9963#: C/index-in.docbook:898220597#: C/index-in.docbook:8982
n9964#, no-wrapn20598#, fuzzy, no-wrap
9965msgid ""20599msgid ""
9966"<code>    ...\n"20600"<code>    ...\n"
9967"    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));\n"20601"    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));\n"
9968"    ...\n"20602"    ...\n"
9969"</code>"20603"</code>"
9970msgstr ""20604msgstr ""
nn20605"\n"
20606"    ...\n"
20607"    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));\n"
20608"    ...\n"
997120609
9972#. (itstool) path: section/para20610#. (itstool) path: section/para
9973#: C/index-in.docbook:898720611#: C/index-in.docbook:8987
n9974msgid "Note that we don't pass a pointer to <methodname>on_button_clicked()</metn20612#, fuzzy
>hodname> directly to the signal's <methodname>connect()</methodname> method. Ins 
>tead, we call <function>sigc::ptr_fun()</function>, and pass the result to <meth 
>odname>connect()</methodname>." 
20613msgid ""
20614"Note that we don't pass a pointer to <methodname>on_button_clicked()</"
20615"methodname> directly to the signal's <methodname>connect()</methodname> "
20616"method. Instead, we call <function>sigc::ptr_fun()</function>, and pass the "
20617"result to <methodname>connect()</methodname>."
9975msgstr ""20618msgstr ""
nn20619"Observera att vi inte skickar en pekare till "
20620"<methodname>on_button_clicked()</methodname> direkt till signalens "
20621"<methodname>connect()</methodname>-metod. I stället anropar vi "
20622"<function>sigc::ptr_fun()</function> och skickar resultatet till "
20623"<methodname>connect()</methodname>."
997620624
9977#. (itstool) path: section/para20625#. (itstool) path: section/para
9978#: C/index-in.docbook:899420626#: C/index-in.docbook:8994
n9979msgid "<function>sigc::ptr_fun()</function> generates a <classname>sigc::slot</cn20627#, fuzzy
>lassname>. A slot is an object which looks and feels like a function, but is act 
>ually an object. These are also known as function objects, or functors. <functio 
>n>sigc::ptr_fun()</function> generates a slot for a standalone function or stati 
>c method. <function>sigc::mem_fun()</function> generates a slot for a member met 
>hod of a particular instance." 
20628msgid ""
20629"<function>sigc::ptr_fun()</function> generates a <classname>sigc::slot</"
20630"classname>. A slot is an object which looks and feels like a function, but "
20631"is actually an object. These are also known as function objects, or "
20632"functors. <function>sigc::ptr_fun()</function> generates a slot for a "
20633"standalone function or static method. <function>sigc::mem_fun()</function> "
20634"generates a slot for a member method of a particular instance."
9980msgstr ""20635msgstr ""
nn20636"<function>sigc::ptr_fun()</function> genererar en <classname>sigc::slot</"
20637"classname>. Ett fack är ett objekt som ser ut och känns som en funktion, men "
20638"faktiskt är ett objekt. Dessa är också kända som funktionsobjekt, eller "
20639"funktorer. <function>sigc::ptr_fun()</function> genererar ett fack för en "
20640"fristående funktion eller statisk metod. <function>sigc::mem_fun()</"
20641"function> genererar ett fack för en medlemsmetod för en specifik instans."
998120642
9982#. (itstool) path: section/para20643#. (itstool) path: section/para
9983#: C/index-in.docbook:900320644#: C/index-in.docbook:9003
n9984msgid "A <phrase role=\"nowrap\">C++</phrase> lambda expression is a functor whin20645#, fuzzy
>ch can be implicitly converted to a <classname>sigc::slot</classname> in the cal 
>l to <methodname>connect()</methodname>. A lambda expression can be used instead 
> of <function>sigc::ptr_fun()</function>. It's also possible to use a lambda exp 
>ression instead of <function>sigc::mem_fun()</function>, but then you won't get  
>automatic disconnection of the signal handler when a <classname>sigc::trackable< 
>/classname>-derived object goes out of scope." 
20646msgid ""
20647"A <phrase role=\"nowrap\">C++</phrase> lambda expression is a functor which "
20648"can be implicitly converted to a <classname>sigc::slot</classname> in the "
20649"call to <methodname>connect()</methodname>. A lambda expression can be used "
20650"instead of <function>sigc::ptr_fun()</function>. It's also possible to use a "
20651"lambda expression instead of <function>sigc::mem_fun()</function>, but then "
20652"you won't get automatic disconnection of the signal handler when a "
20653"<classname>sigc::trackable</classname>-derived object goes out of scope."
9985msgstr ""20654msgstr ""
nn20655"Ett C++-lambdauttryck är en funktor som kan implicit konverteras till en "
20656"<classname>sigc::slot</classname> i anropet till <methodname>connect()</"
20657"methodname>. Ett lambdauttryck kan användas i stället för <function>sigc::"
20658"ptr_fun()</function>. Det är också möjligt att använda ett lambdauttryck i "
20659"stället för <function>sigc::mem_fun()</function>, men då kommer du inte få "
20660"automatisk frånkoppling av signalhanteraren då ett <classname>sigc::"
20661"trackable</classname>-härlett objekt lämnar sin räckvidd."
998620662
9987#. (itstool) path: section/para20663#. (itstool) path: section/para
9988#: C/index-in.docbook:901220664#: C/index-in.docbook:9012
nn20665#, fuzzy
9989msgid "Here's a slightly larger example of slots in action:"20666msgid "Here's a slightly larger example of slots in action:"
n9990msgstr ""n20667msgstr "Här är ett lite större exempel på användning av fack:"
999120668
9992#. (itstool) path: section/programlisting20669#. (itstool) path: section/programlisting
9993#: C/index-in.docbook:901620670#: C/index-in.docbook:9016
n9994#, no-wrapn20671#, fuzzy, no-wrap
9995msgid ""20672msgid ""
9996"<code>\n"20673"<code>\n"
9997"#include &lt;gtkmm/button.h&gt;\n"20674"#include &lt;gtkmm/button.h&gt;\n"
9998"\n"20675"\n"
9999"void on_button_clicked()\n"20676"void on_button_clicked()\n"
10013"private:\n"20690"private:\n"
10014"  Gtk::Button button {\"Hello World\"};\n"20691"  Gtk::Button button {\"Hello World\"};\n"
10015"};\n"20692"};\n"
10016"</code>"20693"</code>"
10017msgstr ""20694msgstr ""
nn20695"\n"
20696"#include &lt;gtkmm/button.h&gt;\n"
20697"\n"
20698"void on_button_clicked()\n"
20699"{\n"
20700"  std::cout &lt;&lt; \"Hej världen\" &lt;&lt; std::endl;\n"
20701"}\n"
20702"\n"
20703"class some_class\n"
20704"{\n"
20705"public:\n"
20706"  some_class\n"
20707"  {\n"
20708"    button.signal_clicked().connect(sigc::ptr_fun(&amp;on_button_clicked));\n"
20709"    button.signal_clicked().connect(sigc::mem_fun(*this, &amp;some_class::on_bu
 >tton_clicked));\n"
20710"  }\n"
20711"  void on_button_clicked();\n"
20712"private:\n"
20713"  Gtk::Button button {\"Hej världen\"};\n"
20714"};\n"
1001820715
10019#. (itstool) path: section/para20716#. (itstool) path: section/para
10020#: C/index-in.docbook:903820717#: C/index-in.docbook:9038
nn20718msgid ""
10021msgid "The first call to <methodname>connect()</methodname> is just like the one20719"The first call to <methodname>connect()</methodname> is just like the one we "
> we saw last time; nothing new here." 
20720"saw last time; nothing new here."
10022msgstr ""20721msgstr ""
nn20722"Det första anropet till <methodname>connect()</methodname> är precis som det "
20723"vi såg sist, inget nytt här."
1002320724
10024#. (itstool) path: section/para20725#. (itstool) path: section/para
10025#: C/index-in.docbook:904120726#: C/index-in.docbook:9041
n10026msgid "The next is more interesting. <function>sigc::mem_fun()</function> is caln20727#, fuzzy
>led with two arguments. The first argument is <parameter>*this</parameter>, whic 
>h is the object that our new slot will be pointing at. The second argument is a  
>pointer to one of its methods. This particular version of <function>sigc::mem_fu 
>n()</function> creates a slot which will, when \"called\", call the pointed-to m 
>ethod of the specified object." 
20728msgid ""
20729"The next is more interesting. <function>sigc::mem_fun()</function> is called "
20730"with two arguments. The first argument is <parameter>*this</parameter>, "
20731"which is the object that our new slot will be pointing at. The second "
20732"argument is a pointer to one of its methods. This particular version of "
20733"<function>sigc::mem_fun()</function> creates a slot which will, when "
20734"\"called\", call the pointed-to method of the specified object."
10027msgstr ""20735msgstr ""
nn20736"Nästa är mer intressant. <function>sigc::mem_fun()</function> anropas med "
20737"två argument. Det första argumentet är <parameter>*this</parameter> som är "
20738"objektet som vårt nya fack kommer peka på. Det andra argumentet är en pekare "
20739"till en av dess metoder. Denna specifika version av <function>sigc::"
20740"mem_fun()</function> skapar ett fack som, när det ”anropas”, anropar metoden "
20741"som pekas på i det angivna objektet."
1002820742
10029#. (itstool) path: section/para20743#. (itstool) path: section/para
10030#: C/index-in.docbook:905020744#: C/index-in.docbook:9050
n10031msgid "Another thing to note about this example is that we made the call to <metn20745#, fuzzy
>hodname>connect()</methodname> twice for the same signal object. This is perfect 
>ly fine - when the button is clicked, both signal handlers will be called." 
20746msgid ""
20747"Another thing to note about this example is that we made the call to "
20748"<methodname>connect()</methodname> twice for the same signal object. This is "
20749"perfectly fine - when the button is clicked, both signal handlers will be "
20750"called."
10032msgstr ""20751msgstr ""
nn20752"En annan sak att observera om detta exempel är att vi gjort anropet till "
20753"<methodname>connect()</methodname> två gånger för samma signalobjekt. Detta "
20754"är fullständigt lugnt - när knappen klickas på så kommer båda "
20755"signalhanterarna anropas."
1003320756
10034#. (itstool) path: section/para20757#. (itstool) path: section/para
10035#: C/index-in.docbook:905720758#: C/index-in.docbook:9057
n10036msgid "We just told you that the button's <literal>clicked</literal> signal is en20759#, fuzzy
>xpecting to call a method with no arguments. All signals have requirements like  
>this - you can't hook a function with two arguments to a signal expecting none ( 
>unless you use an adapter, such as <function>sigc::bind()</function>, of course) 
>. Therefore, it's important to know what type of signal handler you'll be expect 
>ed to connect to a given signal." 
20760msgid ""
20761"We just told you that the button's <literal>clicked</literal> signal is "
20762"expecting to call a method with no arguments. All signals have requirements "
20763"like this - you can't hook a function with two arguments to a signal "
20764"expecting none (unless you use an adapter, such as <function>sigc::bind()</"
20765"function>, of course). Therefore, it's important to know what type of signal "
20766"handler you'll be expected to connect to a given signal."
10037msgstr ""20767msgstr ""
nn20768"Vi berättade just för dig att knappens <literal>clicked</literal>-signal "
20769"förväntar sig att anropa en metod utan argument. Alla signaler har såna här "
20770"krav - du kan inte kroka en funktion med två argument till en signal som "
20771"inte förväntar sig något (om du förstås inte använder en adapter som "
20772"<function>sigc::bind()</function>). Det är därför viktigt att veta vilken "
20773"typ av signalhanterare som du förväntas ansluta till en given signal."
1003820774
10039#. (itstool) path: section/title20775#. (itstool) path: section/title
10040#: C/index-in.docbook:906920776#: C/index-in.docbook:9069
10041msgid "Writing signal handlers"20777msgid "Writing signal handlers"
n10042msgstr ""n20778msgstr "Skriva signalhanterare"
1004320779
10044#. (itstool) path: section/para20780#. (itstool) path: section/para
10045#: C/index-in.docbook:907120781#: C/index-in.docbook:9071
n10046msgid "To find out what type of signal handler you can connect to a signal, you n20782#, fuzzy
>can look it up in the reference documentation or the header file. Here's an exam 
>ple of a signal declaration you might see in the <application>gtkmm</application 
>> headers:" 
20783msgid ""
20784"To find out what type of signal handler you can connect to a signal, you can "
20785"look it up in the reference documentation or the header file. Here's an "
20786"example of a signal declaration you might see in the <application>gtkmm</"
20787"application> headers:"
10047msgstr ""20788msgstr ""
nn20789"För att få reda på vilken typ av signalhanterare du kan ansluta till en "
20790"signal kan du slå upp den i referensdokumentationen eller header-filen. Här "
20791"är ett exempel på en signaldeklaration som du kan se i <application>gtkmm</"
20792"application>-headerfilerna:"
1004820793
10049#. (itstool) path: section/programlisting20794#. (itstool) path: section/programlisting
10050#: C/index-in.docbook:907720795#: C/index-in.docbook:9077
n10051#, no-wrapn20796#, fuzzy, no-wrap
20797#| msgid ""
20798#| "\n"
20799#| "Glib::SignalProxy&lt;bool(Gtk::DirectionType)&gt; signal_focus()\n"
10052msgid ""20800msgid ""
10053"<code>Glib::SignalProxy&lt;bool(Gtk::DirectionType)&gt; signal_focus()\n"20801"<code>Glib::SignalProxy&lt;bool(Gtk::DirectionType)&gt; signal_focus()\n"
10054"</code>"20802"</code>"
10055msgstr ""20803msgstr ""
nn20804"\n"
20805"Glib::SignalProxy&lt;bool(Gtk::DirectionType)&gt; signal_focus()\n"
1005620806
10057#. (itstool) path: section/para20807#. (itstool) path: section/para
10058#: C/index-in.docbook:908020808#: C/index-in.docbook:9080
n10059msgid "Other than the signal's name (<literal>focus</literal>), the template argn20809#, fuzzy
>uments are important to note here. The first argument, <type>bool</type>, is the 
> type that the signal handler should return; and the type within parentheses, <t 
>ype>Gtk::DirectionType</type>, is the type of this signal's first, and only, arg 
>ument. By looking at the reference documentation, you can see the names of the a 
>rguments too." 
20810msgid ""
20811"Other than the signal's name (<literal>focus</literal>), the template "
20812"arguments are important to note here. The first argument, <type>bool</type>, "
20813"is the type that the signal handler should return; and the type within "
20814"parentheses, <type>Gtk::DirectionType</type>, is the type of this signal's "
20815"first, and only, argument. By looking at the reference documentation, you "
20816"can see the names of the arguments too."
10060msgstr ""20817msgstr ""
nn20818"Förutom signalens namn (<literal>focus</literal>) är mallargumenten viktiga "
20819"att notera här. Det första argumentet, <type>bool</type>, är typen som "
20820"signalhanteraren ska returnera; och typen inom parenteser, <type>Gtk::"
20821"DirectionType</type>, är typen på denna signals första, och enda, argument. "
20822"Genom att titta på referensdokumentationen kan du även se namnen på "
20823"argumenten."
1006120824
10062#. (itstool) path: section/para20825#. (itstool) path: section/para
10063#: C/index-in.docbook:908920826#: C/index-in.docbook:9089
n10064msgid "The same principles apply for signals which have more arguments. Here's on20827#, fuzzy
>ne with three (taken from <filename>&lt;gtkmm/textbuffer.h&gt;</filename>):" 
20828msgid ""
20829"The same principles apply for signals which have more arguments. Here's one "
20830"with three (taken from <filename>&lt;gtkmm/textbuffer.h&gt;</filename>):"
10065msgstr ""20831msgstr ""
nn20832"Samma principer gäller för signaler som har fler argument. Här är en med tre "
20833"(tagen från <filename>&lt;gtkmm/textbuffer.h&gt;</filename>):"
1006620834
10067#. (itstool) path: section/programlisting20835#. (itstool) path: section/programlisting
10068#: C/index-in.docbook:909420836#: C/index-in.docbook:9094
n10069#, no-wrapn20837#, fuzzy, no-wrap
20838#| msgid ""
20839#| "\n"
20840#| "Glib::SignalProxy&lt;void(TextBuffer::iterator&amp;, const Glib::ustrin&amp;
 >, int)&gt; signal_insert();\n"
10070msgid ""20841msgid ""
10071"<code>Glib::SignalProxy&lt;void(TextBuffer::iterator&amp;, const Glib::ustrin&a20842"<code>Glib::SignalProxy&lt;void(TextBuffer::iterator&amp;, const Glib::ustrin&a
>mp;, int)&gt; signal_insert();\n">mp;, int)&gt; signal_insert();\n"
10072"</code>"20843"</code>"
10073msgstr ""20844msgstr ""
nn20845"\n"
20846"Glib::SignalProxy&lt;void(TextBuffer::iterator&amp;, const Glib::ustrin&amp;, i
 >nt)&gt; signal_insert();\n"
1007420847
10075#. (itstool) path: section/para20848#. (itstool) path: section/para
10076#: C/index-in.docbook:909720849#: C/index-in.docbook:9097
n10077msgid "It follows the same form. The first type is <type>void</type>, so that shn20850#, fuzzy
>ould be our signal handler's return type. The following three types are the argu 
>ment types, in order. Our signal handler's prototype could look like this:" 
20851msgid ""
20852"It follows the same form. The first type is <type>void</type>, so that "
20853"should be our signal handler's return type. The following three types are "
20854"the argument types, in order. Our signal handler's prototype could look like "
20855"this:"
10078msgstr ""20856msgstr ""
nn20857"Det följer samma form. Den första typen är <type>void</type>, så det ska "
20858"vara vår signalhanterares returtyp. De följande tre typerna är "
20859"argumenttyperna i ordning. Vår signalhanterares prototyp skulle kunna se ut "
20860"så här:"
1007920861
10080#. (itstool) path: section/programlisting20862#. (itstool) path: section/programlisting
10081#: C/index-in.docbook:910420863#: C/index-in.docbook:9104
n10082#, no-wrapn20864#, fuzzy, no-wrap
10083msgid ""20865msgid ""
10084"<code>void on_insert(TextBuffer::iterator&amp; pos, const Glib::ustring&amp; te20866"<code>void on_insert(TextBuffer::iterator&amp; pos, const Glib::ustring&amp; te
>xt, int bytes)\n">xt, int bytes)\n"
10085"</code>"20867"</code>"
10086msgstr ""20868msgstr ""
nn20869"\n"
20870"void on_insert(TextBuffer::iterator&amp; pos, const Glib::ustring&amp; text, in
 >t bytes)\n"
1008720871
10088#. (itstool) path: section/title20872#. (itstool) path: section/title
10089#: C/index-in.docbook:910920873#: C/index-in.docbook:9109
10090msgid "Disconnecting signal handlers"20874msgid "Disconnecting signal handlers"
n10091msgstr ""n20875msgstr "Koppla från signalhanterare"
1009220876
10093#. (itstool) path: section/para20877#. (itstool) path: section/para
10094#: C/index-in.docbook:911120878#: C/index-in.docbook:9111
nn20879msgid ""
10095msgid "Let's take another look at a Signal's <literal>connect</literal> method:"20880"Let's take another look at a Signal's <literal>connect</literal> method:"
10096msgstr ""20881msgstr ""
nn20882"Låt oss ta ännu en titt på en <literal>connect</literal>-metod för en Signal:"
1009720883
10098#. (itstool) path: section/programlisting20884#. (itstool) path: section/programlisting
10099#: C/index-in.docbook:911520885#: C/index-in.docbook:9115
n10100#, no-wrapn20886#, fuzzy, no-wrap
10101msgid ""20887msgid ""
10102"<code>sigc::connection signal&lt;void(int)&gt;::connect(const sigc::slot&lt;voi20888"<code>sigc::connection signal&lt;void(int)&gt;::connect(const sigc::slot&lt;voi
>d(int)&gt;&amp;);\n">d(int)&gt;&amp;);\n"
10103"</code>"20889"</code>"
10104msgstr ""20890msgstr ""
nn20891"\n"
20892"sigc::connection signal&lt;void(int)&gt;::connect(const sigc::slot&lt;void(int)
 >&gt;&amp;);\n"
1010520893
10106#. (itstool) path: section/para20894#. (itstool) path: section/para
10107#: C/index-in.docbook:911820895#: C/index-in.docbook:9118
n10108msgid "The returned <classname>sigc::connection</classname> can be used to contrn20896#, fuzzy
>ol the connection. By keeping a connection object you can disconnect its associa 
>ted signal handler using the <methodname>sigc::connection::disconnect()</methodn 
>ame> method." 
20897msgid ""
20898"The returned <classname>sigc::connection</classname> can be used to control "
20899"the connection. By keeping a connection object you can disconnect its "
20900"associated signal handler using the <methodname>sigc::connection::"
20901"disconnect()</methodname> method."
10109msgstr ""20902msgstr ""
nn20903"Den returnerade <classname>sigc::connection</classname> kan användas för att "
20904"styra anslutningen. Genom att behålla ett anslutningsobjekt så kan du koppla "
20905"från dess associerade signalhanterare med metoden <methodname>sigc::"
20906"connection::disconnect()</methodname>."
1011020907
10111#. (itstool) path: section/title20908#. (itstool) path: section/title
10112#: C/index-in.docbook:912620909#: C/index-in.docbook:9126
10113msgid "Overriding default signal handlers"20910msgid "Overriding default signal handlers"
n10114msgstr ""n20911msgstr "Åsidosätta standardsignalhanterarna"
1011520912
10116#. (itstool) path: section/para20913#. (itstool) path: section/para
10117#: C/index-in.docbook:912820914#: C/index-in.docbook:9128
n10118msgid "So far we've told you to perform actions in response to button-presses ann20915msgid ""
>d the like by handling signals. That's certainly a good way to do things, but it 
>'s not the only way." 
20916"So far we've told you to perform actions in response to button-presses and "
20917"the like by handling signals. That's certainly a good way to do things, but "
20918"it's not the only way."
10119msgstr ""20919msgstr ""
nn20920"Så här långt har vi sagt till dig att utföra åtgärder som var till "
20921"knapptryckningar och liknande genom att hantera signaler. Det är sannerligen "
20922"ett bra sätt att göra saker, men inte det enda sättet."
1012020923
10121#. (itstool) path: section/para20924#. (itstool) path: section/para
10122#: C/index-in.docbook:913520925#: C/index-in.docbook:9135
n10123msgid "Instead of laboriously connecting signal handlers to signals, you can simn20926#, fuzzy
>ply make a new class which inherits from a widget - say, a Button - and then ove 
>rride the default signal handler, such as Button::on_clicked(). This can be a lo 
>t simpler than hooking up signal handlers for everything." 
20927msgid ""
20928"Instead of laboriously connecting signal handlers to signals, you can simply "
20929"make a new class which inherits from a widget - say, a Button - and then "
20930"override the default signal handler, such as Button::on_clicked(). This can "
20931"be a lot simpler than hooking up signal handlers for everything."
10124msgstr ""20932msgstr ""
nn20933"I stället för att strävsamt ansluta signalhanterare till signaler kan du "
20934"helt enkelt göra en ny klass som ärver från en komponent - exempelvis en "
20935"Button - och sedan åsidosätta standardsignalhanteraren, som Button::"
20936"on_clicked(). Detta kan vara mycket enklare än att koppla in signalhanterare "
20937"för allt."
1012520938
10126#. (itstool) path: section/para20939#. (itstool) path: section/para
10127#: C/index-in.docbook:914220940#: C/index-in.docbook:9142
n10128msgid "Subclassing isn't always the best way to accomplish things. It is only usn20941#, fuzzy
>eful when you want the widget to handle its own signal by itself. If you want so 
>me other class to handle the signal then you'll need to connect a separate handl 
>er. This is even more true if you want several objects to handle the same signal 
>, or if you want one signal handler to respond to the same signal from different 
> objects." 
20942msgid ""
20943"Subclassing isn't always the best way to accomplish things. It is only "
20944"useful when you want the widget to handle its own signal by itself. If you "
20945"want some other class to handle the signal then you'll need to connect a "
20946"separate handler. This is even more true if you want several objects to "
20947"handle the same signal, or if you want one signal handler to respond to the "
20948"same signal from different objects."
10129msgstr ""20949msgstr ""
nn20950"Underklassning är inte alltid bästa sättet att åstadkomma saker. Det är bara "
20951"användbart när du vill att komponenten själv ska hantera sin egen signal. Om "
20952"du vill att någon annan klass ska hantera signalen så kommer du behöva "
20953"ansluta en separat hanterare. Detta är till och med mera sant om du vill att "
20954"flera objekt ska hantera samma signal, eller om du vill att en "
20955"signalhanterare ska svara på samma signal från olika objekt."
1013020956
10131#. (itstool) path: section/para20957#. (itstool) path: section/para
10132#: C/index-in.docbook:914720958#: C/index-in.docbook:9147
n10133msgid "<application>gtkmm</application> classes are designed with overriding in n20959#, fuzzy
>mind; they contain virtual member methods specifically intended to be overridden 
>." 
20960msgid ""
20961"<application>gtkmm</application> classes are designed with overriding in "
20962"mind; they contain virtual member methods specifically intended to be "
20963"overridden."
10134msgstr ""20964msgstr ""
nn20965"<application>gtkmm</application>-klasser designas med åsidosättning i "
20966"åtanke; de innehåller virtuella medlemsmetoder specifikt avsedda att "
20967"åsidosättas."
1013520968
10136#. (itstool) path: section/para20969#. (itstool) path: section/para
10137#: C/index-in.docbook:915220970#: C/index-in.docbook:9152
10138msgid "Let's look at an example of overriding:"20971msgid "Let's look at an example of overriding:"
n10139msgstr ""n20972msgstr "Låt oss titta på ett exempel på åsidosättning:"
1014020973
10141#. (itstool) path: section/programlisting20974#. (itstool) path: section/programlisting
10142#: C/index-in.docbook:915620975#: C/index-in.docbook:9156
n10143#, no-wrapn20976#, fuzzy, no-wrap
10144msgid ""20977msgid ""
10145"<code>#include &lt;gtkmm/button.h&gt;\n"20978"<code>#include &lt;gtkmm/button.h&gt;\n"
10146"\n"20979"\n"
10147"class OverriddenButton : public Gtk::Button\n"20980"class OverriddenButton : public Gtk::Button\n"
10148"{\n"20981"{\n"
10157"  // call the base class's version of the method:\n"20990"  // call the base class's version of the method:\n"
10158"  Gtk::Button::on_clicked();\n"20991"  Gtk::Button::on_clicked();\n"
10159"}\n"20992"}\n"
10160"</code>"20993"</code>"
10161msgstr ""20994msgstr ""
nn20995"\n"
20996"#include &lt;gtkmm/button.h&gt;\n"
20997"\n"
20998"class OverriddenButton : public Gtk::Button\n"
20999"{\n"
21000"protected:\n"
21001"  void on_clicked() override;\n"
21002"}\n"
21003"\n"
21004"void OverriddenButton::on_clicked()\n"
21005"{\n"
21006"  std::cout &lt;&lt; \"Hej världen\" &lt;&lt; std::endl;\n"
21007"\n"
21008"  // anropa basklassens version av metoden:\n"
21009"  Gtk::Button::on_clicked();\n"
21010"}\n"
1016221011
10163#. (itstool) path: section/para21012#. (itstool) path: section/para
10164#: C/index-in.docbook:917321013#: C/index-in.docbook:9173
n10165msgid "Here we define a new class called <classname>OverriddenButton</classname>n21014#, fuzzy
>, which inherits from <classname>Gtk::Button</classname>. The only thing we chan 
>ge is the <methodname>on_clicked()</methodname> method, which is called whenever 
> <classname>Gtk::Button</classname> emits the <literal>clicked</literal> signal. 
> This method prints \"Hello World\" to <literal>stdout</literal>, and then calls 
> the original, overridden method, to let <classname>Gtk::Button</classname> do w 
>hat it would have done had we not overridden." 
21015msgid ""
21016"Here we define a new class called <classname>OverriddenButton</classname>, "
21017"which inherits from <classname>Gtk::Button</classname>. The only thing we "
21018"change is the <methodname>on_clicked()</methodname> method, which is called "
21019"whenever <classname>Gtk::Button</classname> emits the <literal>clicked</"
21020"literal> signal. This method prints \"Hello World\" to <literal>stdout</"
21021"literal>, and then calls the original, overridden method, to let "
21022"<classname>Gtk::Button</classname> do what it would have done had we not "
21023"overridden."
10166msgstr ""21024msgstr ""
nn21025"Här definierar vi en ny klass kallad <classname>OverriddenButton</classname> "
21026"som ärver från <classname>Gtk::Button</classname>. Det enda vi ändrar är "
21027"metoden <methodname>on_clicked()</methodname>, vilken anropas närhelst "
21028"<classname>Gtk::Button</classname> sänder ut signalen <literal>clicked</"
21029"literal>. Denna metod skriver ut ”Hej världen” till <literal>stdout</"
21030"literal>, och anropar sedan den ursprungliga, åsidosatta metoden, för att "
21031"låta <classname>Gtk::Button</classname> göra vad den skulle ha gjort om vi "
21032"inte hade åsidosatt."
1016721033
10168#. (itstool) path: section/para21034#. (itstool) path: section/para
10169#: C/index-in.docbook:918421035#: C/index-in.docbook:9184
n10170msgid "You don't always need to call the parent's method; there are times when yn21036#, fuzzy
>ou might not want to. Note that we called the parent method <emphasis>after</emp 
>hasis> writing \"Hello World\", but we could have called it before. In this simp 
>le example, it hardly matters much, but there are times when it will. With conne 
>cted signal handlers, it's not quite so easy to change details like this, and yo 
>u can do something here which you can't do at all with connected signal handlers 
>: you can call the parent method in the <emphasis>middle</emphasis> of your cust 
>om code." 
21037msgid ""
21038"You don't always need to call the parent's method; there are times when you "
21039"might not want to. Note that we called the parent method <emphasis>after</"
21040"emphasis> writing \"Hello World\", but we could have called it before. In "
21041"this simple example, it hardly matters much, but there are times when it "
21042"will. With connected signal handlers, it's not quite so easy to change "
21043"details like this, and you can do something here which you can't do at all "
21044"with connected signal handlers: you can call the parent method in the "
21045"<emphasis>middle</emphasis> of your custom code."
10171msgstr ""21046msgstr ""
nn21047"Du behöver inte alltid anropa den överordnades metod, det finns tillfällen "
21048"då du kan ske inte vill det. Observera att vi anropade den överordnade "
21049"metoden <emphasis>efter</emphasis> vi skrivit ”Hej världen”, men vi kunde ha "
21050"anropat det innan. I detta enkla exempel spelar det inte mycket roll, men "
21051"det finns tillfällen då det kommer göra det. Med anslutna signalhanterare är "
21052"det inte riktigt så lätt att ändra detaljer så här, och du kan göra något "
21053"hör som du inte kan göra alls med anslutna signalhanterare: du kan anropa "
21054"den överordnade metoden i <emphasis>mitten</emphasis> av din anpassade kod."
1017221055
10173#. (itstool) path: section/title21056#. (itstool) path: section/title
10174#: C/index-in.docbook:919821057#: C/index-in.docbook:9198
10175msgid "Binding extra arguments"21058msgid "Binding extra arguments"
n10176msgstr ""n21059msgstr "Binda extra argument"
1017721060
10178#. (itstool) path: section/para21061#. (itstool) path: section/para
10179#: C/index-in.docbook:920021062#: C/index-in.docbook:9200
n10180msgid "If you use one signal handler to catch the same signal from several widgen21063#, fuzzy
>ts, you might like that signal handler to receive some extra information. For in 
>stance, you might want to know which button was clicked. You can do this with <f 
>unction>sigc::bind()</function>. Here's some code from the <link linkend=\"sec-h 
>elloworld2\">helloworld2</link> example." 
21064msgid ""
21065"If you use one signal handler to catch the same signal from several widgets, "
21066"you might like that signal handler to receive some extra information. For "
21067"instance, you might want to know which button was clicked. You can do this "
21068"with <function>sigc::bind()</function>. Here's some code from the <link "
21069"linkend=\"sec-helloworld2\">helloworld2</link> example."
10181msgstr ""21070msgstr ""
nn21071"Om du använder en signalhanterare för att fånga samma signal från flera "
21072"komponenter kan du vilja att den signalhanteraren erhåller lite extra "
21073"information. Till exempel kan du vilja veta vilken knapp som klickades på. "
21074"Du kan göra detta med <function>sigc::bind()</function>. Här är lite kod "
21075"från <link linkend=\"sec-helloworld2\">helloworld2</link>-exemplet. <_:"
21076"programlisting-1/> Detta säger att vi vill att signalen ska skicka ett extra "
21077"<classname>Glib::ustring</classname>-argument till signalhanteraren, och att "
21078"värdet på det argumentet ska vara ”button 1”. Vi kommer givetvis behöva "
21079"lägga till det extra argumentet till deklarationen för vår signalhanterare: "
21080"<_:programlisting-2/> En vanlig ”clicked”-signalhanterare skulle förstås "
21081"inte ha några argument."
1018221082
10183#. (itstool) path: section/programlisting21083#. (itstool) path: section/programlisting
10184#: C/index-in.docbook:920621084#: C/index-in.docbook:9206
n10185#, no-wrapn21085#, fuzzy, no-wrap
10186msgid ""21086msgid ""
10187"<code>m_button1.signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &amp;H21087"<code>m_button1.signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &amp;H
>elloWorld::on_button_clicked), \"button 1\"));\n">elloWorld::on_button_clicked), \"button 1\"));\n"
10188"</code>"21088"</code>"
10189msgstr ""21089msgstr ""
nn21090"\n"
21091"m_button1.signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &amp;HelloWo
 >rld::on_button_clicked), \"knapp 1\"));\n"
1019021092
10191#. (itstool) path: section/para21093#. (itstool) path: section/para
10192#: C/index-in.docbook:920821094#: C/index-in.docbook:9208
n10193msgid "This says that we want the signal to send an extra <classname>Glib::ustrin21095msgid ""
>ng</classname> argument to the signal handler, and that the value of that argume 
>nt should be \"button 1\". Of course we will need to add that extra argument to  
>the declaration of our signal handler:" 
21096"This says that we want the signal to send an extra <classname>Glib::ustring</"
21097"classname> argument to the signal handler, and that the value of that "
21098"argument should be \"button 1\". Of course we will need to add that extra "
21099"argument to the declaration of our signal handler:"
10194msgstr ""21100msgstr ""
1019521101
10196#. (itstool) path: section/programlisting21102#. (itstool) path: section/programlisting
10197#: C/index-in.docbook:921321103#: C/index-in.docbook:9213
n10198#, no-wrapn21104#, fuzzy, no-wrap
21105#| msgid ""
21106#| "\n"
21107#| "void on_button_clicked(const Glib::ustring&amp; data);\n"
10199msgid ""21108msgid ""
10200"<code>void on_button_clicked(const Glib::ustring&amp; data);\n"21109"<code>void on_button_clicked(const Glib::ustring&amp; data);\n"
10201"</code>"21110"</code>"
10202msgstr ""21111msgstr ""
nn21112"\n"
21113"void on_button_clicked(const Glib::ustring&amp; data);\n"
1020321114
10204#. (itstool) path: section/para21115#. (itstool) path: section/para
10205#: C/index-in.docbook:921521116#: C/index-in.docbook:9215
10206msgid "Of course, a normal \"clicked\" signal handler would have no arguments."21117msgid "Of course, a normal \"clicked\" signal handler would have no arguments."
10207msgstr ""21118msgstr ""
1020821119
10209#. (itstool) path: section/para21120#. (itstool) path: section/para
10210#: C/index-in.docbook:921721121#: C/index-in.docbook:9217
n10211msgid "<function>sigc::bind()</function> is not commonly used, but you might finn21122#, fuzzy
>d it helpful sometimes. If you are familiar with <application>GTK</application>  
>programming then you have probably noticed that this is similar to the extra <li 
>teral>gpointer data</literal> arguments which all GTK callbacks have. This is ge 
>nerally overused in <application>GTK</application> to pass information that shou 
>ld be stored as member data in a derived widget, but widget derivation is very d 
>ifficult in C. We have far less need of this hack in <application>gtkmm</applica 
>tion>." 
21123msgid ""
21124"<function>sigc::bind()</function> is not commonly used, but you might find "
21125"it helpful sometimes. If you are familiar with <application>GTK</"
21126"application> programming then you have probably noticed that this is similar "
21127"to the extra <literal>gpointer data</literal> arguments which all GTK "
21128"callbacks have. This is generally overused in <application>GTK</application> "
21129"to pass information that should be stored as member data in a derived "
21130"widget, but widget derivation is very difficult in C. We have far less need "
21131"of this hack in <application>gtkmm</application>."
10212msgstr ""21132msgstr ""
nn21133"<function>sigc::bind()</function> används vanligen inte, men det kan ibland "
21134"vara hjälpsamt. Om du är bekant med <application>GTK</application>-"
21135"programmering så har du troligen märkta att detta är likt de extra "
21136"<literal>gpointer data</literal>-argument som alla GTK-återanrop har. Detta "
21137"överanvänds allmänt i <application>GTK</application> för att skicka "
21138"information som ska lagras som medlemsdata i en härledd komponent, men "
21139"komponenthärledning är väldigt svårt i C. Vi har mycket mindre behov av "
21140"detta hack i <application>gtkmm</application>."
1021321141
10214#. (itstool) path: section/title21142#. (itstool) path: section/title
10215#: C/index-in.docbook:922921143#: C/index-in.docbook:9229
nn21144#, fuzzy
10216msgid "Event signals"21145msgid "Event signals"
n10217msgstr ""n21146msgstr "Händelsesignaler"
1021821147
10219#. (itstool) path: section/para21148#. (itstool) path: section/para
10220#: C/index-in.docbook:923121149#: C/index-in.docbook:9231
n10221msgid "Event signals are emitted as a result of some user input, for instance a n21150#, fuzzy
>key press or a mouse motion. Usually you don't handle these events directly. Ins 
>tead, you use a subclass of <classname>Gtk::EventController</classname>, such as 
> <classname>Gtk::EventControllerKey</classname> or <classname>Gtk::GestureClick< 
>/classname>. Event controllers can be added to a widget with <methodname>Gtk::Wi 
>dget::add_controller()</methodname>." 
21151msgid ""
21152"Event signals are emitted as a result of some user input, for instance a key "
21153"press or a mouse motion. Usually you don't handle these events directly. "
21154"Instead, you use a subclass of <classname>Gtk::EventController</classname>, "
21155"such as <classname>Gtk::EventControllerKey</classname> or <classname>Gtk::"
21156"GestureClick</classname>. Event controllers can be added to a widget with "
21157"<methodname>Gtk::Widget::add_controller()</methodname>."
10222msgstr ""21158msgstr ""
nn21159"Händelsesignaler sänds ut som resultat av någon användarinmatning, "
21160"exempelvis en tangenttryckning eller en musrörelse. Vanligen hanterare du "
21161"inte dessa händelser direkt. I stället använder du en underklass till "
21162"<classname>Gtk::EventController</classname>, som <classname>Gtk::"
21163"EventControllerKey</classname> eller <classname>Gtk::GestureClick</"
21164"classname>. Händelsekontroller kan läggas till i en komponent med "
21165"<methodname>Gtk::Widget::add_controller()</methodname>."
1022321166
10224#. (itstool) path: section/para21167#. (itstool) path: section/para
10225#: C/index-in.docbook:923821168#: C/index-in.docbook:9238
n10226msgid "You might occasionally find it useful to handle events when there's sometn21169#, fuzzy
>hing you can't accomplish with normal signals. <classname>Gtk::Button</classname 
>>, for example, does not send mouse-pointer coordinates with its <literal>clicke 
>d</literal> signal, but you could handle <methodname>Gtk::GestureClick::signal_p 
>ressed()</methodname> if you needed this information. <methodname>Gtk::EventCont 
>rollerKey::signal_key_pressed()</methodname> is often used to handle key-presses 
>." 
21170msgid ""
21171"You might occasionally find it useful to handle events when there's "
21172"something you can't accomplish with normal signals. <classname>Gtk::Button</"
21173"classname>, for example, does not send mouse-pointer coordinates with its "
21174"<literal>clicked</literal> signal, but you could handle <methodname>Gtk::"
21175"GestureClick::signal_pressed()</methodname> if you needed this information. "
21176"<methodname>Gtk::EventControllerKey::signal_key_pressed()</methodname> is "
21177"often used to handle key-presses."
10227msgstr ""21178msgstr ""
nn21179"Du kan emellanåt finna det användbart att hantera händelse när det är något "
21180"du inte kan åstadkomma med vanliga signaler. <classname>Gtk::Button</"
21181"classname> skickar exempelvis inte muspekarkoordinater med sin "
21182"<literal>clicked</literal>-signal, men du skulle kunna hantera "
21183"<methodname>Gtk::GestureClick::signal_pressed()</methodname> om du behövde "
21184"denna information. <methodname>Gtk::EventControllerKey::"
21185"signal_key_pressed()</methodname> används ofta för att hantera "
21186"tangenttryckningar."
1022821187
10229#. (itstool) path: section/para21188#. (itstool) path: section/para
10230#: C/index-in.docbook:924821189#: C/index-in.docbook:9248
n10231msgid "Some event controller signals behave slightly differently. The value retun21190#, fuzzy
>rned from the signal handler indicates whether it has fully \"handled\" the even 
>t. If the value is <literal>false</literal> then <application>gtkmm</application 
>> will pass the event on to the next signal handler. If the value is <literal>tr 
>ue</literal> then no other signal handlers will need to be called." 
21191msgid ""
21192"Some event controller signals behave slightly differently. The value "
21193"returned from the signal handler indicates whether it has fully \"handled\" "
21194"the event. If the value is <literal>false</literal> then <application>gtkmm</"
21195"application> will pass the event on to the next signal handler. If the value "
21196"is <literal>true</literal> then no other signal handlers will need to be "
21197"called."
10232msgstr ""21198msgstr ""
nn21199"Vissa händelsekontrollsignaler beter sig lite annorlunda. Värdet som "
21200"returneras från signalhanteraren indikerar huruvida den har ”hanterat” "
21201"händelsen fullständigt. Om värdet är <literal>false</literal> så kommer "
21202"<application>gtkmm</application> skicka händelsen vidare till nästa "
21203"signalhanterare. Om värdet är <literal>true</literal> kommer inga andra "
21204"signalhanterare behöva anropas."
1023321205
10234#. (itstool) path: section/para21206#. (itstool) path: section/para
10235#: C/index-in.docbook:925621207#: C/index-in.docbook:9256
n10236msgid "Handling an event doesn't affect the Widget's other signals. If you handln21208#, fuzzy
>e <methodname>Gtk::GestureClick::signal_pressed()</methodname> for <classname>Gt 
>k::Button</classname>, you'll still be able to get the <literal>clicked</literal 
>> signal. They are emitted at (nearly) the same time." 
21209msgid ""
21210"Handling an event doesn't affect the Widget's other signals. If you handle "
21211"<methodname>Gtk::GestureClick::signal_pressed()</methodname> for "
21212"<classname>Gtk::Button</classname>, you'll still be able to get the "
21213"<literal>clicked</literal> signal. They are emitted at (nearly) the same "
21214"time."
10237msgstr ""21215msgstr ""
nn21216"Att hantera en händelse påverkar inte vår Widgets andra signaler. Om du "
21217"hanterar <methodname>Gtk::GestureClick::signal_pressed()</methodname> för "
21218"<classname>Gtk::Button</classname> kommer du fortfarande kunna få "
21219"<literal>clicked</literal>-signalen. De sänds ut (nästan) samtidigt."
1023821220
10239#. (itstool) path: section/programlisting21221#. (itstool) path: section/programlisting
10240#: C/index-in.docbook:926521222#: C/index-in.docbook:9265
n10241#, no-wrapn21223#, fuzzy, no-wrap
10242msgid ""21224msgid ""
10243"<code>void on_button_press(int n_press, double x, double y);\n"21225"<code>void on_button_press(int n_press, double x, double y);\n"
10244"Gtk::Button button(\"label\");\n"21226"Gtk::Button button(\"label\");\n"
10245"auto controller = Gtk::GestureClick::create();\n"21227"auto controller = Gtk::GestureClick::create();\n"
10246"controller-&gt;set_propagation_phase(Gtk::PropagationPhase::CAPTURE);\n"21228"controller-&gt;set_propagation_phase(Gtk::PropagationPhase::CAPTURE);\n"
10247"controller-&gt;signal_pressed().connect(sigc::ptr_fun(&amp;on_button_press));\n21229"controller-&gt;signal_pressed().connect(sigc::ptr_fun(&amp;on_button_press));\n
>">"
10248"button.add_controller(controller);\n"21230"button.add_controller(controller);\n"
10249"</code>"21231"</code>"
10250msgstr ""21232msgstr ""
nn21233"\n"
21234"void on_button_press(int n_press, double x, double y);\n"
21235"Gtk::Button button(\"label\");\n"
21236"auto controller = Gtk::GestureClick::create();\n"
21237"controller-&gt;signal_pressed().connect(sigc::ptr_fun(&amp;on_button_press));\n
 >"
21238"button.add_controller(controller);\n"
1025121239
10252#. (itstool) path: section/para21240#. (itstool) path: section/para
10253#: C/index-in.docbook:927221241#: C/index-in.docbook:9272
n10254msgid "When the mouse is over the button and a mouse button is pressed, <methodnn21242msgid ""
>ame>on_button_press()</methodname> will be called." 
21243"When the mouse is over the button and a mouse button is pressed, "
21244"<methodname>on_button_press()</methodname> will be called."
10255msgstr ""21245msgstr ""
nn21246"När musen är ovanför knappen och en musknapp trycks ned kommer "
21247"<methodname>on_button_press()</methodname> att anropas."
1025621248
10257#. (itstool) path: section/para21249#. (itstool) path: section/para
10258#: C/index-in.docbook:927621250#: C/index-in.docbook:9276
n10259msgid "The call to <methodname>set_propagation_phase()</methodname> is necessaryn21251msgid ""
> in this case because the <classname>GtkButton</classname> C class adds an event 
> controller, handling button clicks in the capture phase. <classname>GtkButton</ 
>classname> claims the event, meaning that the event is not propagated in the bub 
>ble phase, where event controllers handle events by default." 
21252"The call to <methodname>set_propagation_phase()</methodname> is necessary in "
21253"this case because the <classname>GtkButton</classname> C class adds an event "
21254"controller, handling button clicks in the capture phase. "
21255"<classname>GtkButton</classname> claims the event, meaning that the event is "
21256"not propagated in the bubble phase, where event controllers handle events by "
21257"default."
10260msgstr ""21258msgstr ""
1026121259
10262#. (itstool) path: section/title21260#. (itstool) path: section/title
10263#: C/index-in.docbook:928521261#: C/index-in.docbook:9285
10264msgid "Signal Handler sequence"21262msgid "Signal Handler sequence"
n10265msgstr ""n21263msgstr "Signalhanterarsekvens"
1026621264
10267#. (itstool) path: section/para21265#. (itstool) path: section/para
10268#: C/index-in.docbook:928721266#: C/index-in.docbook:9287
n10269msgid "By default, signal handlers that return <type>void</type> are called aften21267#, fuzzy
>r any previously-connected signal handlers. However, this can be a problem with  
>event signals that can stop event propagation by returning <literal>true</litera 
>l>. For instance, the existing signal handlers, or the default signal handler, m 
>ight return <literal>true</literal> to stop other signal handlers from being cal 
>led. To specify that your signal handler should be called before the other signa 
>l handlers, you can specify <literal>false</literal> for the <literal>after</lit 
>eral> parameter. This <methodname>connect()</methodname> parameter is optional,  
>if the signal handler returns <type>void</type>. For instance," 
21268msgid ""
21269"By default, signal handlers that return <type>void</type> are called after "
21270"any previously-connected signal handlers. However, this can be a problem "
21271"with event signals that can stop event propagation by returning "
21272"<literal>true</literal>. For instance, the existing signal handlers, or the "
21273"default signal handler, might return <literal>true</literal> to stop other "
21274"signal handlers from being called. To specify that your signal handler "
21275"should be called before the other signal handlers, you can specify "
21276"<literal>false</literal> for the <literal>after</literal> parameter. This "
21277"<methodname>connect()</methodname> parameter is optional, if the signal "
21278"handler returns <type>void</type>. For instance,"
10270msgstr ""21279msgstr ""
nn21280"Som standard anropas signalhanterare som returnerar <type>void</type> efter "
21281"alla tidigare anslutna signalhanterare. Detta kan dock bli ett problem med "
21282"händelsesignaler som kan stoppa händelsespridning genom att returnera "
21283"<literal>true</literal>. De befintliga signalhanterarna eller "
21284"standardsignalhanteraren kan exempelvis returnera <literal>true</literal> "
21285"för att stoppa andra signalhanterare från att anropas. För att ange att din "
21286"signalhanterare ska anropas innan de andra signalhanterarna kan du ange "
21287"<literal>false</literal> för parametern <literal>after</literal>. Denna "
21288"<methodname>connect()</methodname>-parameter är valfri om signalhanteraren "
21289"returnerar <type>void</type>. Till exempel,"
1027121290
10272#. (itstool) path: section/programlisting21291#. (itstool) path: section/programlisting
10273#: C/index-in.docbook:929721292#: C/index-in.docbook:9297
n10274#, no-wrapn21293#, fuzzy, no-wrap
10275msgid ""21294msgid ""
10276"<code>key_controller-&gt;signal_key_pressed().connect(sigc::ptr_fun(&amp;on_myw21295"<code>key_controller-&gt;signal_key_pressed().connect(sigc::ptr_fun(&amp;on_myw
>indow_key_pressed), false);\n">indow_key_pressed), false);\n"
10277"</code>"21296"</code>"
10278msgstr ""21297msgstr ""
nn21298"\n"
21299"key_controller-&gt;signal_key_pressed().connect(sigc::ptr_fun(&amp;on_mywindow_
 >key_pressed), false);\n"
1027921300
10280#. (itstool) path: section/para21301#. (itstool) path: section/para
10281#: C/index-in.docbook:929921302#: C/index-in.docbook:9299
nn21303#, fuzzy
10282msgid "The event is propagated between widgets in 3 phases. <_:orderedlist-1/>"21304msgid "The event is propagated between widgets in 3 phases. <_:orderedlist-1/>"
n10283msgstr ""n21305msgstr "Händelsen sprids mellan komponenter i tre faser. <_:orderedlist-1/>"
1028421306
10285#. (itstool) path: section/para21307#. (itstool) path: section/para
10286#: C/index-in.docbook:930621308#: C/index-in.docbook:9306
n10287msgid "The <link xlink:href=\"https://docs.gtk.org/gtk4/input-handling.html\">Inn21309#, fuzzy
>put Handling</link> chapter in the GTK documentation describes user input handli 
>ng in more detail." 
21310msgid ""
21311"The <link xlink:href=\"https://docs.gtk.org/gtk4/input-handling.html\">Input "
21312"Handling</link> chapter in the GTK documentation describes user input "
21313"handling in more detail."
10288msgstr ""21314msgstr ""
nn21315"Kapitlet <link xlink:href=\"https://docs.gtk.org/gtk4/input-handling."
21316"html\">Input Handling</link> i GTK-dokumentationen beskriver hantering av "
21317"användarinmatning mer detaljerat."
1028921318
10290#. (itstool) path: section/title21319#. (itstool) path: section/title
10291#: C/index-in.docbook:931521320#: C/index-in.docbook:9315
10292msgid "Exceptions in signal handlers"21321msgid "Exceptions in signal handlers"
n10293msgstr ""n21322msgstr "Undantag i signalhanterare"
1029421323
10295#. (itstool) path: section/para21324#. (itstool) path: section/para
10296#: C/index-in.docbook:931721325#: C/index-in.docbook:9317
n10297msgid "When a program is aborted because of an unhandled <phrase role=\"nowrap\"n21326#, fuzzy
>>C++</phrase> exception, it's sometimes possible to use a debugger to find the l 
>ocation where the exception was thrown. This is more difficult than usual if the 
> exception was thrown from a signal handler." 
21327msgid ""
21328"When a program is aborted because of an unhandled <phrase role=\"nowrap\">C+"
21329"+</phrase> exception, it's sometimes possible to use a debugger to find the "
21330"location where the exception was thrown. This is more difficult than usual "
21331"if the exception was thrown from a signal handler."
10298msgstr ""21332msgstr ""
nn21333"När ett program avbryts på grund av ett ohanterat C++-undantag är det ibland "
21334"möjligt att använda en felsökare för att hitta platsen där undantaget "
21335"kastades. Detta är svårare än vanligt om undantaget kastades från en "
21336"signalhanterare."
1029921337
10300#. (itstool) path: section/para21338#. (itstool) path: section/para
10301#: C/index-in.docbook:932221339#: C/index-in.docbook:9322
n10302msgid "This section describes primarily what you can expect on a Linux system, wn21340msgid ""
>hen you use <link xlink:href=\"http://www.gnu.org/software/gdb/\">the gdb debugg 
>er</link>." 
21341"This section describes primarily what you can expect on a Linux system, when "
21342"you use <link xlink:href=\"http://www.gnu.org/software/gdb/\">the gdb "
21343"debugger</link>."
10303msgstr ""21344msgstr ""
nn21345"Detta avsnitt beskriver främst vad du kan förvänta dig på ett Linux-system "
21346"när du använder <link xlink:href=\"http://www.gnu.org/software/gdb/"
21347"\">felsökaren gdb</link>."
1030421348
10305#. (itstool) path: section/para21349#. (itstool) path: section/para
10306#: C/index-in.docbook:932621350#: C/index-in.docbook:9326
nn21351#, fuzzy
21352msgid ""
10307msgid "First, let's look at a simple example where an exception is thrown from a21353"First, let's look at a simple example where an exception is thrown from a "
> normal function (no signal handler)." 
21354"normal function (no signal handler)."
10308msgstr ""21355msgstr ""
nn21356"Låt oss först titta på ett enkelt exempel där ett undantag kastas från en "
21357"normal funktion (ingen signalhanterare)."
1030921358
10310#. (itstool) path: section/programlisting21359#. (itstool) path: section/programlisting
10311#: C/index-in.docbook:933021360#: C/index-in.docbook:9330
n10312#, no-wrapn21361#, fuzzy, no-wrap
10313msgid ""21362msgid ""
10314"<code>// without_signal.cc\n"21363"<code>// without_signal.cc\n"
10315"#include &lt;gtkmm.h&gt;\n"21364"#include &lt;gtkmm.h&gt;\n"
10316"\n"21365"\n"
10317"bool throwSomething()\n"21366"bool throwSomething()\n"
10326"  auto app = Gtk::Application::create(\"org.gtkmm.without_signal\");\n"21375"  auto app = Gtk::Application::create(\"org.gtkmm.without_signal\");\n"
10327"  return app-&gt;run();\n"21376"  return app-&gt;run();\n"
10328"}\n"21377"}\n"
10329"</code>"21378"</code>"
10330msgstr ""21379msgstr ""
nn21380"\n"
21381"// without_signal.cc\n"
21382"#include &lt;gtkmm.h&gt;\n"
21383"\n"
21384"bool throwSomething()\n"
21385"{\n"
21386"  throw \"Something\";\n"
21387"  return true;\n"
21388"}\n"
21389"\n"
21390"int main(int argc, char** argv)\n"
21391"{\n"
21392"  throwSomething();\n"
21393"  auto app = Gtk::Application::create(\"org.gtkmm.without_signal\");\n"
21394"  return app-&gt;run();\n"
21395"}\n"
1033121396
10332#. (itstool) path: section/para21397#. (itstool) path: section/para
10333#: C/index-in.docbook:934621398#: C/index-in.docbook:9346
n10334msgid "Here is an excerpt from a <application>gdb</application> session. Only thn21399#, fuzzy
>e most interesting parts of the output are shown." 
21400msgid ""
21401"Here is an excerpt from a <application>gdb</application> session. Only the "
21402"most interesting parts of the output are shown."
10335msgstr ""21403msgstr ""
nn21404"Här är ett utdrag från en <application>gdb</application>-session. Endast de "
21405"mest intressanta delarna av utmatningen visas. <_:programlisting-1/> Du kan "
21406"se att undantaget kastades från <filename>without_signal.cc</filename>, rad "
21407"6 (<code>throw \"Something\";</code>)."
1033621408
10337#. (itstool) path: section/programlisting21409#. (itstool) path: section/programlisting
10338#: C/index-in.docbook:935021410#: C/index-in.docbook:9350
n10339#, no-wrapn21411#, fuzzy, no-wrap
10340msgid ""21412msgid ""
10341"<code>&gt; gdb without_signal\n"21413"<code>&gt; gdb without_signal\n"
10342"(gdb) run\n"21414"(gdb) run\n"
10343"terminate called after throwing an instance of 'char const*'\n"21415"terminate called after throwing an instance of 'char const*'\n"
10344"\n"21416"\n"
10346"(gdb) backtrace\n"21418"(gdb) backtrace\n"
10347"#7  0x08048864 in throwSomething () at without_signal.cc:6\n"21419"#7  0x08048864 in throwSomething () at without_signal.cc:6\n"
10348"#8  0x0804887d in main (argc=1, argv=0xbfffecd4) at without_signal.cc:12\n"21420"#8  0x0804887d in main (argc=1, argv=0xbfffecd4) at without_signal.cc:12\n"
10349"</code>"21421"</code>"
10350msgstr ""21422msgstr ""
nn21423"\n"
21424"&gt; gdb without_signal\n"
21425"(gdb) run\n"
21426"terminate called after throwing an instance of 'char const*'\n"
21427"\n"
21428"Program received signal SIGABRT, Aborted.\n"
21429"(gdb) backtrace\n"
21430"#7  0x08048864 in throwSomething () at without_signal.cc:6\n"
21431"#8  0x0804887d in main (argc=1, argv=0xbfffecd4) at without_signal.cc:12\n"
1035121432
10352#. (itstool) path: section/para21433#. (itstool) path: section/para
10353#: C/index-in.docbook:935921434#: C/index-in.docbook:9359
n10354msgid "You can see that the exception was thrown from <filename>without_signal.cn21435#, fuzzy
>c</filename>, line 6 (<code>throw \"Something\";</code>)." 
21436msgid ""
21437"You can see that the exception was thrown from <filename>without_signal.cc</"
21438"filename>, line 6 (<code>throw \"Something\";</code>)."
10355msgstr ""21439msgstr ""
nn21440"Här är ett utdrag från en <application>gdb</application>-session. Endast de "
21441"mest intressanta delarna av utmatningen visas. <_:programlisting-1/> Du kan "
21442"se att undantaget kastades från <filename>without_signal.cc</filename>, rad "
21443"6 (<code>throw \"Something\";</code>)."
1035621444
10357#. (itstool) path: section/para21445#. (itstool) path: section/para
10358#: C/index-in.docbook:936221446#: C/index-in.docbook:9362
nn21447#, fuzzy
21448msgid ""
10359msgid "Now let's see what happens when an exception is thrown from a signal hand21449"Now let's see what happens when an exception is thrown from a signal "
>ler. Here's the source code." 
21450"handler. Here's the source code."
10360msgstr ""21451msgstr ""
nn21452"Låt oss nu se vad som händer när ett undantag kastas från en "
21453"signalhanterare. Här är källkoden."
1036121454
10362#. (itstool) path: section/programlisting21455#. (itstool) path: section/programlisting
10363#: C/index-in.docbook:936621456#: C/index-in.docbook:9366
n10364#, no-wrapn21457#, fuzzy, no-wrap
10365msgid ""21458msgid ""
10366"<code>// with_signal.cc\n"21459"<code>// with_signal.cc\n"
10367"#include &lt;gtkmm.h&gt;\n"21460"#include &lt;gtkmm.h&gt;\n"
10368"\n"21461"\n"
10369"bool throwSomething()\n"21462"bool throwSomething()\n"
10379"  app-&gt;hold();\n"21472"  app-&gt;hold();\n"
10380"  return app-&gt;run();\n"21473"  return app-&gt;run();\n"
10381"}\n"21474"}\n"
10382"</code>"21475"</code>"
10383msgstr ""21476msgstr ""
nn21477"\n"
21478"// with_signal.cc\n"
21479"#include &lt;gtkmm.h&gt;\n"
21480"\n"
21481"bool throwSomething()\n"
21482"{\n"
21483"  throw \"Something\";\n"
21484"  return true;\n"
21485"}\n"
21486"\n"
21487"int main(int argc, char** argv)\n"
21488"{\n"
21489"  Glib::signal_timeout().connect(sigc::ptr_fun(throwSomething), 500);\n"
21490"  auto app = Gtk::Application::create(\"org.gtkmm.with_signal\");\n"
21491"  app-&gt;hold();\n"
21492"  return app-&gt;run();\n"
21493"}\n"
1038421494
10385#. (itstool) path: section/para21495#. (itstool) path: section/para
10386#: C/index-in.docbook:938321496#: C/index-in.docbook:9383
nn21497#, fuzzy
21498#| msgid "Deprecations in <application>gtkmm</application> 4.10"
10387msgid "And here's an excerpt from a <application>gdb</application> session."21499msgid "And here's an excerpt from a <application>gdb</application> session."
n10388msgstr ""n21500msgstr "Föråldringar i <application>gtkmm</application> 4.10"
1038921501
10390#. (itstool) path: section/programlisting21502#. (itstool) path: section/programlisting
10391#: C/index-in.docbook:938621503#: C/index-in.docbook:9386
n10392#, no-wrapn21504#, fuzzy, no-wrap
10393msgid ""21505msgid ""
10394"<code>&gt; gdb with_signal\n"21506"<code>&gt; gdb with_signal\n"
10395"(gdb) run\n"21507"(gdb) run\n"
10396"(with_signal:2703): glibmm-ERROR **:\n"21508"(with_signal:2703): glibmm-ERROR **:\n"
10397"unhandled exception (type unknown) in signal handler\n"21509"unhandled exception (type unknown) in signal handler\n"
10403"#4  0x0063d370 in glibmm_source_callback (data=0x804d620) at main.cc:212\n"21515"#4  0x0063d370 in glibmm_source_callback (data=0x804d620) at main.cc:212\n"
10404"#13 0x002e1b31 in Gtk::Application::run (this=0x804f300) at application.cc:178\21516"#13 0x002e1b31 in Gtk::Application::run (this=0x804f300) at application.cc:178\
>n">n"
10405"#14 0x08048ccc in main (argc=1, argv=0xbfffecd4) at with_signal.cc:16\n"21517"#14 0x08048ccc in main (argc=1, argv=0xbfffecd4) at with_signal.cc:16\n"
10406"</code>"21518"</code>"
10407msgstr ""21519msgstr ""
nn21520"\n"
21521"&gt; gdb with_signal\n"
21522"(gdb) run\n"
21523"(with_signal:2703): glibmm-ERROR **:\n"
21524"unhandled exception (type unknown) in signal handler\n"
21525"\n"
21526"Program received signal SIGTRAP, Trace/breakpoint trap.\n"
21527"(gdb) backtrace\n"
21528"#2  0x0063c6ab in glibmm_unexpected_exception () at exceptionhandler.cc:77\n"
21529"#3  Glib::exception_handlers_invoke () at exceptionhandler.cc:150\n"
21530"#4  0x0063d370 in glibmm_source_callback (data=0x804d620) at main.cc:212\n"
21531"#13 0x002e1b31 in Gtk::Application::run (this=0x804f300) at application.cc:178\
 >n"
21532"#14 0x08048ccc in main (argc=1, argv=0xbfffecd4) at with_signal.cc:16\n"
1040821533
10409#. (itstool) path: section/para21534#. (itstool) path: section/para
10410#: C/index-in.docbook:939921535#: C/index-in.docbook:9399
n10411msgid "The exception is caught in <application>glibmm</application>, and the pron21536#, fuzzy
>gram ends with a call to <function>g_error()</function>. Other exceptions may re 
>sult in different behavior, but in any case the exception from a signal handler  
>is caught in <application>glibmm</application> or <application>gtkmm</applicatio 
>n>, and <application>gdb</application> can't see where it was thrown." 
21537msgid ""
21538"The exception is caught in <application>glibmm</application>, and the "
21539"program ends with a call to <function>g_error()</function>. Other exceptions "
21540"may result in different behavior, but in any case the exception from a "
21541"signal handler is caught in <application>glibmm</application> or "
21542"<application>gtkmm</application>, and <application>gdb</application> can't "
21543"see where it was thrown."
10412msgstr ""21544msgstr ""
nn21545"Och här kommer ett utdrag från en <application>gdb</application>-session. <_:"
21546"programlisting-1/> Undantaget fångas i <application>glibmm</application> och "
21547"programmet avslutas med ett anrop till <function>g_error()</function>. Andra "
21548"undantag kan resultera i annat beteenden, men i vilket fall fångas "
21549"undantaget från en signalhanterare i <application>glibmm</application> eller "
21550"<application>gtkmm</application>, och <application>gdb</application> kan "
21551"inte se var det kastades."
1041321552
10414#. (itstool) path: section/para21553#. (itstool) path: section/para
10415#: C/index-in.docbook:940521554#: C/index-in.docbook:9405
n10416msgid "To see where the exception is thrown, you can use the <application>gdb</an21555#, fuzzy
>pplication> command <userinput>catch throw</userinput>." 
21556msgid ""
21557"To see where the exception is thrown, you can use the <application>gdb</"
21558"application> command <userinput>catch throw</userinput>."
10417msgstr ""21559msgstr ""
nn21560"För att se var undantaget kastas kan du använda <application>gdb</"
21561"application>-kommandot <userinput>catch throw</userinput>."
1041821562
10419#. (itstool) path: section/programlisting21563#. (itstool) path: section/programlisting
10420#: C/index-in.docbook:940921564#: C/index-in.docbook:9409
n10421#, no-wrapn21565#, fuzzy, no-wrap
10422msgid ""21566msgid ""
10423"<code>&gt; gdb with_signal\n"21567"<code>&gt; gdb with_signal\n"
10424"(gdb) catch throw\n"21568"(gdb) catch throw\n"
10425"Catchpoint 1 (throw)\n"21569"Catchpoint 1 (throw)\n"
10426"(gdb) run\n"21570"(gdb) run\n"
10434"unhandled exception (type unknown) in signal handler\n"21578"unhandled exception (type unknown) in signal handler\n"
10435"\n"21579"\n"
10436"Program received signal SIGTRAP, Trace/breakpoint trap.\n"21580"Program received signal SIGTRAP, Trace/breakpoint trap.\n"
10437"</code>"21581"</code>"
10438msgstr ""21582msgstr ""
nn21583"\n"
21584"&gt; gdb with_signal\n"
21585"(gdb) catch throw\n"
21586"Catchpoint 1 (throw)\n"
21587"(gdb) run\n"
21588"Catchpoint 1 (exception thrown), 0x00714ff0 in __cxa_throw ()\n"
21589"(gdb) backtrace\n"
21590"#0  0x00714ff0 in __cxa_throw () from /usr/lib/i386-linux-gnu/libstdc++.so.6\n"
21591"#1  0x08048bd4 in throwSomething () at with_signal.cc:6\n"
21592"(gdb) continue\n"
21593"Continuing.\n"
21594"(with_signal:2375): glibmm-ERROR **\n"
21595"unhandled exception (type unknown) in signal handler\n"
21596"\n"
21597"Program received signal SIGTRAP, Trace/breakpoint trap.\n"
1043921598
10440#. (itstool) path: section/para21599#. (itstool) path: section/para
10441#: C/index-in.docbook:942421600#: C/index-in.docbook:9424
n10442msgid "If there are many caught exceptions before the interesting uncaught one, n21601#, fuzzy
>this method can be tedious. It can be automated with the following <application> 
>gdb</application> commands." 
21602msgid ""
21603"If there are many caught exceptions before the interesting uncaught one, "
21604"this method can be tedious. It can be automated with the following "
21605"<application>gdb</application> commands."
10443msgstr ""21606msgstr ""
nn21607"Om det finns många fångade undantag innan det intressanta ofångade så kan "
21608"denna metod vara långrandig. Den kan automatiseras med följande "
21609"<application>gdb</application>-kommandon. <_:programlisting-1/> Dessa "
21610"kommandon kommer skriva ut ett bakåtspår från varje <code>throw</code> och "
21611"fortsätta. Bakåtspåret från den sista (eller möjligen den näst sista) "
21612"<code>throw</code> innan programmet stoppar är den som är intressant."
1044421613
10445#. (itstool) path: section/programlisting21614#. (itstool) path: section/programlisting
10446#: C/index-in.docbook:942921615#: C/index-in.docbook:9429
n10447#, no-wrapn21616#, fuzzy, no-wrap
10448msgid ""21617msgid ""
10449"<code>(gdb) catch throw\n"21618"<code>(gdb) catch throw\n"
10450"(gdb) commands\n"21619"(gdb) commands\n"
10451"(gdb)   backtrace\n"21620"(gdb)   backtrace\n"
10452"(gdb)   continue\n"21621"(gdb)   continue\n"
10453"(gdb)   end\n"21622"(gdb)   end\n"
10454"(gdb) set pagination off\n"21623"(gdb) set pagination off\n"
10455"(gdb) run\n"21624"(gdb) run\n"
10456"</code>"21625"</code>"
10457msgstr ""21626msgstr ""
nn21627"\n"
21628"(gdb) catch throw\n"
21629"(gdb) commands\n"
21630"(gdb)   backtrace\n"
21631"(gdb)   continue\n"
21632"(gdb)   end\n"
21633"(gdb) set pagination off\n"
21634"(gdb) run\n"
1045821635
10459#. (itstool) path: section/para21636#. (itstool) path: section/para
10460#: C/index-in.docbook:943721637#: C/index-in.docbook:9437
n10461msgid "These commands will print a backtrace from each <code>throw</code> and con21638#, fuzzy
>ntinue. The backtrace from the last (or possibly the last but one) <code>throw</ 
>code> before the program stops, is the interesting one." 
21639msgid ""
21640"These commands will print a backtrace from each <code>throw</code> and "
21641"continue. The backtrace from the last (or possibly the last but one) "
21642"<code>throw</code> before the program stops, is the interesting one."
10462msgstr ""21643msgstr ""
nn21644"Om det finns många fångade undantag innan det intressanta ofångade så kan "
21645"denna metod vara långrandig. Den kan automatiseras med följande "
21646"<application>gdb</application>-kommandon. <_:programlisting-1/> Dessa "
21647"kommandon kommer skriva ut ett bakåtspår från varje <code>throw</code> och "
21648"fortsätta. Bakåtspåret från den sista (eller möjligen den näst sista) "
21649"<code>throw</code> innan programmet stoppar är den som är intressant."
1046321650
10464#. (itstool) path: appendix/title21651#. (itstool) path: appendix/title
10465#: C/index-in.docbook:944621652#: C/index-in.docbook:9446
10466msgid "Creating your own signals"21653msgid "Creating your own signals"
n10467msgstr ""n21654msgstr "Skapa dina egna signaler"
1046821655
10469#. (itstool) path: appendix/para21656#. (itstool) path: appendix/para
10470#: C/index-in.docbook:944821657#: C/index-in.docbook:9448
n10471msgid "Now that you've seen signals and signal handlers in <application>gtkmm</an21658msgid ""
>pplication>, you might like to use the same technique to allow interaction betwe 
>en your own classes. That's actually very simple by using the <application>libsi 
>gc++</application> library directly." 
21659"Now that you've seen signals and signal handlers in <application>gtkmm</"
21660"application>, you might like to use the same technique to allow interaction "
21661"between your own classes. That's actually very simple by using the "
21662"<application>libsigc++</application> library directly."
10472msgstr ""21663msgstr ""
nn21664"Nu då du sett signaler och signalhanterare i <application>gtkmm</"
21665"application> kanske du vill använda samma teknik för att tillåta interaktion "
21666"mellan dina egna klasser. Det är faktiskt väldigt enkelt genom att direkt "
21667"använda <application>libsigc++</application>-biblioteket."
1047321668
10474#. (itstool) path: appendix/para21669#. (itstool) path: appendix/para
10475#: C/index-in.docbook:945421670#: C/index-in.docbook:9454
n10476msgid "This isn't purely a <application>gtkmm</application> or GUI issue. <applin21671#, fuzzy
>cation>gtkmm</application> uses <application>libsigc++</application> to implemen 
>t its proxy wrappers for the <application>GTK</application> signal system, but f 
>or new, non-GTK signals, you can create pure <phrase role=\"nowrap\">C++</phrase 
>> signals, using the <classname>sigc::signal&lt;&gt;</classname> template." 
21672msgid ""
21673"This isn't purely a <application>gtkmm</application> or GUI issue. "
21674"<application>gtkmm</application> uses <application>libsigc++</application> "
21675"to implement its proxy wrappers for the <application>GTK</application> "
21676"signal system, but for new, non-GTK signals, you can create pure <phrase "
21677"role=\"nowrap\">C++</phrase> signals, using the <classname>sigc::signal&lt;"
21678"&gt;</classname> template."
10477msgstr ""21679msgstr ""
nn21680"Detta är inte ett rent <application>gtkmm</application>- eller GUI-problem. "
21681"<application>gtkmm</application> använder <application>libsigc++</"
21682"application> för att implementera sina proxyomslag för <application>GTK</"
21683"application>-signalsystemet, men för nya, icke-GTK-signaler kan du skapa "
21684"rena C++-signaler med mallen <classname>sigc::signal&lt;&gt;</classname>."
1047821685
10479#. (itstool) path: appendix/para21686#. (itstool) path: appendix/para
10480#: C/index-in.docbook:946121687#: C/index-in.docbook:9461
n10481msgid "For instance, to create a signal that sends 2 parameters, a <type>bool</tn21688msgid ""
>ype> and an <type>int</type>, just declare a <classname>sigc::signal</classname> 
>, like so:" 
21689"For instance, to create a signal that sends 2 parameters, a <type>bool</"
21690"type> and an <type>int</type>, just declare a <classname>sigc::signal</"
21691"classname>, like so:"
10482msgstr ""21692msgstr ""
nn21693"För att exempelvis skapa en signal som skickar 2 parametrar, en <type>bool</"
21694"type> och en <type>int</type>, deklarerar du bara en <classname>sigc::"
21695"signal</classname>, så här:"
1048321696
10484#. (itstool) path: appendix/programlisting21697#. (itstool) path: appendix/programlisting
10485#: C/index-in.docbook:946621698#: C/index-in.docbook:9466
n10486#, no-wrapn21699#, fuzzy, no-wrap
10487msgid ""21700msgid ""
10488"<code>sigc::signal&lt;void(bool, int)&gt; signal_something;\n"21701"<code>sigc::signal&lt;void(bool, int)&gt; signal_something;\n"
10489"</code>"21702"</code>"
10490msgstr ""21703msgstr ""
nn21704"\n"
21705"sigc::signal&lt;void(bool, int)&gt; signal_something;\n"
1049121706
10492#. (itstool) path: appendix/para21707#. (itstool) path: appendix/para
10493#: C/index-in.docbook:946821708#: C/index-in.docbook:9468
n10494msgid "You could just declare that signal as a public member variable, but some n21709#, fuzzy
>people find that distasteful and prefer to make it available via an accessor met 
>hod, like so:" 
21710msgid ""
21711"You could just declare that signal as a public member variable, but some "
21712"people find that distasteful and prefer to make it available via an accessor "
21713"method, like so:"
10495msgstr ""21714msgstr ""
nn21715"Du skulle kunna helt enkelt deklarera den signalen som en offentlig "
21716"medlemsvariabel, men vissa finner det oaptitligt och föredrar att göra den "
21717"tillgänglig med en åtkomstmetod, så här:"
1049621718
10497#. (itstool) path: appendix/programlisting21719#. (itstool) path: appendix/programlisting
10498#: C/index-in.docbook:947321720#: C/index-in.docbook:9473
n10499#, no-wrapn21721#, fuzzy, no-wrap
10500msgid ""21722msgid ""
10501"<code>class Server\n"21723"<code>class Server\n"
10502"{\n"21724"{\n"
10503"public:\n"21725"public:\n"
10504"  //signal accessor:\n"21726"  //signal accessor:\n"
10513"{\n"21735"{\n"
10514"  return m_signal_something;\n"21736"  return m_signal_something;\n"
10515"}\n"21737"}\n"
10516"</code>"21738"</code>"
10517msgstr ""21739msgstr ""
nn21740"\n"
21741"class Server\n"
21742"{\n"
21743"public:\n"
21744"  //signal accessor:\n"
21745"  using type_signal_something = sigc::signal&lt;void(bool, int)&gt;;\n"
21746"  type_signal_something signal_something();\n"
21747"\n"
21748"protected:\n"
21749"  type_signal_something m_signal_something;\n"
21750"};\n"
21751"\n"
21752"Server::type_signal_something Server::signal_something()\n"
21753"{\n"
21754"  return m_signal_something;\n"
21755"}\n"
1051821756
10519#. (itstool) path: appendix/para21757#. (itstool) path: appendix/para
10520#: C/index-in.docbook:949021758#: C/index-in.docbook:9490
n10521msgid "You can then connect to the signal using the same syntax used when connecn21759msgid ""
>ting to <application>gtkmm</application> signals. For instance," 
21760"You can then connect to the signal using the same syntax used when "
21761"connecting to <application>gtkmm</application> signals. For instance,"
10522msgstr ""21762msgstr ""
nn21763"Du kan sedan ansluta till signalen med samma syntax som du använder när du "
21764"ansluter till <application>gtkmm</application>-signaler. Till exempel,"
1052321765
10524#. (itstool) path: appendix/programlisting21766#. (itstool) path: appendix/programlisting
10525#: C/index-in.docbook:949421767#: C/index-in.docbook:9494
n10526#, no-wrapn21768#, fuzzy, no-wrap
10527msgid ""21769msgid ""
10528"<code>server.signal_something().connect(\n"21770"<code>server.signal_something().connect(\n"
10529"  sigc::mem_fun(client, &amp;Client::on_server_something) );\n"21771"  sigc::mem_fun(client, &amp;Client::on_server_something) );\n"
10530"</code>"21772"</code>"
10531msgstr ""21773msgstr ""
nn21774"\n"
21775"server.signal_something().connect(\n"
21776"  sigc::mem_fun(client, &amp;Client::on_server_something) );\n"
1053221777
10533#. (itstool) path: section/para21778#. (itstool) path: section/para
10534#: C/index-in.docbook:950121779#: C/index-in.docbook:9501
10535msgid "This is a full working example that defines and uses custom signals."21780msgid "This is a full working example that defines and uses custom signals."
10536msgstr ""21781msgstr ""
nn21782"Detta är ett fullt fungerande exempel som definierar och använder anpassade "
21783"signaler."
1053721784
10538#. (itstool) path: section/para21785#. (itstool) path: section/para
10539#: C/index-in.docbook:950521786#: C/index-in.docbook:9505
n10540msgid "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tren21787msgid ""
>e/master/examples/book/signals/custom/\">Source Code</link>" 
21788"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
21789"master/examples/book/signals/custom/\">Source Code</link>"
10541msgstr ""21790msgstr ""
nn21791"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
21792"master/examples/book/signals/custom/\">Källkod</link>"
1054221793
10543#. (itstool) path: appendix/title21794#. (itstool) path: appendix/title
10544#: C/index-in.docbook:951321795#: C/index-in.docbook:9513
10545msgid "Comparison with other signalling systems"21796msgid "Comparison with other signalling systems"
n10546msgstr ""n21797msgstr "Jämförelse med andra signalsystem"
1054721798
10548#. (itstool) path: appendix/para21799#. (itstool) path: appendix/para
10549#: C/index-in.docbook:951521800#: C/index-in.docbook:9515
n10550msgid "(An aside: <application>GTK</application> calls this scheme \"signalling\n21801#, fuzzy
>"; the sharp-eyed reader with GUI toolkit experience will note that this same de 
>sign is often seen under the name of \"broadcaster-listener\" (e.g., in Metrower 
>ks' PowerPlant framework for the Macintosh). It works in much the same way: one  
>sets up <literal>broadcasters</literal>, and then connects <literal>listeners</l 
>iteral> to them; the broadcaster keeps a list of the objects listening to it, an 
>d when someone gives the broadcaster a message, it calls all of its objects in i 
>ts list with the message. In <application>gtkmm</application>, signal objects pl 
>ay the role of broadcasters, and slots play the role of listeners - sort of. Mor 
>e on this later.)" 
21802msgid ""
21803"(An aside: <application>GTK</application> calls this scheme \"signalling\"; "
21804"the sharp-eyed reader with GUI toolkit experience will note that this same "
21805"design is often seen under the name of \"broadcaster-listener\" (e.g., in "
21806"Metrowerks' PowerPlant framework for the Macintosh). It works in much the "
21807"same way: one sets up <literal>broadcasters</literal>, and then connects "
21808"<literal>listeners</literal> to them; the broadcaster keeps a list of the "
21809"objects listening to it, and when someone gives the broadcaster a message, "
21810"it calls all of its objects in its list with the message. In "
21811"<application>gtkmm</application>, signal objects play the role of "
21812"broadcasters, and slots play the role of listeners - sort of. More on this "
21813"later.)"
10551msgstr ""21814msgstr ""
nn21815"(Ett bispår: <application>GTK</application> kallar detta schema "
21816"”signalling”; den skarpögde läsaren med erfarenhet från GUI-verktygslådor "
21817"kommer se att denna design ofta ses under namnet ”broadcaster-listener” (t."
21818"ex. i Metrowerks PowerPlant-ramverk för Macintosh). Det fungerar i stort på "
21819"samma sätt: man konfigurerar <literal>broadcasters</literal>, och ansluter "
21820"sedan <literal>listeners</literal> till dem; sändaren behåller en lista över "
21821"objekten som lyssnar på den, och när någon ger sändaren ett meddelande "
21822"anropar den alla sina objekt i sin lista med meddelandet. I "
21823"<application>gtkmm</application> spelar signalobjekt rollen för sändare, och "
21824"fack spelar rollen som lyssnare - på sätt och vis. Mer om detta senare.)"
1055221825
10553#. (itstool) path: appendix/para21826#. (itstool) path: appendix/para
10554#: C/index-in.docbook:952921827#: C/index-in.docbook:9529
n10555msgid "<application>gtkmm</application> signal handlers are strongly-typed, whern21828#, fuzzy
>eas <application>GTK</application> C code allows you to connect a callback with  
>the wrong number and type of arguments, leading to a segfault at runtime. And, u 
>nlike <application>Qt</application>, <application>gtkmm</application> achieves t 
>his without modifying the <phrase role=\"nowrap\">C++</phrase> language." 
21829msgid ""
21830"<application>gtkmm</application> signal handlers are strongly-typed, whereas "
21831"<application>GTK</application> C code allows you to connect a callback with "
21832"the wrong number and type of arguments, leading to a segfault at runtime. "
21833"And, unlike <application>Qt</application>, <application>gtkmm</application> "
21834"achieves this without modifying the <phrase role=\"nowrap\">C++</phrase> "
21835"language."
10556msgstr ""21836msgstr ""
nn21837"<application>gtkmm</application>-signalhanterare är starkt typade, medan "
21838"<application>GTK</application>:s C-kod låter dig ansluta ett återanrop med "
21839"fel antal och typ av argument, vilket leder till ett segmenteringsfel vid "
21840"körning. Till skillnad från <application>Qt</application> åstadkommer även "
21841"<application>gtkmm</application> detta utan att C++-språket."
1055721842
10558#. (itstool) path: appendix/para21843#. (itstool) path: appendix/para
10559#: C/index-in.docbook:953521844#: C/index-in.docbook:9535
n10560msgid "Re. Overriding signal handlers: You can do this in the straight-C world on21845#, fuzzy
>f GTK too; that's what GTK's object system is for. But in GTK, you have to go th 
>rough some complicated procedures to get object-oriented features like inheritan 
>ce and overloading. In <phrase role=\"nowrap\">C++</phrase>, it's simple, since  
>those features are supported in the language itself; you can let the compiler do 
> the dirty work." 
21846msgid ""
21847"Re. Overriding signal handlers: You can do this in the straight-C world of "
21848"GTK too; that's what GTK's object system is for. But in GTK, you have to go "
21849"through some complicated procedures to get object-oriented features like "
21850"inheritance and overloading. In <phrase role=\"nowrap\">C++</phrase>, it's "
21851"simple, since those features are supported in the language itself; you can "
21852"let the compiler do the dirty work."
10561msgstr ""21853msgstr ""
nn21854"Angående åsidosättning av signalhanterare: Du kan göra detta även i GTK:s "
21855"rena C-värld; det är vad GTK:s objektsystem är till för. Men i GTK måste du "
21856"gå igenom några komplicerade procedurer frå att få objektorienterade "
21857"funktioner som arv och överlagring. I C++ är det enkelt, då dessa funktioner "
21858"stöds i själva språket, du kan låta kompilatorn göra det tunga arbetet."
1056221859
10563#. (itstool) path: appendix/para21860#. (itstool) path: appendix/para
10564#: C/index-in.docbook:954321861#: C/index-in.docbook:9543
n10565msgid "This is one of the places where the beauty of <phrase role=\"nowrap\">C++n21862#, fuzzy
></phrase> really comes out. One wouldn't think of subclassing a GTK widget simpl 
>y to override its action method; it's just too much trouble. In GTK, you almost  
>always use signals to get things done, unless you're writing a new widget. But b 
>ecause overriding methods is so easy in <phrase role=\"nowrap\">C++</phrase>, it 
>'s entirely practical - and sensible - to subclass a button for that purpose." 
21863msgid ""
21864"This is one of the places where the beauty of <phrase role=\"nowrap\">C++</"
21865"phrase> really comes out. One wouldn't think of subclassing a GTK widget "
21866"simply to override its action method; it's just too much trouble. In GTK, "
21867"you almost always use signals to get things done, unless you're writing a "
21868"new widget. But because overriding methods is so easy in <phrase "
21869"role=\"nowrap\">C++</phrase>, it's entirely practical - and sensible - to "
21870"subclass a button for that purpose."
10566msgstr ""21871msgstr ""
nn21872"Det här är en av platserna där skönheten i C++ verkligen visar sig. Ingen "
21873"skulle tänka sig att underklassa en GTK-komponent för att helt enkelt "
21874"åsidosätta dess åtgärdsmetod; det är för mycket jobb. I GTK skulle du nästan "
21875"alltid använda signaler för att få saker gjorda om du inte skriver en ny "
21876"komponent. Men eftersom det är så lätt att åsidosätta metoder i C++ så är "
21877"det fullt praktiskt - och sansat - att underklassa en knapp för det syftet."
1056721878
10568#. (itstool) path: appendix/title21879#. (itstool) path: appendix/title
10569#: C/index-in.docbook:955421880#: C/index-in.docbook:9554
10570msgid "<application>gtkmm</application> and Win32"21881msgid "<application>gtkmm</application> and Win32"
n10571msgstr ""n21882msgstr "<application>gtkmm</application> och Win32"
1057221883
10573#. (itstool) path: appendix/para21884#. (itstool) path: appendix/para
10574#: C/index-in.docbook:955521885#: C/index-in.docbook:9555
n10575msgid "One of the major advantages of <application>gtkmm</application> is that in21886#, fuzzy
>t is crossplatform. <application>gtkmm</application> programs written on other p 
>latforms such as GNU/Linux can generally be transferred to Windows (and vice ver 
>sa) with few modifications to the source." 
21887msgid ""
21888"One of the major advantages of <application>gtkmm</application> is that it "
21889"is crossplatform. <application>gtkmm</application> programs written on other "
21890"platforms such as GNU/Linux can generally be transferred to Windows (and "
21891"vice versa) with few modifications to the source."
10576msgstr ""21892msgstr ""
nn21893"En av de stora fördelarna med <application>gtkmm</application> är att det är "
21894"multiplattform. <application>gtkmm</application>-program som skrivits på "
21895"andra plattformar som GNU/Linux kan allmänt överföras till Windows (och "
21896"tvärtom) med få ändringar i källkoden."
1057721897
10578#. (itstool) path: appendix/para21898#. (itstool) path: appendix/para
10579#: C/index-in.docbook:956021899#: C/index-in.docbook:9560
n10580msgid "<application>gtkmm</application> currently works with the <link xlink:hren21900#, fuzzy
>f=\"http://mingw.org/\">MinGW/GCC compiler</link> with a compiler version that s 
>upports <phrase role=\"nowrap\">C++17</phrase>, such as gcc 7 or later. It also  
>works with Microsoft Visual <phrase role=\"nowrap\">C++</phrase> 2017 15.7.x or  
>later (including the freely available express/community editions) on the Windows 
> platform. There is an <link xlink:href=\"https://download.gnome.org/binaries/wi 
>n32/gtkmm\">installer</link> available for <application>gtkmm</application> on M 
>icrosoft Windows, but as of this writing (December 2024) it only contains an ins 
>taller for gtkmm2. Please be aware that although normally it is fine to mix buil 
>ds done with Visual Studio 2017 and 2019, please do not do so when building <app 
>lication>gtkmm</application> with its -mm dependencies." 
21901msgid ""
21902"<application>gtkmm</application> currently works with the <link xlink:"
21903"href=\"http://mingw.org/\">MinGW/GCC compiler</link> with a compiler version "
21904"that supports <phrase role=\"nowrap\">C++17</phrase>, such as gcc 7 or "
21905"later. It also works with Microsoft Visual <phrase role=\"nowrap\">C++</"
21906"phrase> 2017 15.7.x or later (including the freely available express/"
21907"community editions) on the Windows platform. There is an <link xlink:"
21908"href=\"https://download.gnome.org/binaries/win32/gtkmm\">installer</link> "
21909"available for <application>gtkmm</application> on Microsoft Windows, but as "
21910"of this writing (December 2024) it only contains an installer for gtkmm2. "
21911"Please be aware that although normally it is fine to mix builds done with "
21912"Visual Studio 2017 and 2019, please do not do so when building "
21913"<application>gtkmm</application> with its -mm dependencies."
10581msgstr ""21914msgstr ""
nn21915"<application>gtkmm</application> fungerar för närvarande med <link xlink:"
21916"href=\"http://mingw.org/\">MinGW/GCC-kompilatorn</link> med en "
21917"kompilatorversion som stöder C++17, som gcc 7 eller 8. Det fungerar också "
21918"med Microsoft Visual C++ 2017 15.7.x eller senare (inklusive de gratis "
21919"tillgängliga express/community-utgåvorna) på Windows-plattformen. Det finns "
21920"en <link xlink:href=\"ftp://ftp.gnome.org/pub/GNOME/binaries/win32/"
21921"gtkmm\">installerare</link> tillgänglig för <application>gtkmm</application> "
21922"på Microsoft Windows, men i skrivande stund (oktober 2020) har den inte "
21923"uppdaterats på länge. Var medveten om att även om det vanligen är lugnt att "
21924"blanda byggen som gjorts med Visual Studio 2017 och 2019, så gör inte det "
21925"när du bygger <application>gtkmm</application> med dess -mm-beroenden."
1058221926
10583#. (itstool) path: appendix/para21927#. (itstool) path: appendix/para
10584#: C/index-in.docbook:957321928#: C/index-in.docbook:9573
n10585msgid "There are README files, describing how to build <application>gtkmm</applin21929msgid ""
>cation> and its dependencies on Windows:" 
21930"There are README files, describing how to build <application>gtkmm</"
21931"application> and its dependencies on Windows:"
10586msgstr ""21932msgstr ""
1058721933
10588#. (itstool) path: listitem/para21934#. (itstool) path: listitem/para
10589#: C/index-in.docbook:957821935#: C/index-in.docbook:9578
n10590msgid "libsigc++: <link xlink:href=\"https://github.com/libsigcplusplus/libsigcpn21936msgid ""
>lusplus/blob/master/MSVC_NMake/MSVC-Builds.md\">MSVC_NMake/MSVC-Builds.md</link> 
>" 
21937"libsigc++: <link xlink:href=\"https://github.com/libsigcplusplus/"
21938"libsigcplusplus/blob/master/MSVC_NMake/MSVC-Builds.md\">MSVC_NMake/MSVC-"
21939"Builds.md</link>"
10591msgstr ""21940msgstr ""
1059221941
10593#. (itstool) path: listitem/para21942#. (itstool) path: listitem/para
10594#: C/index-in.docbook:958121943#: C/index-in.docbook:9581
nn21944#, fuzzy
21945#| msgid ""
21946#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
21947#| "tree/master/examples/book/grid\">Source Code</link>"
21948msgid ""
10595msgid "glibmm: <link xlink:href=\"https://gitlab.gnome.org/GNOME/glibmm/tree/mas21949"glibmm: <link xlink:href=\"https://gitlab.gnome.org/GNOME/glibmm/tree/master/"
>ter/README.win32.md\">README.win32.md</link>" 
21950"README.win32.md\">README.win32.md</link>"
10596msgstr ""21951msgstr ""
nn21952"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
21953"master/examples/book/grid\">Källkod</link>"
1059721954
10598#. (itstool) path: listitem/para21955#. (itstool) path: listitem/para
10599#: C/index-in.docbook:958421956#: C/index-in.docbook:9584
n10600msgid "cairomm: <link xlink:href=\"https://gitlab.freedesktop.org/cairo/cairomm/n21957msgid ""
>-/blob/master/MSVC_NMake/MSVC-Builds.md\">MSVC_NMake/MSVC-Builds.md</link>" 
21958"cairomm: <link xlink:href=\"https://gitlab.freedesktop.org/cairo/cairomm/-/"
21959"blob/master/MSVC_NMake/MSVC-Builds.md\">MSVC_NMake/MSVC-Builds.md</link>"
10601msgstr ""21960msgstr ""
1060221961
10603#. (itstool) path: listitem/para21962#. (itstool) path: listitem/para
10604#: C/index-in.docbook:958721963#: C/index-in.docbook:9587
n10605msgid "pangomm: <link xlink:href=\"https://gitlab.gnome.org/GNOME/pangomm/tree/mn21964#, fuzzy
>aster/README.win32.md\">README.win32.md</link>" 
21965#| msgid ""
21966#| "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
21967#| "tree/master/examples/book/grid\">Source Code</link>"
21968msgid ""
21969"pangomm: <link xlink:href=\"https://gitlab.gnome.org/GNOME/pangomm/tree/"
21970"master/README.win32.md\">README.win32.md</link>"
10606msgstr ""21971msgstr ""
nn21972"<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/tree/"
21973"master/examples/book/grid\">Källkod</link>"
1060721974
10608#. (itstool) path: listitem/para21975#. (itstool) path: listitem/para
10609#: C/index-in.docbook:959021976#: C/index-in.docbook:9590
n10610msgid "gtkmm: <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm/tree/masten21977#, fuzzy
>r/README.win32.md\">README.win32.md</link>, <link xlink:href=\"https://gitlab.gn 
>ome.org/GNOME/gtkmm/tree/master/MSVC_NMake/README\">MSVC_NMake/README</link>" 
21978#| msgid ""
21979#| "Refer to the <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm/tree/"
21980#| "master/README.win32\">README.win32</link>, as well as the <link xlink:"
21981#| "href=\"https://gitlab.gnome.org/GNOME/gtkmm/tree/master/MSVC_NMake/"
21982#| "README\">README</link> files in the <application>gtkmm</application>, "
21983#| "pangomm and glibmm for instructions on how to build <application>gtkmm</"
21984#| "application> on Windows."
21985msgid ""
21986"gtkmm: <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm/tree/master/"
21987"README.win32.md\">README.win32.md</link>, <link xlink:href=\"https://gitlab."
21988"gnome.org/GNOME/gtkmm/tree/master/MSVC_NMake/README\">MSVC_NMake/README</"
21989"link>"
10611msgstr ""21990msgstr ""
nn21991"Se <link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm/tree/master/"
21992"README.win32\">README.win32</link> såväl som <link xlink:href=\"https://"
21993"gitlab.gnome.org/GNOME/gtkmm/tree/master/MSVC_NMake/README\">README</link>-"
21994"filerna i <application>gtkmm</application>, pangomm och glibmm för "
21995"instruktioner om hur du bygger <application>gtkmm</application> på Windows."
1061221996
10613#. (itstool) path: appendix/title21997#. (itstool) path: appendix/title
10614#: C/index-in.docbook:959721998#: C/index-in.docbook:9597
10615msgid "Working with gtkmm's Source Code"21999msgid "Working with gtkmm's Source Code"
n10616msgstr ""n22000msgstr "Arbeta med gtkmm:s källkod"
1061722001
10618#. (itstool) path: appendix/para22002#. (itstool) path: appendix/para
10619#: C/index-in.docbook:959822003#: C/index-in.docbook:9598
n10620msgid "If you are interested in helping out with the development of <applicationn22004#, fuzzy
>>gtkmm</application>, or fixing a bug in <application>gtkmm</application>, you'l 
>l probably need to build the development version of <application>gtkmm</applicat 
>ion>. However, you should not install a development version over your stable ver 
>sion. Instead, you should install it alongside your existing <application>gtkmm< 
>/application> installation, in a separate path." 
22005msgid ""
22006"If you are interested in helping out with the development of "
22007"<application>gtkmm</application>, or fixing a bug in <application>gtkmm</"
22008"application>, you'll probably need to build the development version of "
22009"<application>gtkmm</application>. However, you should not install a "
22010"development version over your stable version. Instead, you should install it "
22011"alongside your existing <application>gtkmm</application> installation, in a "
22012"separate path."
10621msgstr ""22013msgstr ""
nn22014"Om du är intresserad i att hjälpa till med utvecklingen av "
22015"<application>gtkmm</application> eller vill fixa ett fel <application>gtkmm</"
22016"application>, kommer du troligen behöva bygga utvecklingsversionen av "
22017"<application>gtkmm</application>. Du bör dock inte installera en "
22018"utvecklingsversion över din stabila version. I stället bör du installera den "
22019"vid sidan om din befintliga <application>gtkmm</application>-installation i "
22020"en separat sökväg."
1062222021
10623#. (itstool) path: appendix/para22022#. (itstool) path: appendix/para
10624#: C/index-in.docbook:960522023#: C/index-in.docbook:9605
n10625msgid "The easiest way to do this is using <link xlink:href=\"https://wiki.gnomen22024#, fuzzy
>.org/Projects/Jhbuild\">jhbuild</link>. <application>jhbuild</application> is a  
>program that makes building GNOME software much easier by calculating dependenci 
>es and building things in the correct order. This section will give a brief expl 
>anation of how to set up <application>jhbuild</application> to build and install 
> <application>gtkmm</application> from the source repository (git). For up-to-da 
>te information on <application>jhbuild</application>, please refer to the <link  
>xlink:href=\"https://gnome.pages.gitlab.gnome.org/jhbuild/\">jhbuild manual</lin 
>k>." 
22025msgid ""
22026"The easiest way to do this is using <link xlink:href=\"https://wiki.gnome."
22027"org/Projects/Jhbuild\">jhbuild</link>. <application>jhbuild</application> is "
22028"a program that makes building GNOME software much easier by calculating "
22029"dependencies and building things in the correct order. This section will "
22030"give a brief explanation of how to set up <application>jhbuild</application> "
22031"to build and install <application>gtkmm</application> from the source "
22032"repository (git). For up-to-date information on <application>jhbuild</"
22033"application>, please refer to the <link xlink:href=\"https://gnome.pages."
22034"gitlab.gnome.org/jhbuild/\">jhbuild manual</link>."
10626msgstr ""22035msgstr ""
nn22036"Det enklaste sättet att göra detta är att använda <link xlink:href=\"https://"
22037"wiki.gnome.org/Projects/Jhbuild\">jhbuild</link>. <application>jhbuild</"
22038"application> är ett program som gör det mycket enklare att bygga GNOME-"
22039"programvara genom att beräkna beroenden och bygga saker i rätt ordning. "
22040"Detta avsnitt kommer kort förklara hur <application>jhbuild</application> "
22041"kan konfigureras för att bygga och installera <application>gtkmm</"
22042"application> från källarkivet (git). För uppdaterad information om "
22043"<application>jhbuild</application>, se <link xlink:href=\"http://developer-"
22044"old.gnome.org/jhbuild/unstable/\">handboken för jhbuild</link>."
1062722045
10628#. (itstool) path: note/para22046#. (itstool) path: note/para
10629#: C/index-in.docbook:961522047#: C/index-in.docbook:9615
n10630msgid "Note that to build <application>gtkmm</application> from git, you'll often22048#, fuzzy
>n need to build many of its dependencies from git as well. <application>jhbuild< 
>/application> makes this easier than it would normally be, but it will take quit 
>e a while to build and install them all. You will probably encounter build probl 
>ems, though these will usually be corrected quickly if you report them." 
22049msgid ""
22050"Note that to build <application>gtkmm</application> from git, you'll often "
22051"need to build many of its dependencies from git as well. "
22052"<application>jhbuild</application> makes this easier than it would normally "
22053"be, but it will take quite a while to build and install them all. You will "
22054"probably encounter build problems, though these will usually be corrected "
22055"quickly if you report them."
10631msgstr ""22056msgstr ""
nn22057"Observera att för att bygga <application>gtkmm</application> från git "
22058"behöver du ofta även bygga många av dess beroenden från git. "
22059"<application>jhbuild</application> gör detta lättare än det vanligen skulle "
22060"vara, men det kommer ta ett bra tag att bygga och installera dem alla. Du "
22061"kommer troligen stöta på byggproblem, men dessa brukar vanligen rättas till "
22062"snabbt om du rapporterar dem."
1063222063
10633#. (itstool) path: appendix/para22064#. (itstool) path: appendix/para
10634#: C/index-in.docbook:962322065#: C/index-in.docbook:9623
n10635msgid "<application>gnome-build-meta</application> is an alternative to <applican22066msgid ""
>tion>jhbuild</application>. It is described at the <link xlink:href=\"https://wi 
>ki.gnome.org/Newcomers/BuildSystemComponent\">Building system components</link>  
>wiki page, but here we concentrate on <application>jhbuild</application>." 
22067"<application>gnome-build-meta</application> is an alternative to "
22068"<application>jhbuild</application>. It is described at the <link xlink:"
22069"href=\"https://wiki.gnome.org/Newcomers/BuildSystemComponent\">Building "
22070"system components</link> wiki page, but here we concentrate on "
22071"<application>jhbuild</application>."
10636msgstr ""22072msgstr ""
nn22073"<application>gnome-build-meta</application> är ett alternativ till "
22074"<application>jhbuild</application>. Det beskrivs på wikisidan <link xlink:"
22075"href=\"https://wiki.gnome.org/Newcomers/BuildSystemComponent\">Bygga "
22076"systemkomponenter</link>, men här koncentrerar vi oss på "
22077"<application>jhbuild</application>."
1063722078
10638#. (itstool) path: section/title22079#. (itstool) path: section/title
10639#: C/index-in.docbook:963022080#: C/index-in.docbook:9630
10640msgid "Setting up jhbuild"22081msgid "Setting up jhbuild"
n10641msgstr ""n22082msgstr "Konfigurera jhbuild"
1064222083
10643#. (itstool) path: para/screen22084#. (itstool) path: para/screen
10644#: C/index-in.docbook:963922085#: C/index-in.docbook:9639
10645#, no-wrap22086#, no-wrap
n10646msgid ""n
10647"$ cp examples/sample.jhbuildrc ~/.config/jhbuildrc"22087msgid "$ cp examples/sample.jhbuildrc ~/.config/jhbuildrc"
10648msgstr ""22088msgstr "$ cp examples/sample.jhbuildrc ~/.config/jhbuildrc"
1064922089
10650#. (itstool) path: section/para22090#. (itstool) path: section/para
10651#: C/index-in.docbook:963222091#: C/index-in.docbook:9632
n10652msgid "To set up <application>jhbuild</application>, follow the basic installatin22092msgid ""
>on instructions from the <link xlink:href=\"https://gnome.pages.gitlab.gnome.org 
>/jhbuild/\">jhbuild manual</link>. After you have installed <application>jhbuild 
></application>, you should copy the sample <application>jhbuild</application> co 
>nfiguration file into your home directory by executing the following command fro 
>m the <application>jhbuild</application> directory: <_:screen-1/>" 
22093"To set up <application>jhbuild</application>, follow the basic installation "
22094"instructions from the <link xlink:href=\"https://gnome.pages.gitlab.gnome."
22095"org/jhbuild/\">jhbuild manual</link>. After you have installed "
22096"<application>jhbuild</application>, you should copy the sample "
22097"<application>jhbuild</application> configuration file into your home "
22098"directory by executing the following command from the <application>jhbuild</"
22099"application> directory: <_:screen-1/>"
10653msgstr ""22100msgstr ""
nn22101"Följ de grundläggande installationsinstruktionerna från <link xlink:"
22102"href=\"https://gnome.pages.gitlab.gnome.org/jhbuild/\">handboken för "
22103"jhbuild</link> för att konfigurera <application>jhbuild</application>. Efter "
22104"att du har installerat <application>jhbuild</application> bör du kopiera "
22105"<application>jhbuild</application>-exempelkonfigurationsfilen till din "
22106"hemkatalog genom att exekvera följande kommando från katalogen "
22107"<application>jhbuild</application>: <_:screen-1/>"
1065422108
10655#. (itstool) path: section/para22109#. (itstool) path: section/para
10656#: C/index-in.docbook:964122110#: C/index-in.docbook:9641
n10657msgid "The <application>gtkmm</application> module is defined in the <filename>gn22111msgid ""
>nome-suites-core-deps-latest.modules</filename> moduleset. So edit your <filenam 
>e>jhbuildrc</filename> file and set your moduleset setting like so:" 
22112"The <application>gtkmm</application> module is defined in the "
22113"<filename>gnome-suites-core-deps-latest.modules</filename> moduleset. So "
22114"edit your <filename>jhbuildrc</filename> file and set your moduleset setting "
22115"like so:"
10658msgstr ""22116msgstr ""
nn22117"<application>gtkmm</application>-modulen definieras i moduluppsättningen "
22118"<filename>gnome-suites-core-deps-latest.modules</filename>. Så redigera din "
22119"<filename>jhbuildrc</filename>-fil och ställ in din moduleset-inställning så "
22120"här:"
1065922121
10660#. (itstool) path: section/programlisting22122#. (itstool) path: section/programlisting
10661#: C/index-in.docbook:964622123#: C/index-in.docbook:9646
n10662#, no-wrapn22124#, fuzzy, no-wrap
10663msgid ""22125#| msgid "moduleset = 'gnome-suites-core-deps-latest'"
10664"<code>moduleset = 'gnome-suites-core-deps-latest'</code>"22126msgid "<code>moduleset = 'gnome-suites-core-deps-latest'</code>"
10665msgstr ""22127msgstr "moduleset = 'gnome-suites-core-deps-latest'"
1066622128
10667#. (itstool) path: section/para22129#. (itstool) path: section/para
10668#: C/index-in.docbook:964722130#: C/index-in.docbook:9647
n10669msgid "After setting the correct moduleset, you need to tell <application>jhbuiln22131#, fuzzy
>d</application> which module or modules to build. To build <application>gtkmm</a 
>pplication> and all of its dependencies, set <varname>modules</varname> like so: 
>" 
22132msgid ""
22133"After setting the correct moduleset, you need to tell <application>jhbuild</"
22134"application> which module or modules to build. To build <application>gtkmm</"
22135"application> and all of its dependencies, set <varname>modules</varname> "
22136"like so:"
10670msgstr ""22137msgstr ""
nn22138"Efter att ha ställt in rätt moduluppsättning behöver du säga till "
22139"<application>jhbuild</application> vilken eller vilka moduler som ska "
22140"byggas. För att bygga <application>gtkmm</application> och alla dess "
22141"beroenden ställer du in <varname>modules</varname> så här:"
1067122142
10672#. (itstool) path: section/programlisting22143#. (itstool) path: section/programlisting
10673#: C/index-in.docbook:965322144#: C/index-in.docbook:9653
n10674#, no-wrapn22145#, fuzzy, no-wrap
10675msgid ""22146#| msgid "modules = [ 'gtkmm' ]"
10676"<code>modules = [ 'gtkmm' ]</code>"22147msgid "<code>modules = [ 'gtkmm' ]</code>"
10677msgstr ""22148msgstr "modules = [ 'gtkmm' ]"
1067822149
10679#. (itstool) path: section/para22150#. (itstool) path: section/para
10680#: C/index-in.docbook:965422151#: C/index-in.docbook:9654
n10681msgid "You can build several modules by setting the <varname>modules</varname> vn22152#, fuzzy
>ariable to a meta-package, e.g. <literal>meta-gnome-core</literal>, or listing m 
>ore than one module name. The <varname>modules</varname> variable specifies whic 
>h modules will be built when you don't explicitly specify anything on the comman 
>d line. You can always build a different moduleset later by specifying it on the 
> commandline (e.g. <command>jhbuild build gtkmm</command>)." 
22153msgid ""
22154"You can build several modules by setting the <varname>modules</varname> "
22155"variable to a meta-package, e.g. <literal>meta-gnome-core</literal>, or "
22156"listing more than one module name. The <varname>modules</varname> variable "
22157"specifies which modules will be built when you don't explicitly specify "
22158"anything on the command line. You can always build a different moduleset "
22159"later by specifying it on the commandline (e.g. <command>jhbuild build "
22160"gtkmm</command>)."
10682msgstr ""22161msgstr ""
nn22162"Du kan bygga flera moduler genom att ställa in variabeln <varname>modules</"
22163"varname> till ett metapaket, t.ex. <literal>meta-gnome-core</literal>, eller "
22164"genom att lista mer än ett modulnamn. Variabeln <varname>modules</varname> "
22165"anger vilka moduler som kommer byggas när du inte explicit anger något på "
22166"kommandoraden. Du kan alltid bygga en annan moduluppsättning senare genom "
22167"att ange den på kommandoraden (t.ex. <command>jhbuild build gtkmm</command>)."
1068322168
10684#. (itstool) path: important/title22169#. (itstool) path: important/title
10685#: C/index-in.docbook:966422170#: C/index-in.docbook:9664
10686msgid "Setting a prefix"22171msgid "Setting a prefix"
n10687msgstr ""n22172msgstr "Sätta ett prefix"
1068822173
10689#. (itstool) path: important/para22174#. (itstool) path: important/para
10690#: C/index-in.docbook:966522175#: C/index-in.docbook:9665
n10691msgid "By default, <application>jhbuild</application>'s configuration is configun22176#, fuzzy
>red to install all software built with <application>jhbuild</application> under  
>the <filename>~/jhbuild/install</filename> prefix. You can choose a different pr 
>efix, but it is recommended that you keep this prefix different from other softw 
>are that you've installed (don't set it to <filename>/usr</filename>!) If you've 
> followed the jhbuild instructions then this prefix belongs to your user, so you 
> don't need to run jhbuild as <literal>root</literal>." 
22177msgid ""
22178"By default, <application>jhbuild</application>'s configuration is configured "
22179"to install all software built with <application>jhbuild</application> under "
22180"the <filename>~/jhbuild/install</filename> prefix. You can choose a "
22181"different prefix, but it is recommended that you keep this prefix different "
22182"from other software that you've installed (don't set it to <filename>/usr</"
22183"filename>!) If you've followed the jhbuild instructions then this prefix "
22184"belongs to your user, so you don't need to run jhbuild as <literal>root</"
22185"literal>."
10692msgstr ""22186msgstr ""
nn22187"Som standard är <application>jhbuild</application>s konfiguration "
22188"konfigurerad för att installera all programvara som byggts med "
22189"<application>jhbuild</application> under prefixet <filename>~/jhbuild/"
22190"install</filename>. Du kan välja ett annat prefix, men det rekommenderas att "
22191"du behåller detta prefix skilt från annan programvara som du har installerat "
22192"(sätt det inte till <filename>/usr</filename>!) Om du har följt jhbuild-"
22193"instruktionerna så hör detta prefix till din användare, så du behöver inte "
22194"köra jhbuild som <literal>root</literal>."
1069322195
10694#. (itstool) path: section/para22196#. (itstool) path: section/para
10695#: C/index-in.docbook:967722197#: C/index-in.docbook:9677
n10696msgid "You should also set <varname>buildroot</varname> in <filename>jhbuildrc</n22198#, fuzzy
>filename>. <application>jhbuild</application> builds <application>gtkmm</applica 
>tion> and many of its dependencies with Meson. Meson does not allow building in  
>the source tree. <application>jhbuild</application>'s default action is to build 
> in a <filename>build</filename> directory directly below the source root direct 
>ory. Some modules have a <filename>build</filename> directory with files used wh 
>en building with Autotools. Those files can be destroyed if you let <application 
>>jhbuild</application> build in that directory." 
22199msgid ""
22200"You should also set <varname>buildroot</varname> in <filename>jhbuildrc</"
22201"filename>. <application>jhbuild</application> builds <application>gtkmm</"
22202"application> and many of its dependencies with Meson. Meson does not allow "
22203"building in the source tree. <application>jhbuild</application>'s default "
22204"action is to build in a <filename>build</filename> directory directly below "
22205"the source root directory. Some modules have a <filename>build</filename> "
22206"directory with files used when building with Autotools. Those files can be "
22207"destroyed if you let <application>jhbuild</application> build in that "
22208"directory."
10697msgstr ""22209msgstr ""
nn22210"Du bör även ställa in <varname>buildroot</varname> i <filename>jhbuildrc</"
22211"filename>. <application>jhbuild</application> bygger <application>gtkmm</"
22212"application> och många av dess beroenden med Meson. Meson tillåter inte "
22213"bygge i källträdet. <application>jhbuild</application>s standardåtgärd är "
22214"att bygga i en <filename>build</filename>-katalog just under källans "
22215"rotkatalog. Vissa moduler har en <filename>build</filename>-katalog med "
22216"filer som används vid bygge med Autotools. Dessa filer kan förstöras om du "
22217"låter <application>jhbuild</application> bygga i den katalogen."
1069822218
10699#. (itstool) path: section/para22219#. (itstool) path: section/para
10700#: C/index-in.docbook:968722220#: C/index-in.docbook:9687
n10701msgid "When you downloaded <application>jhbuild</application> from the git reposn22221msgid ""
>itory, you got a number of <filename>.modules</filename> files, specifying depen 
>dencies between modules. By default <application>jhbuild</application> does not  
>use the downloaded versions of these files, but reads the latest versions in the 
> git repository. This is usually what you want. If you don't want it, use the <v 
>arname>use_local_modulesets</varname> variable in <filename>jhbuildrc</filename> 
>." 
22222"When you downloaded <application>jhbuild</application> from the git "
22223"repository, you got a number of <filename>.modules</filename> files, "
22224"specifying dependencies between modules. By default <application>jhbuild</"
22225"application> does not use the downloaded versions of these files, but reads "
22226"the latest versions in the git repository. This is usually what you want. If "
22227"you don't want it, use the <varname>use_local_modulesets</varname> variable "
22228"in <filename>jhbuildrc</filename>."
10702msgstr ""22229msgstr ""
nn22230"När du hämtade <application>jhbuild</application> från git-arkivet fick du "
22231"ett antal <filename>.modules</filename>-filer som anger beroenden mellan "
22232"moduler. Som standard använder <application>jhbuild</application> inte de "
22233"hämtade versionerna av dessa filer, utan läser de senaste versionerna i git-"
22234"arkivet. Detta är vanligen vad du vill. Om du inte vill det använder du "
22235"variabeln <varname>use_local_modulesets</varname> i <filename>jhbuildrc</"
22236"filename>."
1070322237
10704#. (itstool) path: section/title22238#. (itstool) path: section/title
10705#: C/index-in.docbook:969822239#: C/index-in.docbook:9698
nn22240msgid ""
10706msgid "Installing and Using the git version of <application>gtkmm</application>"22241"Installing and Using the git version of <application>gtkmm</application>"
10707msgstr ""22242msgstr ""
nn22243"Installera och använda git-versionen av <application>gtkmm</application>"
1070822244
10709#. (itstool) path: para/screen22245#. (itstool) path: para/screen
10710#: C/index-in.docbook:970722246#: C/index-in.docbook:9707
10711#, no-wrap22247#, no-wrap
10712msgid ""22248msgid ""
10713"$ jhbuild bootstrap\n"22249"$ jhbuild bootstrap\n"
10714"$ jhbuild sanitycheck"22250"$ jhbuild sanitycheck"
10715msgstr ""22251msgstr ""
nn22252"$ jhbuild bootstrap\n"
22253"$ jhbuild sanitycheck"
1071622254
10717#. (itstool) path: section/para22255#. (itstool) path: section/para
10718#: C/index-in.docbook:970022256#: C/index-in.docbook:9700
n10719msgid "Once you've configured <application>jhbuild</application> as described abn22257#, fuzzy
>ove, building <application>gtkmm</application> should be relatively straightforw 
>ard. The first time you run <application>jhbuild</application>, you should run t 
>he following sequence of commands to ensure that <application>jhbuild</applicati 
>on> has the required tools and verify that it is set up correctly: <_:screen-1/> 
>" 
22258msgid ""
22259"Once you've configured <application>jhbuild</application> as described "
22260"above, building <application>gtkmm</application> should be relatively "
22261"straightforward. The first time you run <application>jhbuild</application>, "
22262"you should run the following sequence of commands to ensure that "
22263"<application>jhbuild</application> has the required tools and verify that it "
22264"is set up correctly: <_:screen-1/>"
10720msgstr ""22265msgstr ""
nn22266"När du konfigurerat <application>jhbuild</application> som beskrivet ovan "
22267"bör det vara relativt okomplicerat att bygga <application>gtkmm</"
22268"application>. Den första gången du kör <application>jhbuild</application> "
22269"bör du köra följande sekvens kommandon för att säkerställa att "
22270"<application>jhbuild</application> har verktygen som krävs och bekräfta att "
22271"det konfigurerats riktigt: <_:screen-1/>"
1072122272
10722#. (itstool) path: section/title22273#. (itstool) path: section/title
10723#: C/index-in.docbook:971122274#: C/index-in.docbook:9711
nn22275msgid ""
10724msgid "Installing <application>gtkmm</application> with <application>jhbuild</ap22276"Installing <application>gtkmm</application> with <application>jhbuild</"
>plication>" 
22277"application>"
10725msgstr ""22278msgstr ""
nn22279"Installera <application>gtkmm</application> med <application>jhbuild</"
22280"application>"
1072622281
10727#. (itstool) path: section/para22282#. (itstool) path: section/para
10728#: C/index-in.docbook:971322283#: C/index-in.docbook:9713
n10729msgid "If everything worked correctly, you should be able to build <application>n22284msgid ""
>gtkmm</application> and all of its dependencies from git by executing <command>j 
>hbuild build</command> (or, if you didn't specify <application>gtkmm</applicatio 
>n> in the <varname>modules</varname> variable, with the command <command>jhbuild 
> build gtkmm</command>)." 
22285"If everything worked correctly, you should be able to build "
22286"<application>gtkmm</application> and all of its dependencies from git by "
22287"executing <command>jhbuild build</command> (or, if you didn't specify "
22288"<application>gtkmm</application> in the <varname>modules</varname> variable, "
22289"with the command <command>jhbuild build gtkmm</command>)."
10730msgstr ""22290msgstr ""
nn22291"Om allt fungerade korrekt bör du kunna bygga <application>gtkmm</"
22292"application> och alla dess beroenden från git genom att köra "
22293"<command>jhbuild build</command> (eller, om du inte angav "
22294"<application>gtkmm</application> i variabeln <varname>modules</varname>, med "
22295"kommandot <command>jhbuild build gtkmm</command>)."
1073122296
10732#. (itstool) path: section/para22297#. (itstool) path: section/para
10733#: C/index-in.docbook:972022298#: C/index-in.docbook:9720
n10734msgid "This command will build and install a series of modules and will probablyn22299#, fuzzy
> take quite a long time the first time through. After the first time, however, i 
>t should go quite a bit faster since it only needs to rebuild files that changed 
> since the last build. Alternatively, after you've built and installed <applicat 
>ion>gtkmm</application> the first time, you can rebuild <application>gtkmm</appl 
>ication> by itself (without rebuilding all of its dependencies) with the command 
> <command>jhbuild buildone gtkmm</command>." 
22300msgid ""
22301"This command will build and install a series of modules and will probably "
22302"take quite a long time the first time through. After the first time, "
22303"however, it should go quite a bit faster since it only needs to rebuild "
22304"files that changed since the last build. Alternatively, after you've built "
22305"and installed <application>gtkmm</application> the first time, you can "
22306"rebuild <application>gtkmm</application> by itself (without rebuilding all "
22307"of its dependencies) with the command <command>jhbuild buildone gtkmm</"
22308"command>."
10735msgstr ""22309msgstr ""
nn22310"Detta kommando kommer bygga och installera en serie moduler och kommer "
22311"troligen ta ganska lång tid den första gången. Efter den första gången bör "
22312"det dock gå ganska mycket snabbare då det bara behöver bygga om filer som "
22313"ändrats sedan det senaste bygget. Alternativt kan du efter du byggt och "
22314"installerat <application>gtkmm</application> för första gången, nu bygga om "
22315"endast <application>gtkmm</application> (utan att bygga alla dess beroenden "
22316"på nytt) med kommandot <command>jhbuild buildone gtkmm</command>."
1073622317
10737#. (itstool) path: section/title22318#. (itstool) path: section/title
10738#: C/index-in.docbook:973122319#: C/index-in.docbook:9731
10739msgid "Using the git version of <application>gtkmm</application>"22320msgid "Using the git version of <application>gtkmm</application>"
n10740msgstr ""n22321msgstr "Använda git-versionen av <application>gtkmm</application>"
1074122322
10742#. (itstool) path: section/para22323#. (itstool) path: section/para
10743#: C/index-in.docbook:973322324#: C/index-in.docbook:9733
n10744msgid "After you've installed the git version of <application>gtkmm</applicationn22325#, fuzzy
>>, you're ready to start using and experimenting with it. In order to use the ne 
>w version of <application>gtkmm</application> you've just installed, you need to 
> set some environment variables so that your <filename>configure</filename> or < 
>filename>meson.build</filename> script knows where to find the new libraries. Fo 
>rtunately, <application>jhbuild</application> offers an easy solution to this pr 
>oblem. Executing the command <command>jhbuild shell</command> will start a new s 
>hell with all of the correct environment variables set. Now if you re-configure  
>and build your project just as you usually do, it should link against the newly  
>installed libraries. To return to your previous environment, simply exit the <ap 
>plication>jhbuild</application> shell." 
22326msgid ""
22327"After you've installed the git version of <application>gtkmm</application>, "
22328"you're ready to start using and experimenting with it. In order to use the "
22329"new version of <application>gtkmm</application> you've just installed, you "
22330"need to set some environment variables so that your <filename>configure</"
22331"filename> or <filename>meson.build</filename> script knows where to find the "
22332"new libraries. Fortunately, <application>jhbuild</application> offers an "
22333"easy solution to this problem. Executing the command <command>jhbuild shell</"
22334"command> will start a new shell with all of the correct environment "
22335"variables set. Now if you re-configure and build your project just as you "
22336"usually do, it should link against the newly installed libraries. To return "
22337"to your previous environment, simply exit the <application>jhbuild</"
22338"application> shell."
10745msgstr ""22339msgstr ""
nn22340"Efter att du installerat git-versionen an <application>gtkmm</application> "
22341"är du redo att börja använda och experimentera med det. För att använda den "
22342"nya <application>gtkmm</application>-version som du just installerats "
22343"behöver du ställa in några miljövariabler så att ditt <filename>configure</"
22344"filename>- eller <filename>meson.build</filename>-skript vet var de kan "
22345"hitta de nya biblioteken. Turligt nog erbjuder <application>jhbuild</"
22346"application> en lätt lösning på detta problem. Att exekvera kommandot "
22347"<command>jhbuild shell</command> kommer starta ett nytt skal med alla "
22348"miljövariabler rätt inställda. Om du nu konfigurerar om och bygger ditt "
22349"projekt som du brukar göra, så ska det helt enkelt länka mot de nyss "
22350"installerade biblioteken. För att returnera till din tidigare miljö stänger "
22351"du helt enkelt <application>jhbuild</application>-skalet."
1074622352
10747#. (itstool) path: section/para22353#. (itstool) path: section/para
10748#: C/index-in.docbook:974722354#: C/index-in.docbook:9747
n10749msgid "Once you've built your software, you'll need to run your program within tn22355#, fuzzy
>he jhbuild environment as well. To do this, you can again use the <command>jhbui 
>ld shell</command> command to start a new shell with the <application>jhbuild</a 
>pplication> environment set up. Alternatively, you can execute a one-off command 
> in the <application>jhbuild</application> environment using the following comma 
>nd: <command>jhbuild run command-name</command>. In this case, the command will  
>be run with the correct environment variables set, but will return to your previ 
>ous environment after the program exits." 
22356msgid ""
22357"Once you've built your software, you'll need to run your program within the "
22358"jhbuild environment as well. To do this, you can again use the "
22359"<command>jhbuild shell</command> command to start a new shell with the "
22360"<application>jhbuild</application> environment set up. Alternatively, you "
22361"can execute a one-off command in the <application>jhbuild</application> "
22362"environment using the following command: <command>jhbuild run command-name</"
22363"command>. In this case, the command will be run with the correct environment "
22364"variables set, but will return to your previous environment after the "
22365"program exits."
10750msgstr ""22366msgstr ""
nn22367"När du har byggt din programvara kommer du behöva köra ditt program även i "
22368"jhbuild-miljön. För att göra detta kan du åter igen använda kommandot "
22369"<command>jhbuild shell</command> för att starta ett nytt skal med "
22370"<application>jhbuild</application>-miljön konfigurerad. Alternativt kan du "
22371"exekvera ett ensamt kommando i <application>jhbuild</application>-miljön med "
22372"följande kommando: <command>jhbuild run command-name</command>. I detta fall "
22373"kommer kommandot köras med rätt miljövariabler inställda, men kommer "
22374"returnera till din föregående miljö efter programmet avslutas."
1075122375
10752#. (itstool) path: appendix/title22376#. (itstool) path: appendix/title
10753#: C/index-in.docbook:976422377#: C/index-in.docbook:9764
10754msgid "Wrapping C Libraries with gmmproc"22378msgid "Wrapping C Libraries with gmmproc"
n10755msgstr ""n22379msgstr "Omsluta C-bibliotek med gmmproc"
1075622380
10757#. (itstool) path: appendix/para22381#. (itstool) path: appendix/para
10758#: C/index-in.docbook:976622382#: C/index-in.docbook:9766
n10759msgid "<application>gtkmm</application> uses the <command>gmmproc</command> tooln22383#, fuzzy
> to generate most of its source code, using .defs files that define the APIs of  
><classname>GObject</classname>-based libraries. So it's quite easy to create add 
>itional gtkmm-style wrappers of other glib/GObject-based libraries." 
22384msgid ""
22385"<application>gtkmm</application> uses the <command>gmmproc</command> tool to "
22386"generate most of its source code, using .defs files that define the APIs of "
22387"<classname>GObject</classname>-based libraries. So it's quite easy to create "
22388"additional gtkmm-style wrappers of other glib/GObject-based libraries."
10760msgstr ""22389msgstr ""
nn22390"<application>gtkmm</application> använder verktyget <command>gmmproc</"
22391"command> för att generera det mesta av sin källkod, med .defs-filer som "
22392"definierar API:erna för <classname>GObject</classname>-baserade bibliotek. "
22393"Så det är ganska lätt att skapa ytterligare omslag i gtkmm-stil för andra "
22394"glib/GObject-baserade bibliotek."
1076122395
10762#. (itstool) path: appendix/para22396#. (itstool) path: appendix/para
10763#: C/index-in.docbook:977122397#: C/index-in.docbook:9771
n10764msgid "This involves a variety of tools, some of them crufty, but at least they n22398#, fuzzy
>work, and has been used successfully by several projects." 
22399msgid ""
22400"This involves a variety of tools, some of them crufty, but at least they "
22401"work, and has been used successfully by several projects."
10765msgstr ""22402msgstr ""
nn22403"Detta involverar en uppsjö verktyg, vissa av dem knepiga, men i alla fall "
22404"fungerande, och har framgångsrikt använts av flera projekt."
1076622405
10767#. (itstool) path: section/title22406#. (itstool) path: section/title
10768#: C/index-in.docbook:977622407#: C/index-in.docbook:9776
10769msgid "The build structure"22408msgid "The build structure"
n10770msgstr ""n22409msgstr "Byggstrukturen"
1077122410
10772#. (itstool) path: section/para22411#. (itstool) path: section/para
10773#: C/index-in.docbook:977822412#: C/index-in.docbook:9778
n10774msgid "Generation of the source code for a gtkmm-style wrapper API requires use n22413#, fuzzy
>of tools such as <command>gmmproc</command> and <filename>generate_wrap_init.pl< 
>/filename>, which are included in <application>glibmm</application>. In theory y 
>ou could write your own build files to use these appropriately, but a much bette 
>r option is to make use of the build infrastructure provided by the <application 
>>mm-common</application> module. To get started, it helps a lot to pick an exist 
>ing binding module as an example to look at." 
22414msgid ""
22415"Generation of the source code for a gtkmm-style wrapper API requires use of "
22416"tools such as <command>gmmproc</command> and <filename>generate_wrap_init."
22417"pl</filename>, which are included in <application>glibmm</application>. In "
22418"theory you could write your own build files to use these appropriately, but "
22419"a much better option is to make use of the build infrastructure provided by "
22420"the <application>mm-common</application> module. To get started, it helps a "
22421"lot to pick an existing binding module as an example to look at."
10775msgstr ""22422msgstr ""
nn22423"Generering av källkoden för ett omslags-API av gtkmm-stil kräver användning "
22424"av verktyg som <command>gmmproc</command> och <filename>generate_wrap_init."
22425"pl</filename> som är inkluderade i <application>glibmm</application>. I "
22426"teorin skulle du kunna skriva dina egna byggfiler för att lämpligt använda "
22427"dessa, men ett mycket bättre alternativ är att använda bygginfrastrukturen "
22428"som tillhandahålls av modulen <application>mm-common</application>. För att "
22429"komma igång hjälper det mycket att välja en befintlig bindningsmodul som ett "
22430"exempel att titta på."
1077622431
10777#. (itstool) path: section/para22432#. (itstool) path: section/para
10778#: C/index-in.docbook:978622433#: C/index-in.docbook:9786
n10779msgid "For instance, let's pretend that we are wrapping a C library called libson22434#, fuzzy
>mething. It provides a <classname>GObject</classname>-based API with types named 
>, for instance, <classname>SomeWidget</classname> and <classname>SomeStuff</clas 
>sname>." 
22435msgid ""
22436"For instance, let's pretend that we are wrapping a C library called "
22437"libsomething. It provides a <classname>GObject</classname>-based API with "
22438"types named, for instance, <classname>SomeWidget</classname> and "
22439"<classname>SomeStuff</classname>."
10780msgstr ""22440msgstr ""
nn22441"Låt oss exempelvis föreställa oss att vi omsluter ett C-bibliotek med namnet "
22442"libsomething. Det tillhandahåller ett <classname>GObject</classname>-baserat "
22443"API med typer som exempelvis har namnen <classname>SomeWidget</classname> "
22444"och <classname>SomeStuff</classname>."
1078122445
10782#. (itstool) path: section/title22446#. (itstool) path: section/title
10783#: C/index-in.docbook:979222447#: C/index-in.docbook:9792
10784msgid "Copying the skeleton project"22448msgid "Copying the skeleton project"
n10785msgstr ""n22449msgstr "Kopiera skelettprojektet"
1078622450
10787#. (itstool) path: section/para22451#. (itstool) path: section/para
10788#: C/index-in.docbook:979422452#: C/index-in.docbook:9794
n10789msgid "Typically our wrapper library would be called libsomethingmm. We can starn22453#, fuzzy
>t by copying the <link xlink:href=\"https://gitlab.gnome.org/GNOME/mm-common/tre 
>e/master/skeletonmm\"> skeleton source tree</link> from the <application>mm-comm 
>on</application> module. Starting with <application>mm-common</application> 1.0. 
>0 this skeleton application is built with the <link xlink:href=\"https://mesonbu 
>ild.com/\">Meson build system</link>." 
22454msgid ""
22455"Typically our wrapper library would be called libsomethingmm. We can start "
22456"by copying the <link xlink:href=\"https://gitlab.gnome.org/GNOME/mm-common/"
22457"tree/master/skeletonmm\"> skeleton source tree</link> from the "
22458"<application>mm-common</application> module. Starting with <application>mm-"
22459"common</application> 1.0.0 this skeleton application is built with the <link "
22460"xlink:href=\"https://mesonbuild.com/\">Meson build system</link>."
10790msgstr ""22461msgstr ""
nn22462"Typiskt skulle vårt omslagsbibliotek kallas något i stil med libsomethingmm. "
22463"Vi kan börja med att kopiera <link xlink:href=\"https://gitlab.gnome.org/"
22464"GNOME/mm-common/tree/master/skeletonmm\"> skelettkällkodsträdet</link> från "
22465"modulen <application>mm-common</application>. Från och med <application>mm-"
22466"common</application> 1.0.0 byggs detta skelettprogram med <link xlink:"
22467"href=\"https://mesonbuild.com/\">byggsystemet Meson</link>."
1079122468
10792#. (itstool) path: section/programlisting22469#. (itstool) path: section/programlisting
10793#: C/index-in.docbook:980022470#: C/index-in.docbook:9800
n10794#, no-wrapn22471#, fuzzy, no-wrap
22472#| msgid ""
22473#| "\n"
22474#| "  $ git clone https://gitlab.gnome.org/GNOME/mm-common.git\n"
22475#| "  $ cp -a mm-common/skeletonmm libsomethingmm\n"
10795msgid ""22476msgid ""
10796"<code>  $ git clone https://gitlab.gnome.org/GNOME/mm-common.git\n"22477"<code>  $ git clone https://gitlab.gnome.org/GNOME/mm-common.git\n"
10797"  $ cp -a mm-common/skeletonmm libsomethingmm\n"22478"  $ cp -a mm-common/skeletonmm libsomethingmm\n"
10798"</code>"22479"</code>"
10799msgstr ""22480msgstr ""
nn22481"\n"
22482"  $ git clone https://gitlab.gnome.org/GNOME/mm-common.git\n"
22483"  $ cp -a mm-common/skeletonmm libsomethingmm\n"
1080022484
10801#. (itstool) path: listitem/para22485#. (itstool) path: listitem/para
10802#: C/index-in.docbook:980822486#: C/index-in.docbook:9808
10803msgid "<filename>libsomethingmm</filename>: The top-level directory."22487msgid "<filename>libsomethingmm</filename>: The top-level directory."
n10804msgstr ""n22488msgstr "<filename>libsomethingmm</filename>: Toppnivåkatalogen."
1080522489
10806#. (itstool) path: listitem/para22490#. (itstool) path: listitem/para
10807#: C/index-in.docbook:981022491#: C/index-in.docbook:9810
nn22492#, fuzzy
22493msgid ""
10808msgid "<filename>libsomething</filename>: Contains the main include file and the22494"<filename>libsomething</filename>: Contains the main include file and the "
> pkg-config .pc file." 
22495"pkg-config .pc file."
10809msgstr ""22496msgstr ""
nn22497"<filename>libsomething</filename>: Innehåller huvudinkluderingsfilen och .pc-"
22498"filen för pkg-config."
1081022499
10811#. (itstool) path: listitem/para22500#. (itstool) path: listitem/para
10812#: C/index-in.docbook:981222501#: C/index-in.docbook:9812
10813msgid "<filename>src</filename>: Contains .hg and .ccg source files."22502msgid "<filename>src</filename>: Contains .hg and .ccg source files."
n10814msgstr ""n22503msgstr "<filename>src</filename>: Innehåller .hg- och .ccg-källfiler."
1081522504
10816#. (itstool) path: listitem/para22505#. (itstool) path: listitem/para
10817#: C/index-in.docbook:981322506#: C/index-in.docbook:9813
nn22507msgid ""
10818msgid "<filename>libsomethingmm</filename>: Contains hand-written .h and .cc fil22508"<filename>libsomethingmm</filename>: Contains hand-written .h and .cc files."
>es." 
10819msgstr ""22509msgstr ""
nn22510"<filename>libsomethingmm</filename>: Innehåller handskrivna .h- och .cc-"
22511"filer."
1082022512
10821#. (itstool) path: section/para22513#. (itstool) path: section/para
10822#: C/index-in.docbook:980322514#: C/index-in.docbook:9803
n10823msgid "This provides a directory structure for the source .hg and .ccg files andn22515#, fuzzy
> the hand-written .h and .cc files, with <filename>meson.build</filename> files  
>that can specify the various files in use, in terms of Meson variables. The dire 
>ctory structure usually looks like this, after we have renamed the directories a 
>ppropriately: <_:itemizedlist-1/>" 
22516msgid ""
22517"This provides a directory structure for the source .hg and .ccg files and "
22518"the hand-written .h and .cc files, with <filename>meson.build</filename> "
22519"files that can specify the various files in use, in terms of Meson "
22520"variables. The directory structure usually looks like this, after we have "
22521"renamed the directories appropriately: <_:itemizedlist-1/>"
10824msgstr ""22522msgstr ""
nn22523"Detta tillhandahåller en katalogstruktur för .hg- och .ccg-källfilerna och "
22524"de handskrivna .h- och .cc-filerna, med <filename>meson.build</filename>-"
22525"filer som kan ange de olika filerna som används i termer av Meson-variabler. "
22526"Katalogstrukturen ser vanligen ut så här efter vi bytt namn på katalogerna "
22527"på lämpligt sätt: <_:itemizedlist-1/>"
1082522528
10826#. (itstool) path: section/para22529#. (itstool) path: section/para
10827#: C/index-in.docbook:982222530#: C/index-in.docbook:9822
nn22531#, fuzzy
22532msgid ""
10828msgid "As well as renaming the directories, we should rename some of the source 22533"As well as renaming the directories, we should rename some of the source "
>files. For instance:" 
22534"files. For instance:"
10829msgstr ""22535msgstr ""
nn22536"Såväl som att byta namn på katalogerna så bör vi byta namn på några av "
22537"källfilerna. Till exempel: <_:programlisting-1/> Ett antal av skelettfilerna "
22538"måste fortfarande fyllas i med projektspecifikt innehåll senare."
1083022539
10831#. (itstool) path: section/programlisting22540#. (itstool) path: section/programlisting
10832#: C/index-in.docbook:982422541#: C/index-in.docbook:9824
n10833#, no-wrapn22542#, fuzzy, no-wrap
22543#| msgid ""
22544#| "\n"
22545#| "$ for f in $(find libsomethingmm -depth -name '*skeleton*'); do \\\n"
22546#| "    d=\"${f%/*}\"; b=\"${f##*/}\"; mv \"$f\" \"$d/${b//skeleton/libsomething
 >}\"; \\\n"
22547#| "  done\n"
10834msgid ""22548msgid ""
10835"<code>$ for f in $(find libsomethingmm -depth -name '*skeleton*'); do \\\n"22549"<code>$ for f in $(find libsomethingmm -depth -name '*skeleton*'); do \\\n"
10836"    d=\"${f%/*}\"; b=\"${f##*/}\"; mv \"$f\" \"$d/${b//skeleton/libsomething}\"22550"    d=\"${f%/*}\"; b=\"${f##*/}\"; mv \"$f\" \"$d/${b//skeleton/libsomething}\"
>; \\\n">; \\\n"
10837"  done\n"22551"  done\n"
10838"</code>"22552"</code>"
10839msgstr ""22553msgstr ""
nn22554"\n"
22555"$ for f in $(find libsomethingmm -depth -name '*skeleton*'); do \\\n"
22556"    d=\"${f%/*}\"; b=\"${f##*/}\"; mv \"$f\" \"$d/${b//skeleton/libsomething}\"
 >; \\\n"
22557"  done\n"
1084022558
10841#. (itstool) path: section/para22559#. (itstool) path: section/para
10842#: C/index-in.docbook:982822560#: C/index-in.docbook:9828
nn22561#, fuzzy
22562msgid ""
10843msgid "A number of the skeleton files must still be filled in with project-speci22563"A number of the skeleton files must still be filled in with project-specific "
>fic content later." 
22564"content later."
10844msgstr ""22565msgstr ""
nn22566"Såväl som att byta namn på katalogerna så bör vi byta namn på några av "
22567"källfilerna. Till exempel: <_:programlisting-1/> Ett antal av skelettfilerna "
22568"måste fortfarande fyllas i med projektspecifikt innehåll senare."
1084522569
10846#. (itstool) path: section/para22570#. (itstool) path: section/para
10847#: C/index-in.docbook:983022571#: C/index-in.docbook:9830
n10848msgid "Note that files ending in <filename>.in</filename> will be used to generan22572#, fuzzy
>te files with the same name but without the <filename>.in</filename> suffix, by  
>replacing some variables with actual values during the configure stage." 
22573msgid ""
22574"Note that files ending in <filename>.in</filename> will be used to generate "
22575"files with the same name but without the <filename>.in</filename> suffix, by "
22576"replacing some variables with actual values during the configure stage."
10849msgstr ""22577msgstr ""
nn22578"Observera att filer som slutar med <filename>.in</filename> kommer användas "
22579"för att generera filer med samma namn men utan ändelsen <filename>.in</"
22580"filename>, genom att ersätta några variabler med faktiska värden under "
22581"konfigurationssteget."
1085022582
10851#. (itstool) path: section/para22583#. (itstool) path: section/para
10852#: C/index-in.docbook:983322584#: C/index-in.docbook:9833
n10853msgid "Generated files are saved in the build tree, which is separated from the n22585#, fuzzy
>source tree when <command>meson</command> and <command>ninja</command> are used. 
>" 
22586msgid ""
22587"Generated files are saved in the build tree, which is separated from the "
22588"source tree when <command>meson</command> and <command>ninja</command> are "
22589"used."
10854msgstr ""22590msgstr ""
nn22591"Genererade filer sparas i byggträdet, vilket separeras från källträdet när "
22592"<command>meson</command> och <command>ninja</command> används."
1085522593
10856#. (itstool) path: section/title22594#. (itstool) path: section/title
10857#: C/index-in.docbook:983822595#: C/index-in.docbook:9838
10858msgid "Modifying build files"22596msgid "Modifying build files"
n10859msgstr ""n22597msgstr "Modifiera byggfiler"
1086022598
10861#. (itstool) path: section/para22599#. (itstool) path: section/para
10862#: C/index-in.docbook:984022600#: C/index-in.docbook:9840
n10863msgid "Now we edit the files to adapt them to our needs. You might prefer to usen22601#, fuzzy
> a multiple-file search-replace utility for this, such as <command>regexxer</com 
>mand>. Note that nearly all of the files provided with the skeleton source tree  
>contain placeholder text. Thus, the substitutions should be performed globally,  
>and not be limited to the Meson files." 
22602msgid ""
22603"Now we edit the files to adapt them to our needs. You might prefer to use a "
22604"multiple-file search-replace utility for this, such as <command>regexxer</"
22605"command>. Note that nearly all of the files provided with the skeleton "
22606"source tree contain placeholder text. Thus, the substitutions should be "
22607"performed globally, and not be limited to the Meson files."
10864msgstr ""22608msgstr ""
nn22609"Nu redigerar vi filerna för att anpassa dem till våra behöv. Du kan föredra "
22610"att använda ett sök-och-ersätt-verktyg för flera filer för detta, som "
22611"<command>regexxer</command>. Observera att nästan alla filerna som "
22612"tillhandahålls med skelettkällträdet innehåller platshållartext. Därmed bör "
22613"ersättningarna utföras globalt, och inte begränsas till Meson-filerna."
1086522614
10866#. (itstool) path: section/para22615#. (itstool) path: section/para
10867#: C/index-in.docbook:984422616#: C/index-in.docbook:9844
n10868msgid "All mentions of <varname>skeleton</varname> should be replaced by the corn22617#, fuzzy
>rect name of the C library you are wrapping, such as \"something\" or \"libsomet 
>hing\". In the same manner, all instances of <varname>SKELETON</varname> should  
>be replaced by \"SOMETHING\" or \"LIBSOMETHING\", and all occurrences of <varnam 
>e>Skeleton</varname> changed to \"Something\"." 
22618msgid ""
22619"All mentions of <varname>skeleton</varname> should be replaced by the "
22620"correct name of the C library you are wrapping, such as \"something\" or "
22621"\"libsomething\". In the same manner, all instances of <varname>SKELETON</"
22622"varname> should be replaced by \"SOMETHING\" or \"LIBSOMETHING\", and all "
22623"occurrences of <varname>Skeleton</varname> changed to \"Something\"."
10869msgstr ""22624msgstr ""
nn22625"Alla omnämnanden av <varname>skeleton</varname> bör ersättas med rätt namn "
22626"för C-biblioteket som du omsluter, som ”something” eller ”libsomething”. På "
22627"samma sätt bör alla instanser av <varname>SKELETON</varname> ersättas med "
22628"”SOMETHING” eller ”LIBSOMETHING”, och alla förekomster av <varname>Skeleton</"
22629"varname> ändras till ”Something”."
1087022630
10871#. (itstool) path: section/para22631#. (itstool) path: section/para
10872#: C/index-in.docbook:984822632#: C/index-in.docbook:9848
n10873msgid "Likewise, replace all instances of <varname>Joe Hacker</varname> by the nn22633#, fuzzy
>ame of the intended copyright holder, which is probably you. Do the same for the 
> <varname>joe@example.com</varname> email address." 
22634msgid ""
22635"Likewise, replace all instances of <varname>Joe Hacker</varname> by the name "
22636"of the intended copyright holder, which is probably you. Do the same for the "
22637"<varname>joe@example.com</varname> email address."
10874msgstr ""22638msgstr ""
nn22639"Ersätt på samma sätt alla förekomster av <varname>Joe Hacker</varname> med "
22640"namnet på den tänka upphovsrättsinnehavaren, vilken troligen är du. Gör "
22641"samma sak för e-postadressen <varname>joe@example.com</varname>."
1087522642
10876#. (itstool) path: section/title22643#. (itstool) path: section/title
10877#: C/index-in.docbook:985322644#: C/index-in.docbook:9853
10878msgid "meson.build in the top-level directory"22645msgid "meson.build in the top-level directory"
n10879msgstr ""n22646msgstr "meson.build i toppnivåkatalogen"
1088022647
10881#. (itstool) path: listitem/para22648#. (itstool) path: listitem/para
10882#: C/index-in.docbook:985722649#: C/index-in.docbook:9857
n10883msgid "It is common for binding modules to track the version number of the libran22650#, fuzzy
>ry they are wrapping. So, for instance, if the C library is at version 1.23.4, t 
>hen the initial version of the binding module would be 1.23.0. However, avoid st 
>arting with an even minor version number as that usually indicates a stable rele 
>ase." 
22651msgid ""
22652"It is common for binding modules to track the version number of the library "
22653"they are wrapping. So, for instance, if the C library is at version 1.23.4, "
22654"then the initial version of the binding module would be 1.23.0. However, "
22655"avoid starting with an even minor version number as that usually indicates a "
22656"stable release."
10884msgstr ""22657msgstr ""
nn22658"Det är vanligt för bindningsmoduler att följa versionsnumret för biblioteket "
22659"de omsluter. Så om exempelvis C-biblioteket är på version 1.23.4 så skulle "
22660"den första versionen av bindningsmodulen vara 1.23.0. Undvik dock att starta "
22661"med ett jämnt versionsnummer för mindre version då det vanligen indikerar en "
22662"stabil utgåva."
1088522663
10886#. (itstool) path: listitem/para22664#. (itstool) path: listitem/para
10887#: C/index-in.docbook:986222665#: C/index-in.docbook:9862
n10888msgid "In the <function>project()</function> function, change the license and thn22666#, fuzzy
>e <phrase role=\"nowrap\">C++</phrase> version, if necessary." 
22667#| msgid ""
22668#| "In the <function>project()</function> function, change the license and "
22669#| "the C++ version, if necessary."
22670msgid ""
22671"In the <function>project()</function> function, change the license and the "
22672"<phrase role=\"nowrap\">C++</phrase> version, if necessary."
10889msgstr ""22673msgstr ""
nn22674"Ändra licensen och C++-versionen i <function>project()</function>-funktionen "
22675"om det behövs."
1089022676
10891#. (itstool) path: listitem/para22677#. (itstool) path: listitem/para
10892#: C/index-in.docbook:986422678#: C/index-in.docbook:9864
n10893msgid "You probably need to add more required modules than <application>glibmm</n22679#, fuzzy
>application> and <application>skeleton</application> (<application>libsomething< 
>/application>)." 
22680msgid ""
22681"You probably need to add more required modules than <application>glibmm</"
22682"application> and <application>skeleton</application> "
22683"(<application>libsomething</application>)."
10894msgstr ""22684msgstr ""
nn22685"Du behöver troligen lägga till fler moduler som krävs än "
22686"<application>glibmm</application> och <application>skeleton</application> "
22687"(<application>libsomething</application>)."
1089522688
10896#. (itstool) path: section/title22689#. (itstool) path: section/title
10897#: C/index-in.docbook:987222690#: C/index-in.docbook:9872
10898msgid "Other meson.build files"22691msgid "Other meson.build files"
n10899msgstr ""n22692msgstr "Andra meson.build-filer"
1090022693
10901#. (itstool) path: listitem/para22694#. (itstool) path: listitem/para
10902#: C/index-in.docbook:987622695#: C/index-in.docbook:9876
nn22696#, fuzzy
22697msgid ""
10903msgid "<filename>skeleton/meson.build</filename>: Perhaps not much to change her22698"<filename>skeleton/meson.build</filename>: Perhaps not much to change here "
>more than the global name substitutions." 
22699"more than the global name substitutions."
10904msgstr ""22700msgstr ""
nn22701"<filename>skeleton/meson.build</filename>: Kanske inte mycket att ändra här "
22702"förutom de globala namnsubstitutionerna."
1090522703
10906#. (itstool) path: listitem/para22704#. (itstool) path: listitem/para
10907#: C/index-in.docbook:987922705#: C/index-in.docbook:9879
10908msgid "<filename>skeleton/skeletonmm/meson.build</filename>"22706msgid "<filename>skeleton/skeletonmm/meson.build</filename>"
n10909msgstr ""n22707msgstr "<filename>skeleton/skeletonmm/meson.build</filename>"
1091022708
10911#. (itstool) path: varlistentry/term22709#. (itstool) path: varlistentry/term
10912#: C/index-in.docbook:988222710#: C/index-in.docbook:9882
nn22711#, fuzzy
10913msgid "<varname>defs_basefiles</varname>"22712msgid "<varname>defs_basefiles</varname>"
n10914msgstr ""n22713msgstr "<varname>defs_basefiles</varname>"
1091522714
10916#. (itstool) path: listitem/para22715#. (itstool) path: listitem/para
10917#: C/index-in.docbook:988322716#: C/index-in.docbook:9883
10918msgid "If we have more .defs and docs.xml files, we add them here."22717msgid "If we have more .defs and docs.xml files, we add them here."
n10919msgstr ""n22718msgstr "Om vi har fler .defs- och docs.xml-filer så lägger vi till dem här."
1092022719
10921#. (itstool) path: varlistentry/term22720#. (itstool) path: varlistentry/term
10922#: C/index-in.docbook:988722721#: C/index-in.docbook:9887
nn22722#, fuzzy
10923msgid "<varname>hg_ccg_basenames</varname>"22723msgid "<varname>hg_ccg_basenames</varname>"
n10924msgstr ""n22724msgstr "<varname>hg_ccg_basenames</varname>"
1092522725
10926#. (itstool) path: listitem/para22726#. (itstool) path: listitem/para
10927#: C/index-in.docbook:988822727#: C/index-in.docbook:9888
nn22728msgid ""
10928msgid "We must mention all of our <filename>.hg</filename> and <filename>.ccg</f22729"We must mention all of our <filename>.hg</filename> and <filename>.ccg</"
>ilename> files here." 
22730"filename> files here."
10929msgstr ""22731msgstr ""
nn22732"Vi måste nämna alla våra <filename>.hg</filename>- och <filename>.ccg</"
22733"filename>-filer här."
1093022734
10931#. (itstool) path: varlistentry/term22735#. (itstool) path: varlistentry/term
10932#: C/index-in.docbook:989222736#: C/index-in.docbook:9892
nn22737#, fuzzy
10933msgid "<varname>extra_cc_files, extra_h_files</varname>"22738msgid "<varname>extra_cc_files, extra_h_files</varname>"
n10934msgstr ""n22739msgstr "<varname>extra_cc_files, extra_h_files</varname>"
1093522740
10936#. (itstool) path: listitem/para22741#. (itstool) path: listitem/para
10937#: C/index-in.docbook:989322742#: C/index-in.docbook:9893
nn22743#, fuzzy
22744msgid ""
10938msgid "Any additional hand-written <filename>.h</filename> and <filename>.cc</fi22745"Any additional hand-written <filename>.h</filename> and <filename>.cc</"
>lename> source files go here." 
22746"filename> source files go here."
10939msgstr ""22747msgstr ""
nn22748"Alla ytterligare handskrivna <filename>.h</filename>- och <filename>.cc</"
22749"filename>-källkodsfiler hamnar här."
1094022750
10941#. (itstool) path: section/para22751#. (itstool) path: section/para
10942#: C/index-in.docbook:987422752#: C/index-in.docbook:9874
nn22753#, fuzzy
22754msgid ""
10943msgid "Next we must adapt the other <filename>meson.build</filename> files: <_:i22755"Next we must adapt the other <filename>meson.build</filename> files: <_:"
>temizedlist-1/>" 
22756"itemizedlist-1/>"
10944msgstr ""22757msgstr ""
nn22758"Härnäst måste vi anpassa de andra <filename>meson.build</filename>-filerna: "
22759"<_:itemizedlist-1/>"
1094522760
10946#. (itstool) path: section/title22761#. (itstool) path: section/title
10947#: C/index-in.docbook:990322762#: C/index-in.docbook:9903
10948msgid "Creating .hg and .ccg files"22763msgid "Creating .hg and .ccg files"
n10949msgstr ""n22764msgstr "Skapa .hg- och .ccg-filer"
1095022765
10951#. (itstool) path: section/para22766#. (itstool) path: section/para
10952#: C/index-in.docbook:990522767#: C/index-in.docbook:9905
n10953msgid "We should now create our first <filename>.hg</filename> and <filename>.ccn22768#, fuzzy
>g</filename> files, to wrap one of the objects in the C library. One pair of exa 
>mple source files already exists: <filename>skeleton.ccg</filename> and <filenam 
>e>skeleton.hg</filename>. Create copies of these files as necessary." 
22769msgid ""
22770"We should now create our first <filename>.hg</filename> and <filename>.ccg</"
22771"filename> files, to wrap one of the objects in the C library. One pair of "
22772"example source files already exists: <filename>skeleton.ccg</filename> and "
22773"<filename>skeleton.hg</filename>. Create copies of these files as necessary."
10954msgstr ""22774msgstr ""
nn22775"Vi ska nu skapa våra första <filename>.hg</filename>- och <filename>.ccg</"
22776"filename>-filer för att omsluta ett av objekten i C-biblioteket. Ett par av "
22777"exempelkällkodsfiler finns redan: <filename>skeleton.ccg</filename> och "
22778"<filename>skeleton.hg</filename>. Skapa kopior av dessa filer efter behov."
1095522779
10956#. (itstool) path: section/para22780#. (itstool) path: section/para
10957#: C/index-in.docbook:990922781#: C/index-in.docbook:9909
n10958msgid "In the <link linkend=\"sec-wrapping-hg-files\">.hg and .ccg files</link> n22782msgid ""
>section you can learn about the syntax used in these files." 
22783"In the <link linkend=\"sec-wrapping-hg-files\">.hg and .ccg files</link> "
22784"section you can learn about the syntax used in these files."
10959msgstr ""22785msgstr ""
nn22786"I avsnittet <link linkend=\"sec-wrapping-hg-files\">.hg- och .ccg-filer</"
22787"link> kan du lära dig om syntaxen som används i dessa filer."
1096022788
10961#. (itstool) path: section/title22789#. (itstool) path: section/title
10962#: C/index-in.docbook:991622790#: C/index-in.docbook:9916
10963msgid "Generating the .defs files."22791msgid "Generating the .defs files."
n10964msgstr ""n22792msgstr "Generera .defs-filerna."
1096522793
10966#. (itstool) path: listitem/para22794#. (itstool) path: listitem/para
10967#: C/index-in.docbook:992122795#: C/index-in.docbook:9921
nn22796#, fuzzy
10968msgid "objects (GObjects, widgets, interfaces, boxed-types and plain structs)"22797msgid "objects (GObjects, widgets, interfaces, boxed-types and plain structs)"
10969msgstr ""22798msgstr ""
nn22799"objekt (GObject, komponenter, gränssnitt, boxed-type och vanliga structar)"
1097022800
10971#. (itstool) path: listitem/para22801#. (itstool) path: listitem/para
10972#: C/index-in.docbook:992222802#: C/index-in.docbook:9922
10973msgid "functions"22803msgid "functions"
n10974msgstr ""n22804msgstr "funktioner"
1097522805
10976#. (itstool) path: listitem/para22806#. (itstool) path: listitem/para
10977#: C/index-in.docbook:992322807#: C/index-in.docbook:9923
nn22808#, fuzzy
10978msgid "enums"22809msgid "enums"
n10979msgstr ""n22810msgstr "uppräkningar"
1098022811
10981#. (itstool) path: listitem/para22812#. (itstool) path: listitem/para
10982#: C/index-in.docbook:992422813#: C/index-in.docbook:9924
10983msgid "signals"22814msgid "signals"
n10984msgstr ""n22815msgstr "signaler"
1098522816
10986#. (itstool) path: listitem/para22817#. (itstool) path: listitem/para
10987#: C/index-in.docbook:992522818#: C/index-in.docbook:9925
10988msgid "properties"22819msgid "properties"
n10989msgstr ""n22820msgstr "egenskaper"
1099022821
10991#. (itstool) path: listitem/para22822#. (itstool) path: listitem/para
10992#: C/index-in.docbook:992622823#: C/index-in.docbook:9926
nn22824#, fuzzy
10993msgid "vfuncs"22825msgid "vfuncs"
n10994msgstr ""n22826msgstr "vfunc-funktioner"
1099522827
10996#. (itstool) path: section/para22828#. (itstool) path: section/para
10997#: C/index-in.docbook:991822829#: C/index-in.docbook:9918
n10998msgid "The <filename>.defs</filename> files are text files, in a lisp format, thn22830msgid ""
>at describe the API of a C library, including its <_:itemizedlist-1/>" 
22831"The <filename>.defs</filename> files are text files, in a lisp format, that "
22832"describe the API of a C library, including its <_:itemizedlist-1/>"
10999msgstr ""22833msgstr ""
nn22834"<filename>.defs</filename>-filerna är textfiler i ett lisp-format som "
22835"beskriver API:t för ett C-bibliotek, inklusive dess <_:itemizedlist-1/>"
1100022836
11001#. (itstool) path: varlistentry/term22837#. (itstool) path: varlistentry/term
11002#: C/index-in.docbook:993522838#: C/index-in.docbook:9935
11003msgid "<filename>gtk.defs</filename>"22839msgid "<filename>gtk.defs</filename>"
n11004msgstr ""n22840msgstr "<filename>gtk.defs</filename>"
1100522841
11006#. (itstool) path: listitem/para22842#. (itstool) path: listitem/para
11007#: C/index-in.docbook:993622843#: C/index-in.docbook:9936
11008msgid "Includes the other files."22844msgid "Includes the other files."
n11009msgstr ""n22845msgstr "Inkluderar de andra filerna."
1101022846
11011#. (itstool) path: varlistentry/term22847#. (itstool) path: varlistentry/term
11012#: C/index-in.docbook:993922848#: C/index-in.docbook:9939
11013msgid "<filename>gtk_methods.defs</filename>"22849msgid "<filename>gtk_methods.defs</filename>"
n11014msgstr ""n22850msgstr "<filename>gtk_methods.defs</filename>"
1101522851
11016#. (itstool) path: listitem/para22852#. (itstool) path: listitem/para
11017#: C/index-in.docbook:994022853#: C/index-in.docbook:9940
11018msgid "Objects and functions."22854msgid "Objects and functions."
n11019msgstr ""n22855msgstr "Objekt och funktioner."
1102022856
11021#. (itstool) path: varlistentry/term22857#. (itstool) path: varlistentry/term
11022#: C/index-in.docbook:994322858#: C/index-in.docbook:9943
11023msgid "<filename>gtk_enums.defs</filename>"22859msgid "<filename>gtk_enums.defs</filename>"
n11024msgstr ""n22860msgstr "<filename>gtk_enums.defs</filename>"
1102522861
11026#. (itstool) path: listitem/para22862#. (itstool) path: listitem/para
11027#: C/index-in.docbook:994422863#: C/index-in.docbook:9944
nn22864#, fuzzy
11028msgid "Enumerations."22865msgid "Enumerations."
n11029msgstr ""n22866msgstr "Uppräkningar."
1103022867
11031#. (itstool) path: varlistentry/term22868#. (itstool) path: varlistentry/term
11032#: C/index-in.docbook:994722869#: C/index-in.docbook:9947
11033msgid "<filename>gtk_signals.defs</filename>"22870msgid "<filename>gtk_signals.defs</filename>"
n11034msgstr ""n22871msgstr "<filename>gtk_signals.defs</filename>"
1103522872
11036#. (itstool) path: listitem/para22873#. (itstool) path: listitem/para
11037#: C/index-in.docbook:994822874#: C/index-in.docbook:9948
11038msgid "Signals and properties."22875msgid "Signals and properties."
n11039msgstr ""n22876msgstr "Signaler och egenskaper."
1104022877
11041#. (itstool) path: varlistentry/term22878#. (itstool) path: varlistentry/term
11042#: C/index-in.docbook:995122879#: C/index-in.docbook:9951
11043msgid "<filename>gtk_vfuncs.defs</filename>"22880msgid "<filename>gtk_vfuncs.defs</filename>"
n11044msgstr ""n22881msgstr "<filename>gtk_vfuncs.defs</filename>"
1104522882
11046#. (itstool) path: listitem/para22883#. (itstool) path: listitem/para
11047#: C/index-in.docbook:995222884#: C/index-in.docbook:9952
nn22885#, fuzzy
11048msgid "vfuncs (function pointer member fields in structs), written by hand."22886msgid "vfuncs (function pointer member fields in structs), written by hand."
n11049msgstr ""n22887msgstr "vfunc (medlemsfält för funktionspekare i structar), handskrivna."
1105022888
11051#. (itstool) path: section/para22889#. (itstool) path: section/para
11052#: C/index-in.docbook:992922890#: C/index-in.docbook:9929
n11053msgid "At the moment, we have separate tools for generating different parts of tn22891msgid ""
>hese <filename>.defs</filename>, so we split them up into separate files. For in 
>stance, in the <filename>gtk/src</filename> directory of the <application>gtkmm< 
>/application> sources, you will find these files: <_:variablelist-1/>" 
22892"At the moment, we have separate tools for generating different parts of "
22893"these <filename>.defs</filename>, so we split them up into separate files. "
22894"For instance, in the <filename>gtk/src</filename> directory of the "
22895"<application>gtkmm</application> sources, you will find these files: <_:"
22896"variablelist-1/>"
11054msgstr ""22897msgstr ""
nn22898"För tillfället har vi olika verktyg för att generera olika delar av dessa "
22899"<filename>.defs</filename>, så vi delar upp dem i separata filer. I "
22900"<filename>gtk/src</filename>-katalogen för <application>gtkmm</application>-"
22901"källkoden kommer du exempelvis hitta dessa filer: <_:variablelist-1/>"
1105522902
11056#. (itstool) path: section/para22903#. (itstool) path: section/para
11057#: C/index-in.docbook:995622904#: C/index-in.docbook:9956
n11058msgid "The <filename>skeletonmm/tools/generate_defs_and_docs.sh</filename> scripn22905#, fuzzy
>t generates all <filename>.defs</filename> files and the <filename>*_docs.xml</f 
>ilename> file, described in the <link linkend=\"sec-wrapping-documentation\">Doc 
>umentation</link> section." 
22906msgid ""
22907"The <filename>skeletonmm/tools/generate_defs_and_docs.sh</filename> script "
22908"generates all <filename>.defs</filename> files and the <filename>*_docs.xml</"
22909"filename> file, described in the <link linkend=\"sec-wrapping-"
22910"documentation\">Documentation</link> section."
11059msgstr ""22911msgstr ""
nn22912"Skriptet <filename>skeletonmm/tools/generate_defs_and_docs.sh</filename> "
22913"genererar alla <filename>.defs</filename>-filer och <filename>*_docs.xml</"
22914"filename>-filen, beskriven i avsnittet <link linkend=\"sec-wrapping-"
22915"documentation\">Dokumentation</link>."
1106022916
11061#. (itstool) path: section/title22917#. (itstool) path: section/title
11062#: C/index-in.docbook:996222918#: C/index-in.docbook:9962
nn22919#, fuzzy
11063msgid "Generating the methods .defs"22920msgid "Generating the methods .defs"
n11064msgstr ""n22921msgstr "Generera .defs för metoderna"
1106522922
11066#. (itstool) path: section/para22923#. (itstool) path: section/para
11067#: C/index-in.docbook:996422924#: C/index-in.docbook:9964
n11068msgid "This <filename>.defs</filename> file describes objects and their functionn22925msgid ""
>s. It is generated by the <command>h2def.py</command> script which you can find  
>in glibmm's <filename>tools/defs_gen</filename> directory. For instance," 
22926"This <filename>.defs</filename> file describes objects and their functions. "
22927"It is generated by the <command>h2def.py</command> script which you can find "
22928"in glibmm's <filename>tools/defs_gen</filename> directory. For instance,"
11069msgstr ""22929msgstr ""
nn22930"Denna <filename>.defs</filename>-fil beskriver objekt och deras funktioner. "
22931"Den genereras av <command>h2def.py</command>-skriptet som du kan hitta i "
22932"glibmm:s <filename>tools/defs_gen</filename>-katalog. Till exempel,"
1107022933
11071#. (itstool) path: section/programlisting22934#. (itstool) path: section/programlisting
11072#: C/index-in.docbook:996822935#: C/index-in.docbook:9968
n11073#, no-wrapn22936#, fuzzy, no-wrap
22937#| msgid ""
22938#| "\n"
22939#| "$ ./h2def.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_methods.defs\n"
11074msgid ""22940msgid ""
11075"<code>$ ./h2def.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_methods.defs\n"22941"<code>$ ./h2def.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_methods.defs\n"
11076"</code>"22942"</code>"
11077msgstr ""22943msgstr ""
nn22944"\n"
22945"$ ./h2def.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_methods.defs\n"
1107822946
11079#. (itstool) path: section/title22947#. (itstool) path: section/title
11080#: C/index-in.docbook:997322948#: C/index-in.docbook:9973
nn22949#, fuzzy
11081msgid "Generating the enums .defs"22950msgid "Generating the enums .defs"
n11082msgstr ""n22951msgstr "Generera .defs för enumerationerna"
1108322952
11084#. (itstool) path: section/para22953#. (itstool) path: section/para
11085#: C/index-in.docbook:997522954#: C/index-in.docbook:9975
n11086msgid "This <filename>.defs</filename> file describes enum types and their possin22955#, fuzzy
>ble values. It is generated by the <filename>enumextract.py</filename> script wh 
>ich you can also find in glibmm's <filename>tools/defs_gen</filename> directory. 
> For instance," 
22956msgid ""
22957"This <filename>.defs</filename> file describes enum types and their possible "
22958"values. It is generated by the <filename>enumextract.py</filename> script "
22959"which you can also find in glibmm's <filename>tools/defs_gen</filename> "
22960"directory. For instance,"
11087msgstr ""22961msgstr ""
nn22962"Denna <filename>.defs</filename>-fil beskriver uppräkningstyper och deras "
22963"möjliga värden. Den genereras av <filename>enumextract.py</filename>-"
22964"skriptet som du också kan hitta i glibmm:s <filename>tools/defs_gen</"
22965"filename>-katalog. Till exempel,"
1108822966
11089#. (itstool) path: section/programlisting22967#. (itstool) path: section/programlisting
11090#: C/index-in.docbook:997922968#: C/index-in.docbook:9979
n11091#, no-wrapn22969#, fuzzy, no-wrap
22970#| msgid ""
22971#| "\n"
22972#| "$ ./enumextract.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_enums.defs\n"
11092msgid ""22973msgid ""
11093"<code>$ ./enumextract.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_enums.defs\n"22974"<code>$ ./enumextract.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_enums.defs\n"
11094"</code>"22975"</code>"
11095msgstr ""22976msgstr ""
nn22977"\n"
22978"$ ./enumextract.py /usr/include/gtk-4.0/gtk/*.h &gt; gtk_enums.defs\n"
1109622979
11097#. (itstool) path: section/title22980#. (itstool) path: section/title
11098#: C/index-in.docbook:998422981#: C/index-in.docbook:9984
nn22982#, fuzzy
11099msgid "Generating the signals and properties .defs"22983msgid "Generating the signals and properties .defs"
n11100msgstr ""n22984msgstr "Generera .defs för signalerna och egenskaperna"
1110122985
11102#. (itstool) path: section/para22986#. (itstool) path: section/para
11103#: C/index-in.docbook:998622987#: C/index-in.docbook:9986
n11104msgid "This <filename>.defs</filename> file describes signals and properties. Itn22988#, fuzzy
> is generated by the special <filename>generate_extra_defs</filename> utility th 
>at is in every wrapping project, such as <filename>gtkmm/tools/extra_defs_gen/</ 
>filename>. For instance" 
22989msgid ""
22990"This <filename>.defs</filename> file describes signals and properties. It is "
22991"generated by the special <filename>generate_extra_defs</filename> utility "
22992"that is in every wrapping project, such as <filename>gtkmm/tools/"
22993"extra_defs_gen/</filename>. For instance"
11105msgstr ""22994msgstr ""
nn22995"Denna <filename>.defs</filename>-fil beskriver signaler och egenskaper. Den "
22996"genereras av den speciella verktyget <filename>generate_extra_defs</"
22997"filename> som finns i varje omslagsprojekt, som <filename>gtkmm/tools/"
22998"extra_defs_gen/</filename>. Till exempel"
1110622999
11107#. (itstool) path: section/programlisting23000#. (itstool) path: section/programlisting
11108#: C/index-in.docbook:999123001#: C/index-in.docbook:9991
n11109#, no-wrapn23002#, fuzzy, no-wrap
23003#| msgid ""
23004#| "\n"
23005#| "$ cd tools/extra_defs_gen\n"
23006#| "$ ./generate_extra_defs &gt; gtk_signals.defs\n"
11110msgid ""23007msgid ""
11111"<code>$ cd tools/extra_defs_gen\n"23008"<code>$ cd tools/extra_defs_gen\n"
11112"$ ./generate_extra_defs &gt; gtk_signals.defs\n"23009"$ ./generate_extra_defs &gt; gtk_signals.defs\n"
11113"</code>"23010"</code>"
11114msgstr ""23011msgstr ""
nn23012"\n"
23013"$ cd tools/extra_defs_gen\n"
23014"$ ./generate_extra_defs &gt; gtk_signals.defs\n"
1111523015
11116#. (itstool) path: section/para23016#. (itstool) path: section/para
11117#: C/index-in.docbook:999423017#: C/index-in.docbook:9994
n11118msgid "You must edit the source code of your own <filename>generate_extra_defs</n23018#, fuzzy
>filename> tool in order to generate the <filename>.defs</filename> for the GObje 
>ct C types that you wish to wrap. In the skeleton source tree, the source file i 
>s named <filename>tools/extra_defs_gen/generate_defs_skeleton.cc</filename>. If  
>not done so already, the file should be renamed, with the basename of your new b 
>inding substituted for the <varname>skeleton</varname> placeholder. The <filenam 
>e>tools/extra_defs_gen/meson.build</filename> file should also mention the new s 
>ource filename." 
23019msgid ""
23020"You must edit the source code of your own <filename>generate_extra_defs</"
23021"filename> tool in order to generate the <filename>.defs</filename> for the "
23022"GObject C types that you wish to wrap. In the skeleton source tree, the "
23023"source file is named <filename>tools/extra_defs_gen/generate_defs_skeleton."
23024"cc</filename>. If not done so already, the file should be renamed, with the "
23025"basename of your new binding substituted for the <varname>skeleton</varname> "
23026"placeholder. The <filename>tools/extra_defs_gen/meson.build</filename> file "
23027"should also mention the new source filename."
11119msgstr ""23028msgstr ""
nn23029"Du måste redigera källkoden för ditt eget <filename>generate_extra_defs</"
23030"filename>-verktyg för att generera <filename>.defs</filename>-filen för "
23031"GObject C-typerna som du vill omsluta. I skelettkällkodsträdet har källfilen "
23032"namnet <filename>tools/extra_defs_gen/generate_defs_skeleton.cc</filename>. "
23033"Om så inte redan gjorts ska filens namn bytas, så att basnamnet för din nya "
23034"bindning ersätter platshållaren <varname>skeleton</varname>. Filen "
23035"<filename>tools/extra_defs_gen/meson.build</filename> ska också nämna det "
23036"nya källfilnamnet."
1112023037
11121#. (itstool) path: section/para23038#. (itstool) path: section/para
11122#: C/index-in.docbook:1000123039#: C/index-in.docbook:10001
n11123msgid "Then edit the <filename>.cc</filename> file to specify the correct types.n23040#, fuzzy
> For instance, your <function>main()</function> function might look like this:" 
23041msgid ""
23042"Then edit the <filename>.cc</filename> file to specify the correct types. "
23043"For instance, your <function>main()</function> function might look like this:"
11124msgstr ""23044msgstr ""
nn23045"Redigera sedan <filename>.cc</filename>-filen för att ange rätt typer. Till "
23046"exempel kan din <function>main()</function>-funktion se ut så här:"
1112523047
11126#. (itstool) path: section/programlisting23048#. (itstool) path: section/programlisting
11127#: C/index-in.docbook:1000423049#: C/index-in.docbook:10004
n11128#, no-wrapn23050#, fuzzy, no-wrap
23051#| msgid ""
23052#| "\n"
23053#| "#include &lt;glibmm_generate_extra_defs/generate_extra_defs.h&gt;\n"
23054#| "#include &lt;libsomething.h&gt;\n"
23055#| "#include &lt;iostream&gt;\n"
23056#| "\n"
23057#| "int main(int, char**)\n"
23058#| "{\n"
23059#| "  something_init();\n"
23060#| "\n"
23061#| "  std::cout &lt;&lt; get_defs(SOME_TYPE_WIDGET)\n"
23062#| "            &lt;&lt; get_defs(SOME_TYPE_STUFF);\n"
23063#| "  return 0;\n"
23064#| "}\n"
11129msgid ""23065msgid ""
11130"<code>#include &lt;glibmm_generate_extra_defs/generate_extra_defs.h&gt;\n"23066"<code>#include &lt;glibmm_generate_extra_defs/generate_extra_defs.h&gt;\n"
11131"#include &lt;libsomething.h&gt;\n"23067"#include &lt;libsomething.h&gt;\n"
11132"#include &lt;iostream&gt;\n"23068"#include &lt;iostream&gt;\n"
11133"\n"23069"\n"
11139"            &lt;&lt; get_defs(SOME_TYPE_STUFF);\n"23075"            &lt;&lt; get_defs(SOME_TYPE_STUFF);\n"
11140"  return 0;\n"23076"  return 0;\n"
11141"}\n"23077"}\n"
11142"</code>"23078"</code>"
11143msgstr ""23079msgstr ""
nn23080"\n"
23081"#include &lt;glibmm_generate_extra_defs/generate_extra_defs.h&gt;\n"
23082"#include &lt;libsomething.h&gt;\n"
23083"#include &lt;iostream&gt;\n"
23084"\n"
23085"int main(int, char**)\n"
23086"{\n"
23087"  something_init();\n"
23088"\n"
23089"  std::cout &lt;&lt; get_defs(SOME_TYPE_WIDGET)\n"
23090"            &lt;&lt; get_defs(SOME_TYPE_STUFF);\n"
23091"  return 0;\n"
23092"}\n"
1114423093
11145#. (itstool) path: section/title23094#. (itstool) path: section/title
11146#: C/index-in.docbook:1002023095#: C/index-in.docbook:10020
nn23096#, fuzzy
11147msgid "Writing the vfuncs .defs"23097msgid "Writing the vfuncs .defs"
n11148msgstr ""n23098msgstr "Skriva .defs-filer för vfunc"
1114923099
11150#. (itstool) path: section/para23100#. (itstool) path: section/para
11151#: C/index-in.docbook:1002223101#: C/index-in.docbook:10022
n11152msgid "This <filename>.defs</filename> file describes virtual functions (vfuncs)n23102#, fuzzy
>. It must be written by hand. There is the skeleton file <filename>skeleton/src/ 
>skeleton_vfunc.defs</filename> to start from. You can also look at <application> 
>gtkmm</application>'s <filename>gtk/src/gtk_vfuncs.defs</filename> file." 
23103msgid ""
23104"This <filename>.defs</filename> file describes virtual functions (vfuncs). "
23105"It must be written by hand. There is the skeleton file <filename>skeleton/"
23106"src/skeleton_vfunc.defs</filename> to start from. You can also look at "
23107"<application>gtkmm</application>'s <filename>gtk/src/gtk_vfuncs.defs</"
23108"filename> file."
11153msgstr ""23109msgstr ""
nn23110"Denna <filename>.defs</filename>-fil beskriver virtuella funktioner (vfunc). "
23111"Den måste skrivas för hand. Det finns en skelettfil <filename>skeleton/src/"
23112"skeleton_vfunc.defs</filename> att börja från. Du kan också titta på "
23113"<application>gtkmm</application>:s fil <filename>gtk/src/gtk_vfuncs.defs</"
23114"filename>."
1115423115
11155#. (itstool) path: section/title23116#. (itstool) path: section/title
11156#: C/index-in.docbook:1003323117#: C/index-in.docbook:10033
11157msgid "The .hg and .ccg files"23118msgid "The .hg and .ccg files"
n11158msgstr ""n23119msgstr ".hg- och .ccg-filerna"
1115923120
11160#. (itstool) path: section/para23121#. (itstool) path: section/para
11161#: C/index-in.docbook:1003423122#: C/index-in.docbook:10034
n11162msgid "The .hg and .ccg source files are very much like .h and .cc <phrase role=n23123#, fuzzy
>\"nowrap\">C++</phrase> source files, but they contain extra macros, such as <fu 
>nction>_CLASS_GOBJECT()</function> and <function>_WRAP_METHOD()</function>, from 
> which <command>gmmproc</command> generates appropriate <phrase role=\"nowrap\"> 
>C++</phrase> source code, usually at the same position in the header. Any additi 
>onal <phrase role=\"nowrap\">C++</phrase> source code will be copied verbatim in 
>to the corresponding .h or .cc file." 
23124#| msgid ""
23125#| "The .hg and .ccg source files are very much like .h and .cc C++ source "
23126#| "files, but they contain extra macros, such as <function>_CLASS_GOBJECT()</"
23127#| "function> and <function>_WRAP_METHOD()</function>, from which "
23128#| "<command>gmmproc</command> generates appropriate C++ source code, usually "
23129#| "at the same position in the header. Any additional C++ source code will "
23130#| "be copied verbatim into the corresponding .h or .cc file."
23131msgid ""
23132"The .hg and .ccg source files are very much like .h and .cc <phrase "
23133"role=\"nowrap\">C++</phrase> source files, but they contain extra macros, "
23134"such as <function>_CLASS_GOBJECT()</function> and <function>_WRAP_METHOD()</"
23135"function>, from which <command>gmmproc</command> generates appropriate "
23136"<phrase role=\"nowrap\">C++</phrase> source code, usually at the same "
23137"position in the header. Any additional <phrase role=\"nowrap\">C++</phrase> "
23138"source code will be copied verbatim into the corresponding .h or .cc file."
11163msgstr ""23139msgstr ""
nn23140".hg- och .ccg-källfilerna är mycket som .h- och .cc-källfiler i C++, men de "
23141"innehåller extra makron som <function>_CLASS_GOBJECT()</function> och "
23142"<function>_WRAP_METHOD()</function> från vilka <command>gmmproc</command> "
23143"genererar lämplig C++-källkod, vanligen på samma plats i huvudet. All "
23144"ytterligare C++-källkod kommer kopieras som den är i motsvarande .h- eller ."
23145"cc-fil."
1116423146
11165#. (itstool) path: section/para23147#. (itstool) path: section/para
11166#: C/index-in.docbook:1004223148#: C/index-in.docbook:10042
n11167msgid "A .hg file will typically include some headers and then declare a class, n23149#, fuzzy
>using some macros to add API or behavior to this class. For instance, <applicati 
>on>gtkmm</application>'s <filename>button.hg</filename> looks roughly like this: 
>" 
23150msgid ""
23151"A .hg file will typically include some headers and then declare a class, "
23152"using some macros to add API or behavior to this class. For instance, "
23153"<application>gtkmm</application>'s <filename>button.hg</filename> looks "
23154"roughly like this:"
11168msgstr ""23155msgstr ""
nn23156"En .hg-fil kommer typiskt inkludera några huvuden och sedan deklarera en "
23157"klass, men några makron för att lägga till API eller beteende till denna "
23158"klass. Exempelvis ser <application>gtkmm</application>s <filename>button.hg</"
23159"filename> ut ungefär så här:"
1116923160
11170#. (itstool) path: section/programlisting23161#. (itstool) path: section/programlisting
11171#: C/index-in.docbook:1004723162#: C/index-in.docbook:10047
n11172#, no-wrapn23163#, fuzzy, no-wrap
23164#| msgid ""
23165#| "\n"
23166#| "#include &lt;gtkmm/widget.h&gt;\n"
23167#| "#include &lt;gtkmm/actionable.h&gt;\n"
23168#| "_DEFS(gtkmm,gtk)\n"
23169#| "_PINCLUDE(gtkmm/private/widget_p.h)\n"
23170#| "\n"
23171#| "namespace Gtk\n"
23172#| "{\n"
23173#| "\n"
23174#| "class Button\n"
23175#| "  : public Widget,\n"
23176#| "    public Actionable\n"
23177#| "{\n"
23178#| "  _CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Widget, GtkWidget)\n"
23179#| "  _IMPLEMENTS_INTERFACE(Actionable)\n"
23180#| "public:\n"
23181#| "\n"
23182#| "  _CTOR_DEFAULT\n"
23183#| "  explicit Button(const Glib::ustring&amp; label, bool mnemonic = false);\n"
23184#| "\n"
23185#| "  _WRAP_METHOD(void set_label(const Glib::ustring&amp; label), gtk_button_se
 >t_label)\n"
23186#| "\n"
23187#| "  ...\n"
23188#| "\n"
23189#| "  _WRAP_SIGNAL(void clicked(), \"clicked\")\n"
23190#| "\n"
23191#| "  ...\n"
23192#| "\n"
23193#| "  _WRAP_PROPERTY(\"label\", Glib::ustring)\n"
23194#| "};\n"
23195#| "\n"
23196#| "} // namespace Gtk\n"
11173msgid ""23197msgid ""
11174"<code>#include &lt;gtkmm/widget.h&gt;\n"23198"<code>#include &lt;gtkmm/widget.h&gt;\n"
11175"#include &lt;gtkmm/actionable.h&gt;\n"23199"#include &lt;gtkmm/actionable.h&gt;\n"
11176"_DEFS(gtkmm,gtk)\n"23200"_DEFS(gtkmm,gtk)\n"
11177"_PINCLUDE(gtkmm/private/widget_p.h)\n"23201"_PINCLUDE(gtkmm/private/widget_p.h)\n"
11202"};\n"23226"};\n"
11203"\n"23227"\n"
11204"} // namespace Gtk\n"23228"} // namespace Gtk\n"
11205"</code>"23229"</code>"
11206msgstr ""23230msgstr ""
nn23231"\n"
23232"#include &lt;gtkmm/widget.h&gt;\n"
23233"#include &lt;gtkmm/actionable.h&gt;\n"
23234"_DEFS(gtkmm,gtk)\n"
23235"_PINCLUDE(gtkmm/private/widget_p.h)\n"
23236"\n"
23237"namespace Gtk\n"
23238"{\n"
23239"\n"
23240"class Button\n"
23241"  : public Widget,\n"
23242"    public Actionable\n"
23243"{\n"
23244"  _CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Widget, GtkWidget)\n"
23245"  _IMPLEMENTS_INTERFACE(Actionable)\n"
23246"public:\n"
23247"\n"
23248"  _CTOR_DEFAULT\n"
23249"  explicit Button(const Glib::ustring&amp; label, bool mnemonic = false);\n"
23250"\n"
23251"  _WRAP_METHOD(void set_label(const Glib::ustring&amp; label), gtk_button_set_l
 >abel)\n"
23252"\n"
23253"  ...\n"
23254"\n"
23255"  _WRAP_SIGNAL(void clicked(), \"clicked\")\n"
23256"\n"
23257"  ...\n"
23258"\n"
23259"  _WRAP_PROPERTY(\"label\", Glib::ustring)\n"
23260"};\n"
23261"\n"
23262"} // namespace Gtk\n"
1120723263
11208#. (itstool) path: varlistentry/term23264#. (itstool) path: varlistentry/term
11209#: C/index-in.docbook:1008223265#: C/index-in.docbook:10082
11210msgid "<function>_DEFS()</function>"23266msgid "<function>_DEFS()</function>"
n11211msgstr ""n23267msgstr "<function>_DEFS()</function>"
1121223268
11213#. (itstool) path: listitem/para23269#. (itstool) path: listitem/para
11214#: C/index-in.docbook:1008323270#: C/index-in.docbook:10083
n11215msgid "Specifies the destination directory for generated sources, and the name on23271#, fuzzy
>f the main .defs file that <command>gmmproc</command> should parse." 
23272msgid ""
23273"Specifies the destination directory for generated sources, and the name of "
23274"the main .defs file that <command>gmmproc</command> should parse."
11216msgstr ""23275msgstr ""
nn23276"Anger målkatalogen för genererade källor, och namnet på den huvudsakliga ."
23277"defs-filen som <command>gmmproc</command> ska tolka."
1121723278
11218#. (itstool) path: varlistentry/term23279#. (itstool) path: varlistentry/term
11219#: C/index-in.docbook:1008623280#: C/index-in.docbook:10086
11220msgid "<function>_PINCLUDE()</function>"23281msgid "<function>_PINCLUDE()</function>"
n11221msgstr ""n23282msgstr "<function>_PINCLUDE()</function>"
1122223283
11223#. (itstool) path: listitem/para23284#. (itstool) path: listitem/para
11224#: C/index-in.docbook:1008723285#: C/index-in.docbook:10087
n11225msgid "Tells <command>gmmproc</command> to include a header in the generated <fin23286#, fuzzy
>lename>private/button_p.h</filename> file." 
23287msgid ""
23288"Tells <command>gmmproc</command> to include a header in the generated "
23289"<filename>private/button_p.h</filename> file."
11226msgstr ""23290msgstr ""
nn23291"Säger till <command>gmmproc</command> att inkludera ett huvud i den "
23292"genererade filen <filename>private/button_p.h</filename>."
1122723293
11228#. (itstool) path: varlistentry/term23294#. (itstool) path: varlistentry/term
11229#: C/index-in.docbook:1009023295#: C/index-in.docbook:10090
11230msgid "<function>_CLASS_GTKOBJECT()</function>"23296msgid "<function>_CLASS_GTKOBJECT()</function>"
n11231msgstr ""n23297msgstr "<function>_CLASS_GTKOBJECT()</function>"
1123223298
11233#. (itstool) path: listitem/para23299#. (itstool) path: listitem/para
11234#: C/index-in.docbook:1009123300#: C/index-in.docbook:10091
n11235msgid "Tells <command>gmmproc</command> to add some typedefs, constructors, and n23301#, fuzzy
>standard methods to this class, as appropriate when wrapping a widget." 
23302msgid ""
23303"Tells <command>gmmproc</command> to add some typedefs, constructors, and "
23304"standard methods to this class, as appropriate when wrapping a widget."
11236msgstr ""23305msgstr ""
nn23306"Säger till <command>gmmproc</command> att lägga till typdefinitioner, "
23307"konstruktorer och standardmetoder till denna klass, som lämpligt vid omslag "
23308"av en komponent."
1123723309
11238#. (itstool) path: varlistentry/term23310#. (itstool) path: varlistentry/term
11239#: C/index-in.docbook:1009423311#: C/index-in.docbook:10094
11240msgid "<function>_IMPLEMENTS_INTERFACE()</function>"23312msgid "<function>_IMPLEMENTS_INTERFACE()</function>"
n11241msgstr ""n23313msgstr "<function>_IMPLEMENTS_INTERFACE()</function>"
1124223314
11243#. (itstool) path: listitem/para23315#. (itstool) path: listitem/para
11244#: C/index-in.docbook:1009523316#: C/index-in.docbook:10095
nn23317msgid ""
11245msgid "Tells <command>gmmproc</command> to add initialization code for the inter23318"Tells <command>gmmproc</command> to add initialization code for the "
>face." 
23319"interface."
11246msgstr ""23320msgstr ""
nn23321"Säger till <command>gmmproc</command> att lägga till initieringskod för "
23322"gränssnittet."
1124723323
11248#. (itstool) path: varlistentry/term23324#. (itstool) path: varlistentry/term
11249#: C/index-in.docbook:1009823325#: C/index-in.docbook:10098
11250msgid "<function>_CTOR_DEFAULT</function>"23326msgid "<function>_CTOR_DEFAULT</function>"
n11251msgstr ""n23327msgstr "<function>_CTOR_DEFAULT</function>"
1125223328
11253#. (itstool) path: listitem/para23329#. (itstool) path: listitem/para
11254#: C/index-in.docbook:1009923330#: C/index-in.docbook:10099
11255msgid "Adds a default constructor."23331msgid "Adds a default constructor."
n11256msgstr ""n23332msgstr "Lägger till en standardkonstruktor."
1125723333
11258#. (itstool) path: varlistentry/term23334#. (itstool) path: varlistentry/term
11259#: C/index-in.docbook:1010223335#: C/index-in.docbook:10102
nn23336msgid ""
11260msgid "<function>_WRAP_METHOD()</function>, <function>_WRAP_SIGNAL()</function>,23337"<function>_WRAP_METHOD()</function>, <function>_WRAP_SIGNAL()</function>, "
> and <function>_WRAP_PROPERTY()</function>" 
23338"and <function>_WRAP_PROPERTY()</function>"
11261msgstr ""23339msgstr ""
nn23340"<function>_WRAP_METHOD()</function>, <function>_WRAP_SIGNAL()</function> och "
23341"<function>_WRAP_PROPERTY()</function>"
1126223342
11263#. (itstool) path: listitem/para23343#. (itstool) path: listitem/para
11264#: C/index-in.docbook:1010523344#: C/index-in.docbook:10105
nn23345#, fuzzy
11265msgid "Add methods to wrap parts of the C API."23346msgid "Add methods to wrap parts of the C API."
n11266msgstr ""n23347msgstr "Lägger till metoder för att omsluta delar av C-API:t."
1126723348
11268#. (itstool) path: section/para23349#. (itstool) path: section/para
11269#: C/index-in.docbook:1007923350#: C/index-in.docbook:10079
11270msgid "The macros in this example do the following: <_:variablelist-1/>"23351msgid "The macros in this example do the following: <_:variablelist-1/>"
n11271msgstr ""n23352msgstr "Makrona i detta exempel gör följande: <_:variablelist-1/>"
1127223353
11273#. (itstool) path: section/para23354#. (itstool) path: section/para
11274#: C/index-in.docbook:1010923355#: C/index-in.docbook:10109
n11275msgid "The .h and .cc files will be generated from the .hg and .ccg files by pron23356#, fuzzy
>cessing them with <command>gmmproc</command> like so, though this happens automa 
>tically when using the above build structure:" 
23357msgid ""
23358"The .h and .cc files will be generated from the .hg and .ccg files by "
23359"processing them with <command>gmmproc</command> like so, though this happens "
23360"automatically when using the above build structure:"
11276msgstr ""23361msgstr ""
nn23362".h- och .cc-filerna kommer genereras från .hg- och .ccg-filerna genom att "
23363"bearbeta dem med <command>gmmproc</command> så här, men detta händer "
23364"automatiskt när byggstrukturen ovan används:"
1127723365
11278#. (itstool) path: section/programlisting23366#. (itstool) path: section/programlisting
11279#: C/index-in.docbook:1011323367#: C/index-in.docbook:10113
n11280#, no-wrapn23368#, fuzzy, no-wrap
23369#| msgid ""
23370#| "\n"
23371#| "$ cd gtk/src\n"
23372#| "$ /usr/lib/glibmm-2.68/proc/gmmproc -I ../../tools/m4 --defs . button . ./..
 >/gtkmm\n"
11281msgid ""23373msgid ""
11282"<code>$ cd gtk/src\n"23374"<code>$ cd gtk/src\n"
11283"$ /usr/lib/glibmm-2.68/proc/gmmproc -I ../../tools/m4 --defs . button . ./../gt23375"$ /usr/lib/glibmm-2.68/proc/gmmproc -I ../../tools/m4 --defs . button . ./../gt
>kmm\n">kmm\n"
11284"</code>"23376"</code>"
11285msgstr ""23377msgstr ""
nn23378"\n"
23379"$ cd gtk/src\n"
23380"$ /usr/lib/glibmm-2.68/proc/gmmproc -I ../../tools/m4 --defs . button . ./../gt
 >kmm\n"
1128623381
11287#. (itstool) path: section/para23382#. (itstool) path: section/para
11288#: C/index-in.docbook:1011623383#: C/index-in.docbook:10116
n11289msgid "Notice that we provided <command>gmmproc</command> with the path to the .n23384#, fuzzy
>m4 convert files, the path to the .defs file, the name of a .hg file, the source 
> directory, and the destination directory." 
23385msgid ""
23386"Notice that we provided <command>gmmproc</command> with the path to the .m4 "
23387"convert files, the path to the .defs file, the name of a .hg file, the "
23388"source directory, and the destination directory."
11290msgstr ""23389msgstr ""
nn23390"Observera att vi tillhandahöll <command>gmmproc</command> med sökvägen till ."
23391"m4-konverteringsfilerna, sökvägen till .defs-filen, namnet på en .hg-fil, "
23392"källkatalogen och målkatalogen."
1129123393
11292#. (itstool) path: section/para23394#. (itstool) path: section/para
11293#: C/index-in.docbook:1011923395#: C/index-in.docbook:10119
n11294msgid "You should avoid including the C header from your <phrase role=\"nowrap\"n23396#, fuzzy
>>C++</phrase> header, to avoid polluting the global namespace, and to avoid expo 
>rting unnecessary public API. But you will need to include the necessary C heade 
>rs from your .ccg file." 
23397msgid ""
23398"You should avoid including the C header from your <phrase role=\"nowrap\">C+"
23399"+</phrase> header, to avoid polluting the global namespace, and to avoid "
23400"exporting unnecessary public API. But you will need to include the necessary "
23401"C headers from your .ccg file."
11295msgstr ""23402msgstr ""
nn23403"Du bör undvika att inkludera C-huvudet från ditt C++-huvud, för att undvika "
23404"att förorena den globala namnrymden, och för att undvika att exportera öppet "
23405"API i onödan. Men du kommer behöva inkludera de nödvändiga C-huvudena från "
23406"din .ccg-fil."
1129623407
11297#. (itstool) path: section/para23408#. (itstool) path: section/para
11298#: C/index-in.docbook:1012423409#: C/index-in.docbook:10124
11299msgid "The macros are explained in more detail in the following sections."23410msgid "The macros are explained in more detail in the following sections."
n11300msgstr ""n23411msgstr "Makrona förklaras mer i detalj i avsnitten som följer."
1130123412
11302#. (itstool) path: section/title23413#. (itstool) path: section/title
11303#: C/index-in.docbook:1012723414#: C/index-in.docbook:10127
11304msgid "m4 Conversions"23415msgid "m4 Conversions"
n11305msgstr ""n23416msgstr "m4-konverteringar"
1130623417
11307#. (itstool) path: section/para23418#. (itstool) path: section/para
11308#: C/index-in.docbook:1012923419#: C/index-in.docbook:10129
n11309msgid "The macros that you use in the .hg and .ccg files often need to know how n23420#, fuzzy
>to convert a <phrase role=\"nowrap\">C++</phrase> type to a C type, or vice-vers 
>a. <command>gmmproc</command> takes this information from an .m4 file in your <l 
>iteral>tools/m4/</literal> or <literal>codegen/m4/</literal> directory. This all 
>ows it to call a C function in the implementation of your <phrase role=\"nowrap\ 
>">C++</phrase> method, passing the appropriate parameters to that C function. Fo 
>r instance, this tells <command>gmmproc</command> how to convert a <classname>Gt 
>kTreeView</classname> pointer to a <classname>Gtk::TreeView</classname> pointer: 
>" 
23421msgid ""
23422"The macros that you use in the .hg and .ccg files often need to know how to "
23423"convert a <phrase role=\"nowrap\">C++</phrase> type to a C type, or vice-"
23424"versa. <command>gmmproc</command> takes this information from an .m4 file in "
23425"your <literal>tools/m4/</literal> or <literal>codegen/m4/</literal> "
23426"directory. This allows it to call a C function in the implementation of your "
23427"<phrase role=\"nowrap\">C++</phrase> method, passing the appropriate "
23428"parameters to that C function. For instance, this tells <command>gmmproc</"
23429"command> how to convert a <classname>GtkTreeView</classname> pointer to a "
23430"<classname>Gtk::TreeView</classname> pointer:"
11310msgstr ""23431msgstr ""
nn23432"Makrona som du använder i .hg- och .ccg-filerna behöver ofta veta hur de ska "
23433"konvertera en C++-typ till en C-typ och omvänt. <command>gmmproc</command> "
23434"tar denna information från en .m4-fil i din katalog <literal>tools/m4/</"
23435"literal> eller <literal>codegen/m4/</literal>. Detta låter det anropa en C-"
23436"funktion i implementationen av din C++-metod, skickade de lämpliga "
23437"parametrarna till den C-funktionen. Exempelvis säger det här till "
23438"<command>gmmproc</command> hur en <classname>GtkTreeView</classname>-pekare "
23439"konverteras till en <classname>Gtk::TreeView</classname>-pekare:"
1131123440
11312#. (itstool) path: section/programlisting23441#. (itstool) path: section/programlisting
11313#: C/index-in.docbook:1013723442#: C/index-in.docbook:10137
n11314#, no-wrapn23443#, fuzzy, no-wrap
23444#| msgid ""
23445#| "\n"
23446#| "_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')\n"
11315msgid ""23447msgid ""
11316"<code>_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')\n"23448"<code>_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')\n"
11317"</code>"23449"</code>"
11318msgstr ""23450msgstr ""
nn23451"\n"
23452"_CONVERSION(`GtkTreeView*',`TreeView*',`Glib::wrap($3)')\n"
1131923453
11320#. (itstool) path: section/para23454#. (itstool) path: section/para
11321#: C/index-in.docbook:1014023455#: C/index-in.docbook:10140
n11322msgid "<literal>$3</literal> will be replaced by the parameter name when this con23456msgid ""
>nversion is used by <command>gmmproc</command>." 
23457"<literal>$3</literal> will be replaced by the parameter name when this "
23458"conversion is used by <command>gmmproc</command>."
11323msgstr ""23459msgstr ""
nn23460"<literal>$3</literal> kommer ersättas av parameternamnet när denna "
23461"konvertering används av <command>gmmproc</command>."
1132423462
11325#. (itstool) path: section/para23463#. (itstool) path: section/para
11326#: C/index-in.docbook:1014423464#: C/index-in.docbook:10144
n11327msgid "Some extra macros make this easier and consistent. Look in <application>gn23465msgid ""
>tkmm</application>'s .m4 files for examples. For instance:" 
23466"Some extra macros make this easier and consistent. Look in "
23467"<application>gtkmm</application>'s .m4 files for examples. For instance:"
11328msgstr ""23468msgstr ""
nn23469"Några extra makron gör detta lättare och mer konsekvent. Exempel kan ses i "
23470"<application>gtkmm</application>:s .m4-filer. Till exempel:"
1132923471
11330#. (itstool) path: section/programlisting23472#. (itstool) path: section/programlisting
11331#: C/index-in.docbook:1014823473#: C/index-in.docbook:10148
n11332#, no-wrapn23474#, fuzzy, no-wrap
11333msgid ""23475msgid ""
11334"<code>_CONVERSION(`PrintSettings&amp;',`GtkPrintSettings*',__FR2P)\n"23476"<code>_CONVERSION(`PrintSettings&amp;',`GtkPrintSettings*',__FR2P)\n"
11335"_CONVERSION(`const PrintSettings&amp;',`GtkPrintSettings*',__FCR2P)\n"23477"_CONVERSION(`const PrintSettings&amp;',`GtkPrintSettings*',__FCR2P)\n"
11336"_CONVERSION(`const Glib::RefPtr&lt;Printer&gt;&amp;',`GtkPrinter*',__CONVERT_RE23478"_CONVERSION(`const Glib::RefPtr&lt;Printer&gt;&amp;',`GtkPrinter*',__CONVERT_RE
>FPTR_TO_P($3))\n">FPTR_TO_P($3))\n"
11337"</code>"23479"</code>"
11338msgstr ""23480msgstr ""
nn23481"\n"
23482"_CONVERSION(`PrintSettings&amp;',`GtkPrintSettings*',__FR2P)\n"
23483"_CONVERSION(`const PrintSettings&amp;',`GtkPrintSettings*',__FCR2P)\n"
23484"_CONVERSION(`const Glib::RefPtr&lt;Printer&gt;&amp;',`GtkPrinter*',__CONVERT_RE
 >FPTR_TO_P($3))\n"
1133923485
11340#. (itstool) path: section/title23486#. (itstool) path: section/title
11341#: C/index-in.docbook:1015523487#: C/index-in.docbook:10155
11342msgid "m4 Initializations"23488msgid "m4 Initializations"
n11343msgstr ""n23489msgstr "m4-initieringar"
1134423490
11345#. (itstool) path: section/para23491#. (itstool) path: section/para
11346#: C/index-in.docbook:1015723492#: C/index-in.docbook:10157
n11347msgid "Often when wrapping methods, it is desirable to store the return of the Cn23493#, fuzzy
> function in what is called an output parameter. In this case, the <phrase role= 
>\"nowrap\">C++</phrase> method returns <type>void</type> but an output parameter 
> in which to store the value of the C function is included in the argument list  
>of the <phrase role=\"nowrap\">C++</phrase> method. <command>gmmproc</command> a 
>llows such functionality, but appropriate initialization macros must be included 
> to tell <command>gmmproc</command> how to initialize the <phrase role=\"nowrap\ 
>">C++</phrase> parameter from the return of the C function." 
23494msgid ""
23495"Often when wrapping methods, it is desirable to store the return of the C "
23496"function in what is called an output parameter. In this case, the <phrase "
23497"role=\"nowrap\">C++</phrase> method returns <type>void</type> but an output "
23498"parameter in which to store the value of the C function is included in the "
23499"argument list of the <phrase role=\"nowrap\">C++</phrase> method. "
23500"<command>gmmproc</command> allows such functionality, but appropriate "
23501"initialization macros must be included to tell <command>gmmproc</command> "
23502"how to initialize the <phrase role=\"nowrap\">C++</phrase> parameter from "
23503"the return of the C function."
11348msgstr ""23504msgstr ""
nn23505"Ofta är det vid omslag av metoder önskvärt att lagra returvärdet för C-"
23506"funktionen i vad som kallas en utdataparameter. I detta fall returnerar C++-"
23507"metoden <type>void</type> men en utdataparameter i vilken värdet för C-"
23508"funktionen ska lagras inkluderas i argumentlistan för C++-metoden. "
23509"<command>gmmproc</command> tillåter sådan funktionalitet, men lämpliga "
23510"initieringsmakron måste inkluderas för att säga till <command>gmmproc</"
23511"command> hur C++-parametern ska initieras från returvärdet på C-funktionen."
1134923512
11350#. (itstool) path: section/para23513#. (itstool) path: section/para
11351#: C/index-in.docbook:1016623514#: C/index-in.docbook:10166
n11352msgid "For example, if there was a C function that returned a <type>GtkWidget*</n23515#, fuzzy
>type> and for some reason, instead of having the <phrase role=\"nowrap\">C++</ph 
>rase> method also return the widget, it was desirable to have the <phrase role=\ 
>"nowrap\">C++</phrase> method place the widget in a specified output parameter,  
>an initialization macro such as the following would be necessary:" 
23516msgid ""
23517"For example, if there was a C function that returned a <type>GtkWidget*</"
23518"type> and for some reason, instead of having the <phrase role=\"nowrap\">C+"
23519"+</phrase> method also return the widget, it was desirable to have the "
23520"<phrase role=\"nowrap\">C++</phrase> method place the widget in a specified "
23521"output parameter, an initialization macro such as the following would be "
23522"necessary:"
11353msgstr ""23523msgstr ""
nn23524"Om det exempelvis fanns en C-funktion som returnerade en <type>GtkWidget*</"
23525"type> och det av någon anledning i stället för att C++-metoden också "
23526"returnerar komponenten var önskvärt att C++-metoden placerar komponenten i "
23527"en angiven utdataparameter, skulle ett initieringsmakro som det följande "
23528"vara nödvändigt:"
1135423529
11355#. (itstool) path: section/programlisting23530#. (itstool) path: section/programlisting
11356#: C/index-in.docbook:1017323531#: C/index-in.docbook:10173
n11357#, no-wrapn23532#, fuzzy, no-wrap
23533#| msgid ""
23534#| "\n"
23535#| "_INITIALIZATION(`Gtk::Widget&amp;',`GtkWidget*',`$3 = Glib::wrap($4)')\n"
11358msgid ""23536msgid ""
11359"<code>_INITIALIZATION(`Gtk::Widget&amp;',`GtkWidget*',`$3 = Glib::wrap($4)')\n"23537"<code>_INITIALIZATION(`Gtk::Widget&amp;',`GtkWidget*',`$3 = Glib::wrap($4)')\n"
11360"</code>"23538"</code>"
11361msgstr ""23539msgstr ""
nn23540"\n"
23541"_INITIALIZATION(`Gtk::Widget&amp;',`GtkWidget*',`$3 = Glib::wrap($4)')\n"
1136223542
11363#. (itstool) path: section/para23543#. (itstool) path: section/para
11364#: C/index-in.docbook:1017623544#: C/index-in.docbook:10176
n11365msgid "<literal>$3</literal> will be replaced by the output parameter name of thn23545#, fuzzy
>e <phrase role=\"nowrap\">C++</phrase> method and <literal>$4</literal> will be  
>replaced by the return of the C function when this initialization is used by <co 
>mmand>gmmproc</command>. For convenience, <literal>$1</literal> will also be rep 
>laced by the <phrase role=\"nowrap\">C++</phrase> type without the ampersand (&a 
>mp;) and <literal>$2</literal> will be replaced by the C type." 
23546msgid ""
23547"<literal>$3</literal> will be replaced by the output parameter name of the "
23548"<phrase role=\"nowrap\">C++</phrase> method and <literal>$4</literal> will "
23549"be replaced by the return of the C function when this initialization is used "
23550"by <command>gmmproc</command>. For convenience, <literal>$1</literal> will "
23551"also be replaced by the <phrase role=\"nowrap\">C++</phrase> type without "
23552"the ampersand (&amp;) and <literal>$2</literal> will be replaced by the C "
23553"type."
11366msgstr ""23554msgstr ""
nn23555"<literal>$3</literal> kommer ersättas med utdataparameternamnet för C++-"
23556"metoden och <literal>$4</literal> kommer ersättas med returvärdet för C-"
23557"funktionen när denna initiering används av <command>gmmproc</command>. För "
23558"bekvämlighets skulle kommer <literal>$1</literal> också ersättas med C++-"
23559"typen utan et-tecknet (&amp;) och <literal>$2</literal> kommer ersättas med "
23560"C-typen."
1136723561
11368#. (itstool) path: section/title23562#. (itstool) path: section/title
11369#: C/index-in.docbook:1018623563#: C/index-in.docbook:10186
11370msgid "Class macros"23564msgid "Class macros"
n11371msgstr ""n23565msgstr "Klassmakron"
1137223566
11373#. (itstool) path: section/para23567#. (itstool) path: section/para
11374#: C/index-in.docbook:1018823568#: C/index-in.docbook:10188
n11375msgid "The class macro declares the class itself and its relationship with the un23569#, fuzzy
>nderlying C type. It generates some internal constructors, the member <varname>g 
>object_</varname>, typedefs, the <function>gobj()</function> accessors, type reg 
>istration, and the <function>Glib::wrap()</function> method, among other things. 
>" 
23570msgid ""
23571"The class macro declares the class itself and its relationship with the "
23572"underlying C type. It generates some internal constructors, the member "
23573"<varname>gobject_</varname>, typedefs, the <function>gobj()</function> "
23574"accessors, type registration, and the <function>Glib::wrap()</function> "
23575"method, among other things."
11376msgstr ""23576msgstr ""
nn23577"Klassmakrot deklarerar själva klassen och dess relation med den "
23578"underliggande C-typen. Det genererar några interna konstruktorer, "
23579"medlemmarnas <varname>gobject_</varname>, typedef, <function>gobj()</"
23580"function>-åtkommarna, typregistrering och metoden <function>Glib::wrap()</"
23581"function> med mera."
1137723582
11378#. (itstool) path: section/para23583#. (itstool) path: section/para
11379#: C/index-in.docbook:1019323584#: C/index-in.docbook:10193
n11380msgid "Other macros, such as <function>_WRAP_METHOD()</function> and <function>_n23585msgid ""
>WRAP_SIGNAL()</function> may only be used after a call to a <function>_CLASS_*</ 
>function> macro." 
23586"Other macros, such as <function>_WRAP_METHOD()</function> and "
23587"<function>_WRAP_SIGNAL()</function> may only be used after a call to a "
23588"<function>_CLASS_*</function> macro."
11381msgstr ""23589msgstr ""
nn23590"Andra makron, som <function>_WRAP_METHOD()</function> och "
23591"<function>_WRAP_SIGNAL()</function> kan endast användas efter ett anrop till "
23592"ett <function>_CLASS_*</function>-makro."
1138223593
11383#. (itstool) path: section/para23594#. (itstool) path: section/para
11384#: C/index-in.docbook:1019623595#: C/index-in.docbook:10196
n11385msgid "Most class macros take an optional argument, <parameter>declaration prefin23596msgid ""
>x</parameter>. It's typically used for a C preprocessor macro defined as <litera 
>l>__declspec(dllexport)</literal> or <literal>__declspec(dllimport)</literal> wh 
>en building with MSVC on Windows, defined as an empty string otherwise." 
23597"Most class macros take an optional argument, <parameter>declaration prefix</"
23598"parameter>. It's typically used for a C preprocessor macro defined as "
23599"<literal>__declspec(dllexport)</literal> or <literal>__declspec(dllimport)</"
23600"literal> when building with MSVC on Windows, defined as an empty string "
23601"otherwise."
11386msgstr ""23602msgstr ""
1138723603
11388#. (itstool) path: section/title23604#. (itstool) path: section/title
11389#: C/index-in.docbook:1020223605#: C/index-in.docbook:10202
11390msgid "_CLASS_GOBJECT"23606msgid "_CLASS_GOBJECT"
n11391msgstr ""n23607msgstr "_CLASS_GOBJECT"
1139223608
11393#. (itstool) path: section/para23609#. (itstool) path: section/para
11394#: C/index-in.docbook:1020423610#: C/index-in.docbook:10204
n11395msgid "This macro declares a wrapper for a type that is derived from <classname>n23611#, fuzzy
>GObject</classname>, but whose wrapper is not derived from <classname>Gtk::Objec 
>t</classname>." 
23612msgid ""
23613"This macro declares a wrapper for a type that is derived from "
23614"<classname>GObject</classname>, but whose wrapper is not derived from "
23615"<classname>Gtk::Object</classname>."
11396msgstr ""23616msgstr ""
nn23617"Detta makro deklarerar ett omslag för en typ som härleds från "
23618"<classname>GObject</classname>, men vars omslag inte härleds från "
23619"<classname>Gtk::Object</classname>."
1139723620
11398#. (itstool) path: section/para23621#. (itstool) path: section/para
11399#: C/index-in.docbook:1020723622#: C/index-in.docbook:10207
n11400msgid "<function>_CLASS_GOBJECT( C++ class, C class, C casting macro, C++ base cn23623#, fuzzy
>lass, C base class, real C class, real C base class, declaration prefix )</funct 
>ion>" 
23624msgid ""
23625"<function>_CLASS_GOBJECT( C++ class, C class, C casting macro, C++ base "
23626"class, C base class, real C class, real C base class, declaration prefix )</"
23627"function>"
11401msgstr ""23628msgstr ""
nn23629"<function>_CLASS_GOBJECT( C++-klass, C-klass, C-typkonverteringsmakro, C++-"
23630"basklass, C-basklass )</function>"
1140223631
11403#. (itstool) path: section/para23632#. (itstool) path: section/para
11404#: C/index-in.docbook:1020923633#: C/index-in.docbook:10209
n11405msgid "<parameter>real C class</parameter> and <parameter>real C base class</parn23634msgid ""
>ameter> are optional. They are seldom used. For instance, from <filename>adjustm 
>ent.hg</filename>:" 
23635"<parameter>real C class</parameter> and <parameter>real C base class</"
23636"parameter> are optional. They are seldom used. For instance, from "
23637"<filename>adjustment.hg</filename>:"
11406msgstr ""23638msgstr ""
1140723639
11408#. (itstool) path: section/programlisting23640#. (itstool) path: section/programlisting
11409#: C/index-in.docbook:1021123641#: C/index-in.docbook:10211
n11410#, no-wrapn23642#, fuzzy, no-wrap
23643#| msgid ""
23644#| "\n"
23645#| "_CLASS_GOBJECT(Adjustment, GtkAdjustment, GTK_ADJUSTMENT, Glib::Object, GObj
 >ect)\n"
11411msgid ""23646msgid ""
11412"<code>_CLASS_GOBJECT(Adjustment, GtkAdjustment, GTK_ADJUSTMENT, Glib::Object, G23647"<code>_CLASS_GOBJECT(Adjustment, GtkAdjustment, GTK_ADJUSTMENT, Glib::Object, G
>Object, , , GTKMM_API)\n">Object, , , GTKMM_API)\n"
11413"</code>"23648"</code>"
11414msgstr ""23649msgstr ""
nn23650"\n"
23651"_CLASS_GOBJECT(Adjustment, GtkAdjustment, GTK_ADJUSTMENT, Glib::Object, GObject
 >)\n"
1141523652
11416#. (itstool) path: section/title23653#. (itstool) path: section/title
11417#: C/index-in.docbook:1021623654#: C/index-in.docbook:10216
11418msgid "_CLASS_GTKOBJECT"23655msgid "_CLASS_GTKOBJECT"
n11419msgstr ""n23656msgstr "_CLASS_GTKOBJECT"
1142023657
11421#. (itstool) path: section/para23658#. (itstool) path: section/para
11422#: C/index-in.docbook:1021823659#: C/index-in.docbook:10218
n11423msgid "This macro declares a wrapper for a type whose wrapper is derived from <cn23660msgid ""
>lassname>Gtk::Object</classname>, such as a widget or dialog." 
23661"This macro declares a wrapper for a type whose wrapper is derived from "
23662"<classname>Gtk::Object</classname>, such as a widget or dialog."
11424msgstr ""23663msgstr ""
nn23664"Detta makro deklarerar ett omslag för en typ vars omslag härleds från "
23665"<classname>Gtk::Object</classname>, som en komponent eller dialogruta."
1142523666
11426#. (itstool) path: section/para23667#. (itstool) path: section/para
11427#: C/index-in.docbook:1022023668#: C/index-in.docbook:10220
n11428msgid "<function>_CLASS_GTKOBJECT( C++ class, C class, C casting macro, C++ basen23669#, fuzzy
> class, C base class, real C class, real C base class, declaration prefix )</fun 
>ction>" 
23670#| msgid ""
23671#| "<function>_CLASS_GTKOBJECT( C++ class, C class, C casting macro, C++ base "
23672#| "class, C base class )</function>"
23673msgid ""
23674"<function>_CLASS_GTKOBJECT( C++ class, C class, C casting macro, C++ base "
23675"class, C base class, real C class, real C base class, declaration prefix )</"
23676"function>"
11429msgstr ""23677msgstr ""
nn23678"<function>_CLASS_GTKOBJECT( C++-klass, C-klass, C-typkonverteringsmakro, C++-"
23679"basklass, C-basklass )</function>"
1143023680
11431#. (itstool) path: section/para23681#. (itstool) path: section/para
11432#: C/index-in.docbook:1022223682#: C/index-in.docbook:10222
n11433msgid "<parameter>real C class</parameter> and <parameter>real C base class</parn23683msgid ""
>ameter> are optional. They are seldom used. For instance, from <filename>button. 
>hg</filename>:" 
23684"<parameter>real C class</parameter> and <parameter>real C base class</"
23685"parameter> are optional. They are seldom used. For instance, from "
23686"<filename>button.hg</filename>:"
11434msgstr ""23687msgstr ""
1143523688
11436#. (itstool) path: section/programlisting23689#. (itstool) path: section/programlisting
11437#: C/index-in.docbook:1022423690#: C/index-in.docbook:10224
n11438#, no-wrapn23691#, fuzzy, no-wrap
23692#| msgid ""
23693#| "\n"
23694#| "_CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Widget, GtkWidget)\n"
11439msgid ""23695msgid ""
11440"<code>_CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Widget, GtkWidget, ,23696"<code>_CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Widget, GtkWidget, ,
> , GTKMM_API)\n"> , GTKMM_API)\n"
11441"</code>"23697"</code>"
11442msgstr ""23698msgstr ""
nn23699"\n"
23700"_CLASS_GTKOBJECT(Button, GtkButton, GTK_BUTTON, Gtk::Widget, GtkWidget)\n"
1144323701
11444#. (itstool) path: section/para23702#. (itstool) path: section/para
11445#: C/index-in.docbook:1022623703#: C/index-in.docbook:10226
n11446msgid "You will typically use this macro when the class already derives from <cln23704#, fuzzy
>assname>Gtk::Object</classname>. For instance, you will use it when wrapping a G 
>TK Widget, because <classname>Gtk::Widget</classname> derives from <classname>Gt 
>k::Object</classname>." 
23705msgid ""
23706"You will typically use this macro when the class already derives from "
23707"<classname>Gtk::Object</classname>. For instance, you will use it when "
23708"wrapping a GTK Widget, because <classname>Gtk::Widget</classname> derives "
23709"from <classname>Gtk::Object</classname>."
11447msgstr ""23710msgstr ""
nn23711"Du kommer typiskt använda detta makro när klassen redan härleds från "
23712"<classname>Gtk::Object</classname>. Du kommer exempelvis använda det när du "
23713"omsluter en GTK-komponent, för <classname>Gtk::Widget</classname> härleds "
23714"från <classname>Gtk::Object</classname>."
1144823715
11449#. (itstool) path: section/para23716#. (itstool) path: section/para
11450#: C/index-in.docbook:1023023717#: C/index-in.docbook:10230
n11451msgid "You might also derive non-widget classes from <classname>Gtk::Object</clan23718#, fuzzy
>ssname> so they can be used without <classname>Glib::RefPtr</classname>. For ins 
>tance, they could then be instantiated with <function>Gtk::make_managed()</funct 
>ion> or on the stack as a member variable. This is convenient, but you should us 
>e this only when you are sure that true reference-counting is not needed. We con 
>sider it useful for widgets." 
23719msgid ""
23720"You might also derive non-widget classes from <classname>Gtk::Object</"
23721"classname> so they can be used without <classname>Glib::RefPtr</classname>. "
23722"For instance, they could then be instantiated with <function>Gtk::"
23723"make_managed()</function> or on the stack as a member variable. This is "
23724"convenient, but you should use this only when you are sure that true "
23725"reference-counting is not needed. We consider it useful for widgets."
11452msgstr ""23726msgstr ""
nn23727"Du kan också härled icke-komponentklasser från <classname>Gtk::Object</"
23728"classname> så att de kan användas utan <classname>Glib::RefPtr</classname>. "
23729"De kunde då exempelvis instansieras med <function>Gtk::make_managed()</"
23730"function> eller på stacken som en medlemsvariabel. Detta är bekvämt, men du "
23731"bör endast använda detta när du är säker att sann referensräkning inte "
23732"behövs. Vi anser det vara användbart för komponenter."
1145323733
11454#. (itstool) path: section/title23734#. (itstool) path: section/title
11455#: C/index-in.docbook:1024023735#: C/index-in.docbook:10240
11456msgid "_CLASS_BOXEDTYPE"23736msgid "_CLASS_BOXEDTYPE"
n11457msgstr ""n23737msgstr "_CLASS_BOXEDTYPE"
1145823738
11459#. (itstool) path: section/para23739#. (itstool) path: section/para
11460#: C/index-in.docbook:1024223740#: C/index-in.docbook:10242
n11461msgid "This macro declares a wrapper for a non-<classname>GObject</classname> stn23741#, fuzzy
>ruct, registered with <function>g_boxed_type_register_static()</function>." 
23742msgid ""
23743"This macro declares a wrapper for a non-<classname>GObject</classname> "
23744"struct, registered with <function>g_boxed_type_register_static()</function>."
11462msgstr ""23745msgstr ""
nn23746"Detta makro deklarerar ett omslag för en struct som inte är ett "
23747"<classname>GObject</classname>, registrerat med "
23748"<function>g_boxed_type_register_static()</function>."
1146323749
11464#. (itstool) path: section/para23750#. (itstool) path: section/para
11465#: C/index-in.docbook:1024523751#: C/index-in.docbook:10245
nn23752#, fuzzy
23753msgid ""
11466msgid "<function>_CLASS_BOXEDTYPE( C++ class, C class, new function, copy functi23754"<function>_CLASS_BOXEDTYPE( C++ class, C class, new function, copy function, "
>on, free function, declaration prefix )</function>" 
23755"free function, declaration prefix )</function>"
11467msgstr ""23756msgstr ""
nn23757"<function>_CLASS_BOXEDTYPE( C++-klass, C-klass, new-funktion, copy-funktion, "
23758"free-funktion )</function>"
1146823759
11469#. (itstool) path: section/para23760#. (itstool) path: section/para
11470#: C/index-in.docbook:1024723761#: C/index-in.docbook:10247
11471msgid "For instance, from <classname>Gdk::RGBA</classname>:"23762msgid "For instance, from <classname>Gdk::RGBA</classname>:"
n11472msgstr ""n23763msgstr "Till exempel, från <classname>Gdk::RGBA</classname>:"
1147323764
11474#. (itstool) path: section/programlisting23765#. (itstool) path: section/programlisting
11475#: C/index-in.docbook:1024823766#: C/index-in.docbook:10248
n11476#, no-wrapn23767#, fuzzy, no-wrap
23768#| msgid ""
23769#| "\n"
23770#| "_CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free)\n"
11477msgid ""23771msgid ""
11478"<code>_CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free, GDKMM23772"<code>_CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free, GDKMM
>_API)\n">_API)\n"
11479"</code>"23773"</code>"
11480msgstr ""23774msgstr ""
nn23775"\n"
23776"_CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free)\n"
1148123777
11482#. (itstool) path: section/title23778#. (itstool) path: section/title
11483#: C/index-in.docbook:1025323779#: C/index-in.docbook:10253
11484msgid "_CLASS_BOXEDTYPE_STATIC"23780msgid "_CLASS_BOXEDTYPE_STATIC"
n11485msgstr ""n23781msgstr "_CLASS_BOXEDTYPE_STATIC"
1148623782
11487#. (itstool) path: section/para23783#. (itstool) path: section/para
11488#: C/index-in.docbook:1025523784#: C/index-in.docbook:10255
n11489msgid "This macro declares a wrapper for a simple assignable struct such as <clan23785#, fuzzy
>ssname>GdkRectangle</classname>. It is similar to <function>_CLASS_BOXEDTYPE</fu 
>nction>, but the C struct is not allocated dynamically." 
23786msgid ""
23787"This macro declares a wrapper for a simple assignable struct such as "
23788"<classname>GdkRectangle</classname>. It is similar to "
23789"<function>_CLASS_BOXEDTYPE</function>, but the C struct is not allocated "
23790"dynamically."
11490msgstr ""23791msgstr ""
nn23792"Detta makro deklarerar ett omslag för en enkel tilldelningsbar struct som "
23793"<classname>GdkRectangle</classname>. Det liknar <function>_CLASS_BOXEDTYPE</"
23794"function>, men C-structen allokeras inte dynamiskt."
1149123795
11492#. (itstool) path: section/para23796#. (itstool) path: section/para
11493#: C/index-in.docbook:1025923797#: C/index-in.docbook:10259
nn23798#, fuzzy
23799#| msgid "<function>_CLASS_BOXEDTYPE_STATIC( C++ class, C class )</function>"
23800msgid ""
11494msgid "<function>_CLASS_BOXEDTYPE_STATIC( C++ class, C class, declaration prefix23801"<function>_CLASS_BOXEDTYPE_STATIC( C++ class, C class, declaration prefix )</"
> )</function>" 
11495msgstr ""23802"function>"
23803msgstr "<function>_CLASS_BOXEDTYPE_STATIC( C++-klass, C-klass )</function>"
1149623804
11497#. (itstool) path: section/para23805#. (itstool) path: section/para
11498#: C/index-in.docbook:1026023806#: C/index-in.docbook:10260
11499msgid "For instance, for <classname>Gdk::Rectangle</classname>:"23807msgid "For instance, for <classname>Gdk::Rectangle</classname>:"
n11500msgstr ""n23808msgstr "Till exempel, för <classname>Gdk::Rectangle</classname>:"
1150123809
11502#. (itstool) path: section/programlisting23810#. (itstool) path: section/programlisting
11503#: C/index-in.docbook:1026123811#: C/index-in.docbook:10261
n11504#, no-wrapn23812#, fuzzy, no-wrap
23813#| msgid ""
23814#| "\n"
23815#| "_CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle)\n"
11505msgid ""23816msgid ""
11506"<code>_CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle, GDKMM_API)\n"23817"<code>_CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle, GDKMM_API)\n"
11507"</code>"23818"</code>"
11508msgstr ""23819msgstr ""
nn23820"\n"
23821"_CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle)\n"
1150923822
11510#. (itstool) path: section/title23823#. (itstool) path: section/title
11511#: C/index-in.docbook:1026623824#: C/index-in.docbook:10266
11512msgid "_CLASS_OPAQUE_COPYABLE"23825msgid "_CLASS_OPAQUE_COPYABLE"
n11513msgstr ""n23826msgstr "_CLASS_OPAQUE_COPYABLE"
1151423827
11515#. (itstool) path: section/para23828#. (itstool) path: section/para
11516#: C/index-in.docbook:1026823829#: C/index-in.docbook:10268
n11517msgid "This macro declares a wrapper for an opaque struct that has copy and freen23830#, fuzzy
> functions. The new, copy and free functions will be used to instantiate the def 
>ault constructor, copy constructor and destructor." 
23831msgid ""
23832"This macro declares a wrapper for an opaque struct that has copy and free "
23833"functions. The new, copy and free functions will be used to instantiate the "
23834"default constructor, copy constructor and destructor."
11518msgstr ""23835msgstr ""
nn23836"Detta makro deklarerar ett omslag för en ogenomskinlig struct som har copy- "
23837"och free-funktioner. New-, copy- och free-funktionerna kommer användas för "
23838"att instansiera standardkonstruktorn, konstruktor och destruktor för copy."
1151923839
11520#. (itstool) path: section/para23840#. (itstool) path: section/para
11521#: C/index-in.docbook:1027123841#: C/index-in.docbook:10271
n11522msgid "<function>_CLASS_OPAQUE_COPYABLE( C++ class, C class, new function, copy n23842#, fuzzy
>function, free function, declaration prefix )</function>" 
23843msgid ""
23844"<function>_CLASS_OPAQUE_COPYABLE( C++ class, C class, new function, copy "
23845"function, free function, declaration prefix )</function>"
11523msgstr ""23846msgstr ""
nn23847"<function>_CLASS_OPAQUE_COPYABLE( C++-klass, C-klass, new-funktion, copy-"
23848"funktion, free-funktion )</function>"
1152423849
11525#. (itstool) path: section/para23850#. (itstool) path: section/para
11526#: C/index-in.docbook:1027323851#: C/index-in.docbook:10273
11527msgid "For instance, from <classname>Glib::VariantType</classname>:"23852msgid "For instance, from <classname>Glib::VariantType</classname>:"
n11528msgstr ""n23853msgstr "Till exempel, från <classname>Glib::VariantType</classname>:"
1152923854
11530#. (itstool) path: section/programlisting23855#. (itstool) path: section/programlisting
11531#: C/index-in.docbook:1027423856#: C/index-in.docbook:10274
n11532#, no-wrapn23857#, fuzzy, no-wrap
23858#| msgid ""
23859#| "\n"
23860#| "_CLASS_OPAQUE_COPYABLE(VariantType, GVariantType, NONE, g_variant_type_copy,
 > g_variant_type_free)\n"
11533msgid ""23861msgid ""
11534"<code>_CLASS_OPAQUE_COPYABLE(VariantType, GVariantType, NONE, g_variant_type_co23862"<code>_CLASS_OPAQUE_COPYABLE(VariantType, GVariantType, NONE, g_variant_type_co
>py, g_variant_type_free, GLIBMM_API)\n">py, g_variant_type_free, GLIBMM_API)\n"
11535"</code>"23863"</code>"
11536msgstr ""23864msgstr ""
nn23865"\n"
23866"_CLASS_OPAQUE_COPYABLE(VariantType, GVariantType, NONE, g_variant_type_copy, g_
 >variant_type_free)\n"
1153723867
11538#. (itstool) path: section/title23868#. (itstool) path: section/title
11539#: C/index-in.docbook:1027923869#: C/index-in.docbook:10279
11540msgid "_CLASS_OPAQUE_REFCOUNTED"23870msgid "_CLASS_OPAQUE_REFCOUNTED"
n11541msgstr ""n23871msgstr "_CLASS_OPAQUE_REFCOUNTED"
1154223872
11543#. (itstool) path: section/para23873#. (itstool) path: section/para
11544#: C/index-in.docbook:1028123874#: C/index-in.docbook:10281
n11545msgid "This macro declares a wrapper for a reference-counted opaque struct. The n23875#, fuzzy
><phrase role=\"nowrap\">C++</phrase> wrapper cannot be directly instantiated and 
> can only be used with <classname>Glib::RefPtr</classname>." 
23876msgid ""
23877"This macro declares a wrapper for a reference-counted opaque struct. The "
23878"<phrase role=\"nowrap\">C++</phrase> wrapper cannot be directly instantiated "
23879"and can only be used with <classname>Glib::RefPtr</classname>."
11546msgstr ""23880msgstr ""
nn23881"Detta makro deklarerar ett omslag för en referensräknad ogenomskinlig "
23882"struct. C++-omslaget kan inte instansieras direkt och kan endast användas "
23883"med <classname>Glib::RefPtr</classname>."
1154723884
11548#. (itstool) path: section/para23885#. (itstool) path: section/para
11549#: C/index-in.docbook:1028423886#: C/index-in.docbook:10284
n11550msgid "<function>_CLASS_OPAQUE_REFCOUNTED( C++ class, C class, new function, refn23887#, fuzzy
> function, unref function, declaration prefix )</function>" 
23888msgid ""
23889"<function>_CLASS_OPAQUE_REFCOUNTED( C++ class, C class, new function, ref "
23890"function, unref function, declaration prefix )</function>"
11551msgstr ""23891msgstr ""
nn23892"<function>_CLASS_OPAQUE_REFCOUNTED( C++-klass, C-klass, new-funktion, ref-"
23893"funktion, unref-funktion )</function>"
1155223894
11553#. (itstool) path: section/para23895#. (itstool) path: section/para
11554#: C/index-in.docbook:1028623896#: C/index-in.docbook:10286
11555msgid "For instance, for <classname>Gtk::CssSection</classname>:"23897msgid "For instance, for <classname>Gtk::CssSection</classname>:"
n11556msgstr ""n23898msgstr "Till exempel, för <classname>Gtk::CssSection</classname>:"
1155723899
11558#. (itstool) path: section/programlisting23900#. (itstool) path: section/programlisting
11559#: C/index-in.docbook:1028723901#: C/index-in.docbook:10287
n11560#, no-wrapn23902#, fuzzy, no-wrap
23903#| msgid ""
23904#| "\n"
23905#| "_CLASS_OPAQUE_REFCOUNTED(CssSection, GtkCssSection, NONE, gtk_css_section_re
 >f, gtk_css_section_unref)\n"
11561msgid ""23906msgid ""
11562"<code>_CLASS_OPAQUE_REFCOUNTED(CssSection, GtkCssSection, NONE, gtk_css_section23907"<code>_CLASS_OPAQUE_REFCOUNTED(CssSection, GtkCssSection, NONE, gtk_css_section
>_ref, gtk_css_section_unref, GTKMM_API)\n">_ref, gtk_css_section_unref, GTKMM_API)\n"
11563"</code>"23908"</code>"
11564msgstr ""23909msgstr ""
nn23910"\n"
23911"_CLASS_OPAQUE_REFCOUNTED(CssSection, GtkCssSection, NONE, gtk_css_section_ref, 
 >gtk_css_section_unref)\n"
1156523912
11566#. (itstool) path: section/title23913#. (itstool) path: section/title
11567#: C/index-in.docbook:1029223914#: C/index-in.docbook:10292
11568msgid "_CLASS_GENERIC"23915msgid "_CLASS_GENERIC"
n11569msgstr ""n23916msgstr "_CLASS_GENERIC"
1157023917
11571#. (itstool) path: section/para23918#. (itstool) path: section/para
11572#: C/index-in.docbook:1029423919#: C/index-in.docbook:10294
nn23920#, fuzzy
23921msgid ""
11573msgid "This macro can be used to wrap structs which don't fit into any specializ23922"This macro can be used to wrap structs which don't fit into any specialized "
>ed category." 
23923"category."
11574msgstr ""23924msgstr ""
nn23925"Detta makro kan användas för att slå om structar som inte passar in i någon "
23926"specialiserad kategori."
1157523927
11576#. (itstool) path: section/para23928#. (itstool) path: section/para
11577#: C/index-in.docbook:1029623929#: C/index-in.docbook:10296
11578msgid "<function>_CLASS_GENERIC( C++ class, C class )</function>"23930msgid "<function>_CLASS_GENERIC( C++ class, C class )</function>"
n11579msgstr ""n23931msgstr "<function>_CLASS_GENERIC( C++-klass, C-klass )</function>"
1158023932
11581#. (itstool) path: section/para23933#. (itstool) path: section/para
11582#: C/index-in.docbook:1029723934#: C/index-in.docbook:10297
nn23935#, fuzzy
23936#| msgid "For instance, for <classname>Gdk::TimeCoord</classname>:"
23937msgid ""
11583msgid "Note: No <parameter>declaration prefix</parameter> argument. For instance23938"Note: No <parameter>declaration prefix</parameter> argument. For instance, "
>for <classname>Gdk::TimeCoord</classname>:" 
11584msgstr ""23939"for <classname>Gdk::TimeCoord</classname>:"
23940msgstr "Till exempel, för <classname>Gdk::TimeCoord</classname>:"
1158523941
11586#. (itstool) path: section/programlisting23942#. (itstool) path: section/programlisting
11587#: C/index-in.docbook:1029923943#: C/index-in.docbook:10299
n11588#, no-wrapn23944#, fuzzy, no-wrap
23945#| msgid ""
23946#| "\n"
23947#| "_CLASS_GENERIC(TimeCoord, GdkTimeCoord)\n"
11589msgid ""23948msgid ""
11590"<code>_CLASS_GENERIC(TimeCoord, GdkTimeCoord)\n"23949"<code>_CLASS_GENERIC(TimeCoord, GdkTimeCoord)\n"
11591"</code>"23950"</code>"
11592msgstr ""23951msgstr ""
nn23952"\n"
23953"_CLASS_GENERIC(TimeCoord, GdkTimeCoord)\n"
1159323954
11594#. (itstool) path: section/title23955#. (itstool) path: section/title
11595#: C/index-in.docbook:1030423956#: C/index-in.docbook:10304
11596msgid "_CLASS_INTERFACE"23957msgid "_CLASS_INTERFACE"
n11597msgstr ""n23958msgstr "_CLASS_INTERFACE"
1159823959
11599#. (itstool) path: section/para23960#. (itstool) path: section/para
11600#: C/index-in.docbook:1030623961#: C/index-in.docbook:10306
n11601msgid "This macro declares a wrapper for a type that is derived from <classname>n23962msgid ""
>GTypeInterface</classname>." 
23963"This macro declares a wrapper for a type that is derived from "
23964"<classname>GTypeInterface</classname>."
11602msgstr ""23965msgstr ""
nn23966"Detta makro deklarerar ett omslag för en typ som härleds från "
23967"<classname>GTypeInterface</classname>."
1160323968
11604#. (itstool) path: section/para23969#. (itstool) path: section/para
11605#: C/index-in.docbook:1030923970#: C/index-in.docbook:10309
n11606msgid "<function>_CLASS_INTERFACE( C++ class, C class, C casting macro, C interfn23971#, fuzzy
>ace struct, Base C++ class (optional), Base C class (optional), declaration pref 
>ix (optional) )</function>" 
23972msgid ""
23973"<function>_CLASS_INTERFACE( C++ class, C class, C casting macro, C interface "
23974"struct, Base C++ class (optional), Base C class (optional), declaration "
23975"prefix (optional) )</function>"
11607msgstr ""23976msgstr ""
nn23977"<function>_CLASS_INTERFACE( C++-klass, C-klass, C-typkonverteringsmakro, C-"
23978"gränssnittsstruct, C++-basklass (valfri), C-basklass (valfri) )</function>"
1160823979
11609#. (itstool) path: section/para23980#. (itstool) path: section/para
11610#: C/index-in.docbook:1031123981#: C/index-in.docbook:10311
11611msgid "For instance, from <filename>celleditable.hg</filename>:"23982msgid "For instance, from <filename>celleditable.hg</filename>:"
n11612msgstr ""n23983msgstr "Till exempel, från <filename>celleditable.hg</filename>:"
1161323984
11614#. (itstool) path: section/programlisting23985#. (itstool) path: section/programlisting
11615#: C/index-in.docbook:1031323986#: C/index-in.docbook:10313
n11616#, no-wrapn23987#, fuzzy, no-wrap
23988#| msgid ""
23989#| "\n"
23990#| "_CLASS_INTERFACE(CellEditable, GtkCellEditable, GTK_CELL_EDITABLE, GtkCellEd
 >itableIface)\n"
11617msgid ""23991msgid ""
11618"<code>_CLASS_INTERFACE(CellEditable, GtkCellEditable, GTK_CELL_EDITABLE, GtkCel23992"<code>_CLASS_INTERFACE(CellEditable, GtkCellEditable, GTK_CELL_EDITABLE, GtkCel
>lEditableIface, , , GTKMM_API)\n">lEditableIface, , , GTKMM_API)\n"
11619"</code>"23993"</code>"
11620msgstr ""23994msgstr ""
nn23995"\n"
23996"_CLASS_INTERFACE(CellEditable, GtkCellEditable, GTK_CELL_EDITABLE, GtkCellEdita
 >bleIface)\n"
1162123997
11622#. (itstool) path: section/para23998#. (itstool) path: section/para
11623#: C/index-in.docbook:1031523999#: C/index-in.docbook:10315
n11624msgid "Two extra optional parameters were once added, for the case that the inten24000#, fuzzy
>rface derives from another interface, which was believed to be the case when the 
> GInterface has another GInterface as a prerequisite. This is a misunderstanding 
>, though. When GInterface A has GInterface B as a prerequisite, it means that ev 
>ery class that implements A shall also implement B. For instance, from <filename 
>>loadableicon.hg</filename> in glibmm-2.4:" 
24001msgid ""
24002"Two extra optional parameters were once added, for the case that the "
24003"interface derives from another interface, which was believed to be the case "
24004"when the GInterface has another GInterface as a prerequisite. This is a "
24005"misunderstanding, though. When GInterface A has GInterface B as a "
24006"prerequisite, it means that every class that implements A shall also "
24007"implement B. For instance, from <filename>loadableicon.hg</filename> in "
24008"glibmm-2.4:"
11625msgstr ""24009msgstr ""
nn24010"Två extra valfria parametrar lades till en gång, för fallet att gränssnittet "
24011"härleds från ett annat gränssnitt, vilket antogs vara fallet när GInterface "
24012"har ett annat GInterface som förkrav. Detta är dock ett missförstånd. När "
24013"GInterface A har GInterface B som ett förkrav så betyder det att varje klass "
24014"som implementerar A också ska implementera B. Exempelvis från "
24015"<filename>loadableicon.hg</filename> i glibmm-2.4:"
1162624016
11627#. (itstool) path: section/programlisting24017#. (itstool) path: section/programlisting
11628#: C/index-in.docbook:1032124018#: C/index-in.docbook:10321
n11629#, no-wrapn24019#, fuzzy, no-wrap
24020#| msgid ""
24021#| "\n"
24022#| "_CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableIcon
 >Iface, Icon, GIcon)\n"
11630msgid ""24023msgid ""
11631"<code>_CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableI24024"<code>_CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableI
>conIface, Icon, GIcon, GIOMM_API)\n">conIface, Icon, GIcon, GIOMM_API)\n"
11632"</code>"24025"</code>"
11633msgstr ""24026msgstr ""
nn24027"\n"
24028"_CLASS_INTERFACE(LoadableIcon, GLoadableIcon, G_LOADABLE_ICON, GLoadableIconIfa
 >ce, Icon, GIcon)\n"
1163424029
11635#. (itstool) path: section/title24030#. (itstool) path: section/title
11636#: C/index-in.docbook:1032824031#: C/index-in.docbook:10328
11637msgid "Constructor macros"24032msgid "Constructor macros"
n11638msgstr ""n24033msgstr "Konstruktormakron"
1163924034
11640#. (itstool) path: section/para24035#. (itstool) path: section/para
11641#: C/index-in.docbook:1033024036#: C/index-in.docbook:10330
n11642msgid "The <function>_CTOR_DEFAULT()</function> and <function>_WRAP_CTOR()</funcn24037#, fuzzy
>tion> macros add constructors, wrapping the specified <function>*_new()</functio 
>n> C functions. These macros assume that the C object has properties with the sa 
>me names as the function parameters, as is usually the case, so that it can supp 
>ly the parameters directly to a <function>g_object_new()</function> call. These  
>constructors never actually call the <function>*_new()</function> C functions, b 
>ecause <application>gtkmm</application> must actually instantiate derived GTypes 
>, and the <function>*_new()</function> C functions are meant only as convenience 
> functions for C programmers." 
24038msgid ""
24039"The <function>_CTOR_DEFAULT()</function> and <function>_WRAP_CTOR()</"
24040"function> macros add constructors, wrapping the specified <function>*_new()</"
24041"function> C functions. These macros assume that the C object has properties "
24042"with the same names as the function parameters, as is usually the case, so "
24043"that it can supply the parameters directly to a <function>g_object_new()</"
24044"function> call. These constructors never actually call the "
24045"<function>*_new()</function> C functions, because <application>gtkmm</"
24046"application> must actually instantiate derived GTypes, and the "
24047"<function>*_new()</function> C functions are meant only as convenience "
24048"functions for C programmers."
11643msgstr ""24049msgstr ""
nn24050"Makrona <function>_CTOR_DEFAULT()</function> och <function>_WRAP_CTOR()</"
24051"function> lägger till konstruktorer som omsluter de angivna "
24052"<function>*_new()</function>-funktionerna i C. Dessa makron antar att C-"
24053"objektet har egenskaper med samma namn som funktionsparametrarna, som "
24054"vanligen är fallet, så att det kan tillhandahålla parametrarna direkt till "
24055"ett <function>g_object_new()</function>-anrop. Dessa konstruktorer anropar "
24056"faktiskt <function>*_new()</function>-funktionerna i C, för "
24057"<application>gtkmm</application> måste faktiskt instansiera härledda GType-"
24058"typer, och <function>*_new()</function>-funktionerna i C är bara tänkta som "
24059"bekvämlighetsfunktioner för C-programmerare."
1164424060
11645#. (itstool) path: section/para24061#. (itstool) path: section/para
11646#: C/index-in.docbook:1034024062#: C/index-in.docbook:10340
n11647msgid "When using <function>_CLASS_GOBJECT()</function>, the constructors shouldn24063#, fuzzy
> be protected (rather than public) and each constructor should have a correspond 
>ing <function>_WRAP_CREATE()</function> in the public section. This prevents the 
> class from being instantiated without using a <classname>RefPtr</classname>. Fo 
>r instance:" 
24064msgid ""
24065"When using <function>_CLASS_GOBJECT()</function>, the constructors should be "
24066"protected (rather than public) and each constructor should have a "
24067"corresponding <function>_WRAP_CREATE()</function> in the public section. "
24068"This prevents the class from being instantiated without using a "
24069"<classname>RefPtr</classname>. For instance:"
11648msgstr ""24070msgstr ""
nn24071"När <function>_CLASS_GOBJECT()</function> används bör konstruktorerna vara "
24072"protected (snarare än public) och varje konstruktor bör ha en motsvarande "
24073"<function>_WRAP_CREATE()</function> i public-delen. Detta förhindrar klassen "
24074"från att instansieras utan att använda en <classname>RefPtr</classname>. "
24075"Till exempel:"
1164924076
11650#. (itstool) path: section/programlisting24077#. (itstool) path: section/programlisting
11651#: C/index-in.docbook:1034524078#: C/index-in.docbook:10345
n11652#, no-wrapn24079#, fuzzy, no-wrap
11653msgid ""24080msgid ""
11654"<code>class GTKMM_API TextMark : public Glib::Object\n"24081"<code>class GTKMM_API TextMark : public Glib::Object\n"
11655"{\n"24082"{\n"
11656"  _CLASS_GOBJECT(TextMark, GtkTextMark, GTK_TEXT_MARK, Glib::Object, GObject, ,24083"  _CLASS_GOBJECT(TextMark, GtkTextMark, GTK_TEXT_MARK, Glib::Object, GObject, ,
> , GTKMM_API)\n"> , GTKMM_API)\n"
11657"\n"24084"\n"
11660"\n"24087"\n"
11661"public:\n"24088"public:\n"
11662"  _WRAP_CREATE(const Glib::ustring&amp; name, bool left_gravity = true)\n"24089"  _WRAP_CREATE(const Glib::ustring&amp; name, bool left_gravity = true)\n"
11663"</code>"24090"</code>"
11664msgstr ""24091msgstr ""
nn24092"\n"
24093"class TextMark : public Glib::Object\n"
24094"{\n"
24095"  _CLASS_GOBJECT(TextMark, GtkTextMark, GTK_TEXT_MARK, Glib::Object, GObject)\n
 >"
24096"\n"
24097"protected:\n"
24098"  _WRAP_CTOR(TextMark(const Glib::ustring&amp; name, bool left_gravity = true),
 > gtk_text_mark_new)\n"
24099"\n"
24100"public:\n"
24101"  _WRAP_CREATE(const Glib::ustring&amp; name, bool left_gravity = true)\n"
1166524102
11666#. (itstool) path: section/title24103#. (itstool) path: section/title
11667#: C/index-in.docbook:1035724104#: C/index-in.docbook:10357
11668msgid "_CTOR_DEFAULT"24105msgid "_CTOR_DEFAULT"
n11669msgstr ""n24106msgstr "_CTOR_DEFAULT"
1167024107
11671#. (itstool) path: section/para24108#. (itstool) path: section/para
11672#: C/index-in.docbook:1035924109#: C/index-in.docbook:10359
11673msgid "This macro creates a default constructor with no arguments."24110msgid "This macro creates a default constructor with no arguments."
n11674msgstr ""n24111msgstr "Detta makro skapar en standardkonstruktor utan argument."
1167524112
11676#. (itstool) path: section/title24113#. (itstool) path: section/title
11677#: C/index-in.docbook:1036424114#: C/index-in.docbook:10364
11678msgid "_WRAP_CTOR"24115msgid "_WRAP_CTOR"
n11679msgstr ""n24116msgstr "_WRAP_CTOR"
1168024117
11681#. (itstool) path: section/para24118#. (itstool) path: section/para
11682#: C/index-in.docbook:1036624119#: C/index-in.docbook:10366
n11683msgid "This macro creates a constructor with arguments, equivalent to a <function24120#, fuzzy
>n>*_new()</function> C function. It won't actually call the <function>*_new()</f 
>unction> function, but will simply create an equivalent constructor with the sam 
>e argument types. It takes a <phrase role=\"nowrap\">C++</phrase> constructor si 
>gnature, and a C function name." 
24121msgid ""
24122"This macro creates a constructor with arguments, equivalent to a "
24123"<function>*_new()</function> C function. It won't actually call the "
24124"<function>*_new()</function> function, but will simply create an equivalent "
24125"constructor with the same argument types. It takes a <phrase "
24126"role=\"nowrap\">C++</phrase> constructor signature, and a C function name."
11684msgstr ""24127msgstr ""
nn24128"Detta makro skapar en konstruktor med argument, motsvarande en "
24129"<function>*_new()</function>-funktion i C. Den kommer inte faktiskt anropa "
24130"<function>*_new()</function>-funktionen, utan kommer helt enkelt skapa en "
24131"motsvarande konstruktor med samma argumenttyper. Den tar en C++-"
24132"konstruktorsignatur och ett C-funktionsnamn."
1168524133
11686#. (itstool) path: varlistentry/term24134#. (itstool) path: varlistentry/term
n11687#: C/index-in.docbook:10376n24135#: C/index-in.docbook:10376 C/index-in.docbook:10887
11688#: C/index-in.docbook:10887
11689msgid "errthrow"24136msgid "errthrow"
n11690msgstr ""n24137msgstr "errthrow"
1169124138
11692#. (itstool) path: listitem/para24139#. (itstool) path: listitem/para
11693#: C/index-in.docbook:1037824140#: C/index-in.docbook:10378
n11694msgid "This tells <command>gmmproc</command> that the C <function>*_new()</functn24141#, fuzzy
>ion> has a final <type>GError**</type> parameter which should be ignored." 
24142msgid ""
24143"This tells <command>gmmproc</command> that the C <function>*_new()</"
24144"function> has a final <type>GError**</type> parameter which should be "
24145"ignored."
11695msgstr ""24146msgstr ""
nn24147"Detta säger till <command>gmmproc</command> att <function>*_new()</function> "
24148"i C har en slutgiltig <type>GError**</type>-parameter som ska ignoreras."
1169624149
11697#. (itstool) path: section/para24150#. (itstool) path: section/para
11698#: C/index-in.docbook:1037324151#: C/index-in.docbook:10373
11699msgid "It also takes an optional extra argument: <_:variablelist-1/>"24152msgid "It also takes an optional extra argument: <_:variablelist-1/>"
n11700msgstr ""n24153msgstr "Det tar också ett valfritt extra argument: <_:variablelist-1/>"
1170124154
11702#. (itstool) path: section/title24155#. (itstool) path: section/title
11703#: C/index-in.docbook:1038724156#: C/index-in.docbook:10387
11704msgid "Hand-coding constructors"24157msgid "Hand-coding constructors"
n11705msgstr ""n24158msgstr "Koda konstruktorer för hand"
1170624159
11707#. (itstool) path: section/para24160#. (itstool) path: section/para
11708#: C/index-in.docbook:1038924161#: C/index-in.docbook:10389
n11709msgid "When a constructor must be partly hand written because, for instance, then24162#, fuzzy
> <function>*_new()</function> C function's parameters do not correspond directly 
> to object properties, or because the <function>*_new()</function> C function do 
>es more than call <function>g_object_new()</function>, the <function>_CONSTRUCT( 
>)</function> macro may be used in the .ccg file to save some work. The <function 
>>_CONSTRUCT</function> macro takes a series of property names and values. For in 
>stance, from <filename>button.ccg</filename>:" 
24163msgid ""
24164"When a constructor must be partly hand written because, for instance, the "
24165"<function>*_new()</function> C function's parameters do not correspond "
24166"directly to object properties, or because the <function>*_new()</function> C "
24167"function does more than call <function>g_object_new()</function>, the "
24168"<function>_CONSTRUCT()</function> macro may be used in the .ccg file to save "
24169"some work. The <function>_CONSTRUCT</function> macro takes a series of "
24170"property names and values. For instance, from <filename>button.ccg</"
24171"filename>:"
11710msgstr ""24172msgstr ""
nn24173"När en konstruktor måste skrivas delvis för hand eftersom, exempelvis, "
24174"<function>*_new()</function>-funktionens parametrar i C inte direkt "
24175"motsvarar objektegenskaper, eller för att <function>*_new()</function>-"
24176"funktionen i C gör mer än att anropa <function>g_object_new()</function>, så "
24177"kan makrot <function>_CONSTRUCT()</function> användas i .ccg-filen för att "
24178"spara lite arbete. Makrot <function>_CONSTRUCT</function> tar en serie "
24179"egenskapsnamn och värden. Till exempel, från <filename>button.ccg</filename>:"
1171124180
11712#. (itstool) path: section/programlisting24181#. (itstool) path: section/programlisting
11713#: C/index-in.docbook:1039724182#: C/index-in.docbook:10397
n11714#, no-wrapn24183#, fuzzy, no-wrap
11715msgid ""24184msgid ""
11716"<code>Button::Button(const Glib::ustring&amp; label, bool mnemonic)\n"24185"<code>Button::Button(const Glib::ustring&amp; label, bool mnemonic)\n"
11717":\n"24186":\n"
11718"  _CONSTRUCT(\"label\", label.c_str(), \"use_underline\", gboolean(mnemonic))\n24187"  _CONSTRUCT(\"label\", label.c_str(), \"use_underline\", gboolean(mnemonic))\n
>">"
11719"{}\n"24188"{}\n"
11720"</code>"24189"</code>"
11721msgstr ""24190msgstr ""
nn24191"\n"
24192"Button::Button(const Glib::ustring&amp; label, bool mnemonic)\n"
24193":\n"
24194"  _CONSTRUCT(\"label\", label.c_str(), \"use_underline\", gboolean(mnemonic))\n
 >"
24195"{}\n"
1172224196
11723#. (itstool) path: section/title24197#. (itstool) path: section/title
11724#: C/index-in.docbook:1040724198#: C/index-in.docbook:10407
11725msgid "Macros that suppress generation of some code"24199msgid "Macros that suppress generation of some code"
n11726msgstr ""n24200msgstr "Makron som undertrycker generering av viss kod"
1172724201
11728#. (itstool) path: section/para24202#. (itstool) path: section/para
11729#: C/index-in.docbook:1040924203#: C/index-in.docbook:10409
n11730msgid "Some macros suppress the generation of some code when they are used aftern24204msgid ""
> a <function>_CLASS_*</function> macro. Some suppress the definition in the gene 
>rated .cc file, others suppress both the declaration in the .h file and the defi 
>nition in the .cc file." 
24205"Some macros suppress the generation of some code when they are used after a "
24206"<function>_CLASS_*</function> macro. Some suppress the definition in the "
24207"generated .cc file, others suppress both the declaration in the .h file and "
24208"the definition in the .cc file."
11731msgstr ""24209msgstr ""
nn24210"Några makron undertrycker genererandet av viss kod när de används efter ett "
24211"<function>_CLASS_*</function>-makro. Vissa undertrycker definitionen i den "
24212"genererade .cc-filen, andra undertrycker både deklarationen i .h-filen och "
24213"definitionen i .cc-filen."
1173224214
11733#. (itstool) path: section/title24215#. (itstool) path: section/title
11734#: C/index-in.docbook:1041624216#: C/index-in.docbook:10416
11735msgid "_CUSTOM_DEFAULT_CTOR"24217msgid "_CUSTOM_DEFAULT_CTOR"
n11736msgstr ""n24218msgstr "_CUSTOM_DEFAULT_CTOR"
1173724219
11738#. (itstool) path: section/para24220#. (itstool) path: section/para
11739#: C/index-in.docbook:1041824221#: C/index-in.docbook:10418
n11740msgid "Suppresses declaration and definition of default constructor in <functionn24222msgid ""
>>_CLASS_BOXEDTYPE</function>, <function>_CLASS_BOXEDTYPE_STATIC</function> and < 
>function>_CLASS_OPAQUE_COPYABLE</function>." 
24223"Suppresses declaration and definition of default constructor in "
24224"<function>_CLASS_BOXEDTYPE</function>, <function>_CLASS_BOXEDTYPE_STATIC</"
24225"function> and <function>_CLASS_OPAQUE_COPYABLE</function>."
11741msgstr ""24226msgstr ""
nn24227"Undertrycker deklaration och definition av standardkonstruktorn i "
24228"<function>_CLASS_BOXEDTYPE</function>, <function>_CLASS_BOXEDTYPE_STATIC</"
24229"function> och <function>_CLASS_OPAQUE_COPYABLE</function>."
1174224230
11743#. (itstool) path: section/title24231#. (itstool) path: section/title
11744#: C/index-in.docbook:1042524232#: C/index-in.docbook:10425
11745msgid "_CUSTOM_CTOR_CAST"24233msgid "_CUSTOM_CTOR_CAST"
n11746msgstr ""n24234msgstr "_CUSTOM_CTOR_CAST"
1174724235
11748#. (itstool) path: section/para24236#. (itstool) path: section/para
11749#: C/index-in.docbook:1042724237#: C/index-in.docbook:10427
n11750msgid "Suppresses declaration and definition of the constructor that takes a poin24238#, fuzzy
>nter to the wrapped C object in <function>_CLASS_BOXEDTYPE</function> and <funct 
>ion>_CLASS_BOXEDTYPE_STATIC</function>." 
24239msgid ""
24240"Suppresses declaration and definition of the constructor that takes a "
24241"pointer to the wrapped C object in <function>_CLASS_BOXEDTYPE</function> and "
24242"<function>_CLASS_BOXEDTYPE_STATIC</function>."
11751msgstr ""24243msgstr ""
nn24244"Undertrycker deklaration och definition av konstruktorn som tar en pekare "
24245"till det omslutna C-objektet i <function>_CLASS_BOXEDTYPE</function> och "
24246"<function>_CLASS_BOXEDTYPE_STATIC</function>."
1175224247
11753#. (itstool) path: section/para24248#. (itstool) path: section/para
11754#: C/index-in.docbook:1043124249#: C/index-in.docbook:10431
n11755msgid "Suppresses definition of the constructor that takes a pointer to the wrapn24250#, fuzzy
>ped C object in <function>_CLASS_INTERFACE</function> and <function>_CLASS_OPAQU 
>E_COPYABLE</function>." 
24251msgid ""
24252"Suppresses definition of the constructor that takes a pointer to the wrapped "
24253"C object in <function>_CLASS_INTERFACE</function> and "
24254"<function>_CLASS_OPAQUE_COPYABLE</function>."
11756msgstr ""24255msgstr ""
nn24256"Undertrycker definition av konstruktorn som tar en pekare till det omslutna "
24257"C-objektet i <function>_CLASS_INTERFACE</function> och "
24258"<function>_CLASS_OPAQUE_COPYABLE</function>."
1175724259
11758#. (itstool) path: section/para24260#. (itstool) path: section/para
11759#: C/index-in.docbook:1043524261#: C/index-in.docbook:10435
n11760msgid "Suppresses definition of the constructor that takes a pointer to the wrapn24262#, fuzzy
>ped C object and the constructor that takes construct_params in <function>_CLASS 
>_GOBJECT</function> and <function>_CLASS_GTKOBJECT</function>." 
24263msgid ""
24264"Suppresses definition of the constructor that takes a pointer to the wrapped "
24265"C object and the constructor that takes construct_params in "
24266"<function>_CLASS_GOBJECT</function> and <function>_CLASS_GTKOBJECT</"
24267"function>."
11761msgstr ""24268msgstr ""
nn24269"Undertrycker definition av konstruktorn som tar en pekare till det omslutna "
24270"C-objektet och konstruktorn som tar construct_params i "
24271"<function>_CLASS_GOBJECT</function> och <function>_CLASS_GTKOBJECT</"
24272"function>."
1176224273
11763#. (itstool) path: section/title24274#. (itstool) path: section/title
11764#: C/index-in.docbook:1044224275#: C/index-in.docbook:10442
11765msgid "_CUSTOM_DTOR"24276msgid "_CUSTOM_DTOR"
n11766msgstr ""n24277msgstr "_CUSTOM_DTOR"
1176724278
11768#. (itstool) path: section/para24279#. (itstool) path: section/para
11769#: C/index-in.docbook:1044424280#: C/index-in.docbook:10444
nn24281msgid ""
11770msgid "Suppresses definition of destructor in <function>_CLASS_GOBJECT</function24282"Suppresses definition of destructor in <function>_CLASS_GOBJECT</function> "
>and <function>_CLASS_GTKOBJECT</function>." 
24283"and <function>_CLASS_GTKOBJECT</function>."
11771msgstr ""24284msgstr ""
nn24285"Undertrycker definition av destruktorn i <function>_CLASS_GOBJECT</function> "
24286"och <function>_CLASS_GTKOBJECT</function>."
1177224287
11773#. (itstool) path: section/title24288#. (itstool) path: section/title
11774#: C/index-in.docbook:1045024289#: C/index-in.docbook:10450
11775msgid "_CUSTOM_MOVE_OPERATIONS"24290msgid "_CUSTOM_MOVE_OPERATIONS"
n11776msgstr ""n24291msgstr "_CUSTOM_MOVE_OPERATIONS"
1177724292
11778#. (itstool) path: section/para24293#. (itstool) path: section/para
11779#: C/index-in.docbook:1045224294#: C/index-in.docbook:10452
n11780msgid "Suppresses declaration and definition of move constructor and move assignn24295#, fuzzy
>ment operator in <function>_CLASS_GOBJECT</function> and <function>_CLASS_GTKOBJ 
>ECT</function>." 
24296msgid ""
24297"Suppresses declaration and definition of move constructor and move "
24298"assignment operator in <function>_CLASS_GOBJECT</function> and "
24299"<function>_CLASS_GTKOBJECT</function>."
11781msgstr ""24300msgstr ""
nn24301"Undertrycker deklaration och definition av move-konstruktor och move-"
24302"tilldelningsoperator i <function>_CLASS_GOBJECT</function> och "
24303"<function>_CLASS_GTKOBJECT</function>."
1178224304
11783#. (itstool) path: section/para24305#. (itstool) path: section/para
11784#: C/index-in.docbook:1045624306#: C/index-in.docbook:10456
11785msgid "For example:"24307msgid "For example:"
n11786msgstr ""n24308msgstr "Till exempel:"
1178724309
11788#. (itstool) path: section/programlisting24310#. (itstool) path: section/programlisting
11789#: C/index-in.docbook:1045724311#: C/index-in.docbook:10457
n11790#, no-wrapn24312#, fuzzy, no-wrap
11791msgid ""24313msgid ""
11792"<code>class Derived : public Glib::Object\n"24314"<code>class Derived : public Glib::Object\n"
11793"{\n"24315"{\n"
11794"  _CLASS_GOBJECT(Derived, GDerived, G_DERIVED, Glib::Object, GObject)\n"24316"  _CLASS_GOBJECT(Derived, GDerived, G_DERIVED, Glib::Object, GObject)\n"
11795"\n"24317"\n"
11800"  Derived&amp; operator=(Derived&amp;&amp; src) noexcept;\n"24322"  Derived&amp; operator=(Derived&amp;&amp; src) noexcept;\n"
11801"  // ...\n"24323"  // ...\n"
11802"};\n"24324"};\n"
11803"</code>"24325"</code>"
11804msgstr ""24326msgstr ""
nn24327"\n"
24328"class Derived : public Glib::Object\n"
24329"{\n"
24330"  _CLASS_GOBJECT(Derived, GDerived, G_DERIVED, Glib::Object, GObject)\n"
24331"\n"
24332"  _CUSTOM_MOVE_OPERATIONS\n"
24333"\n"
24334"public:\n"
24335"  Derived(Derived&amp;&amp; src) noexcept;\n"
24336"  Derived&amp; operator=(Derived&amp;&amp; src) noexcept;\n"
24337"  // ...\n"
24338"};\n"
1180524339
11806#. (itstool) path: section/title24340#. (itstool) path: section/title
11807#: C/index-in.docbook:1047224341#: C/index-in.docbook:10472
11808msgid "_CUSTOM_WRAP_NEW"24342msgid "_CUSTOM_WRAP_NEW"
n11809msgstr ""n24343msgstr "_CUSTOM_WRAP_NEW"
1181024344
11811#. (itstool) path: section/para24345#. (itstool) path: section/para
11812#: C/index-in.docbook:1047424346#: C/index-in.docbook:10474
nn24347msgid ""
11813msgid "Suppresses definition of <function>Glib::wrap_new()</function> function i24348"Suppresses definition of <function>Glib::wrap_new()</function> function in "
><function>_CLASS_GOBJECT</function>." 
24349"<function>_CLASS_GOBJECT</function>."
11814msgstr ""24350msgstr ""
nn24351"Undertrycker definition av <function>Glib::wrap_new()</function>-funktionen "
24352"i <function>_CLASS_GOBJECT</function>."
1181524353
11816#. (itstool) path: section/title24354#. (itstool) path: section/title
11817#: C/index-in.docbook:1048024355#: C/index-in.docbook:10480
11818msgid "_CUSTOM_WRAP_FUNCTION"24356msgid "_CUSTOM_WRAP_FUNCTION"
n11819msgstr ""n24357msgstr "_CUSTOM_WRAP_FUNCTION"
1182024358
11821#. (itstool) path: section/para24359#. (itstool) path: section/para
11822#: C/index-in.docbook:1048224360#: C/index-in.docbook:10482
n11823msgid "Suppresses definition of <function>Glib::wrap()</function> function in <fn24361msgid ""
>unction>_CLASS_GOBJECT</function> and <function>_CLASS_GTKOBJECT</function>." 
24362"Suppresses definition of <function>Glib::wrap()</function> function in "
24363"<function>_CLASS_GOBJECT</function> and <function>_CLASS_GTKOBJECT</"
24364"function>."
11824msgstr ""24365msgstr ""
nn24366"Undertrycker definition av <function>Glib::wrap()</function>-funktionen i "
24367"<function>_CLASS_GOBJECT</function> och <function>_CLASS_GTKOBJECT</"
24368"function>."
1182524369
11826#. (itstool) path: section/title24370#. (itstool) path: section/title
11827#: C/index-in.docbook:1048824371#: C/index-in.docbook:10488
11828msgid "_NO_WRAP_FUNCTION"24372msgid "_NO_WRAP_FUNCTION"
n11829msgstr ""n24373msgstr "_NO_WRAP_FUNCTION"
1183024374
11831#. (itstool) path: section/para24375#. (itstool) path: section/para
11832#: C/index-in.docbook:1049024376#: C/index-in.docbook:10490
n11833msgid "Suppresses declaration and definition of <function>Glib::wrap()</functionn24377msgid ""
>> function in <function>_CLASS_GOBJECT</function>, <function>_CLASS_BOXEDTYPE</f 
>unction>, <function>_CLASS_BOXEDTYPE_STATIC</function>, <function>_CLASS_OPAQUE_ 
>COPYABLE</function>, <function>_CLASS_INTERFACE</function> and <function>_CLASS_ 
>GTKOBJECT</function>." 
24378"Suppresses declaration and definition of <function>Glib::wrap()</function> "
24379"function in <function>_CLASS_GOBJECT</function>, <function>_CLASS_BOXEDTYPE</"
24380"function>, <function>_CLASS_BOXEDTYPE_STATIC</function>, "
24381"<function>_CLASS_OPAQUE_COPYABLE</function>, <function>_CLASS_INTERFACE</"
24382"function> and <function>_CLASS_GTKOBJECT</function>."
11834msgstr ""24383msgstr ""
nn24384"Undertrycker deklaration och definition av <function>Glib::wrap()</function>-"
24385"funktionen i <function>_CLASS_GOBJECT</function>, "
24386"<function>_CLASS_BOXEDTYPE</function>, <function>_CLASS_BOXEDTYPE_STATIC</"
24387"function>, <function>_CLASS_OPAQUE_COPYABLE</function>, "
24388"<function>_CLASS_INTERFACE</function> och <function>_CLASS_GTKOBJECT</"
24389"function>."
1183524390
11836#. (itstool) path: section/title24391#. (itstool) path: section/title
11837#: C/index-in.docbook:1050024392#: C/index-in.docbook:10500
11838msgid "Method macros"24393msgid "Method macros"
n11839msgstr ""n24394msgstr "Metodmakron"
1184024395
11841#. (itstool) path: section/title24396#. (itstool) path: section/title
11842#: C/index-in.docbook:1050324397#: C/index-in.docbook:10503
11843msgid "_WRAP_METHOD"24398msgid "_WRAP_METHOD"
n11844msgstr ""n24399msgstr "_WRAP_METHOD"
1184524400
11846#. (itstool) path: section/para24401#. (itstool) path: section/para
11847#: C/index-in.docbook:1050524402#: C/index-in.docbook:10505
nn24403#, fuzzy
24404msgid ""
11848msgid "This macro generates the <phrase role=\"nowrap\">C++</phrase> method to w24405"This macro generates the <phrase role=\"nowrap\">C++</phrase> method to wrap "
>rap a C function." 
11849msgstr ""24406"a C function."
24407msgstr "Detta makro genererar C++-metoden som ska omsluta en C-funktion."
1185024408
11851#. (itstool) path: section/para24409#. (itstool) path: section/para
11852#: C/index-in.docbook:1050624410#: C/index-in.docbook:10506
nn24411msgid ""
11853msgid "<function>_WRAP_METHOD( C++ method signature, C function name)</function>24412"<function>_WRAP_METHOD( C++ method signature, C function name)</function>"
>" 
11854msgstr ""24413msgstr "<function>_WRAP_METHOD( C++-metodsignatur, C-funktionsnamn)</function>"
1185524414
11856#. (itstool) path: section/para24415#. (itstool) path: section/para
11857#: C/index-in.docbook:1050724416#: C/index-in.docbook:10507
11858msgid "For instance, from <filename>entry.hg</filename>:"24417msgid "For instance, from <filename>entry.hg</filename>:"
n11859msgstr ""n24418msgstr "Till exempel, från <filename>entry.hg</filename>:"
1186024419
11861#. (itstool) path: section/programlisting24420#. (itstool) path: section/programlisting
11862#: C/index-in.docbook:1050824421#: C/index-in.docbook:10508
n11863#, no-wrapn24422#, fuzzy, no-wrap
24423#| msgid ""
24424#| "\n"
24425#| "_WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_tex
 >t)\n"
11864msgid ""24426msgid ""
11865"<code>_WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_24427"<code>_WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_
>text)\n">text)\n"
11866"</code>"24428"</code>"
11867msgstr ""24429msgstr ""
nn24430"\n"
24431"_WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_text)\
 >n"
1186824432
11869#. (itstool) path: section/para24433#. (itstool) path: section/para
11870#: C/index-in.docbook:1051024434#: C/index-in.docbook:10510
n11871msgid "The C function (e.g. <function>gtk_entry_set_text</function>) is describen24435#, fuzzy
>d more fully in the .defs file, and the <filename>convert*.m4</filename> files c 
>ontain the necessary conversion from the <phrase role=\"nowrap\">C++</phrase> pa 
>rameter type to the C parameter type. This macro also generates doxygen document 
>ation comments based on the <filename>*_docs.xml</filename> and <filename>*_docs 
>_override.xml</filename> files." 
24436msgid ""
24437"The C function (e.g. <function>gtk_entry_set_text</function>) is described "
24438"more fully in the .defs file, and the <filename>convert*.m4</filename> files "
24439"contain the necessary conversion from the <phrase role=\"nowrap\">C++</"
24440"phrase> parameter type to the C parameter type. This macro also generates "
24441"doxygen documentation comments based on the <filename>*_docs.xml</filename> "
24442"and <filename>*_docs_override.xml</filename> files."
11872msgstr ""24443msgstr ""
nn24444"C-funktionen (t.ex. <function>gtk_entry_set_text</function>) beskrivs mer "
24445"fullständigt i .defs-filen, och <filename>convert*.m4</filename>-filerna "
24446"innehåller den nödvändiga konverteringen från C++-parametertypen till C-"
24447"parametertypen. Detta makro genererar också doxygendokumentationskommentarer "
24448"baserade på filerna <filename>*_docs.xml</filename> och "
24449"<filename>*_docs_override.xml</filename>."
1187324450
11874#. (itstool) path: varlistentry/term24451#. (itstool) path: varlistentry/term
n11875#: C/index-in.docbook:10519n24452#: C/index-in.docbook:10519 C/index-in.docbook:10754 C/index-in.docbook:10862
11876#: C/index-in.docbook:10754
11877#: C/index-in.docbook:10862
11878msgid "refreturn"24453msgid "refreturn"
n11879msgstr ""n24454msgstr "refreturn"
1188024455
11881#. (itstool) path: listitem/para24456#. (itstool) path: listitem/para
11882#: C/index-in.docbook:1052124457#: C/index-in.docbook:10521
nn24458#, fuzzy
24459msgid ""
11883msgid "Do an extra <function>reference()</function> on the return value, in case24460"Do an extra <function>reference()</function> on the return value, in case "
> the C function does not provide a reference." 
24461"the C function does not provide a reference."
11884msgstr ""24462msgstr ""
nn24463"Gör en extra <function>reference()</function> på returvärdet ifall C-"
24464"funktionen inte tillhandahåller en referens."
1188524465
11886#. (itstool) path: varlistentry/term24466#. (itstool) path: varlistentry/term
n11887#: C/index-in.docbook:10526n24467#: C/index-in.docbook:10526 C/index-in.docbook:10656
11888#: C/index-in.docbook:10656
11889msgid "errthrow [\"&lt;exceptions&gt;\"]"24468msgid "errthrow [\"&lt;exceptions&gt;\"]"
n11890msgstr ""n24469msgstr "errthrow [\"&lt;undantag&gt;\"]"
1189124470
11892#. (itstool) path: listitem/para24471#. (itstool) path: listitem/para
11893#: C/index-in.docbook:1052824472#: C/index-in.docbook:10528
n11894msgid "Use the last GError** parameter of the C function to throw an exception. n24473#, fuzzy
>The optional \"&lt;exceptions&gt;\" is a comma-separated list of exceptions that 
> can be thrown. It determines which @throws Doxygen commands are added to the do 
>cumentation. Default value is <classname>Glib::Error</classname>. If you want a  
>comma in the description of an exception, precede it by a backslash. Example: <c 
>ode>errthrow \"Glib::OptionError Hello\\, world, Glib::ConvertError\"</code>" 
24474msgid ""
24475"Use the last GError** parameter of the C function to throw an exception. The "
24476"optional \"&lt;exceptions&gt;\" is a comma-separated list of exceptions that "
24477"can be thrown. It determines which @throws Doxygen commands are added to the "
24478"documentation. Default value is <classname>Glib::Error</classname>. If you "
24479"want a comma in the description of an exception, precede it by a backslash. "
24480"Example: <code>errthrow \"Glib::OptionError Hello\\, world, Glib::"
24481"ConvertError\"</code>"
11895msgstr ""24482msgstr ""
nn24483"Använd den sista GError**-parametern i C-funktionen för att kasta ett "
24484"undantag. Den valfria \"&lt;undantag&gt;\" är en kommaseparerad lista över "
24485"undantag som kan kastas. Det avgör vilka @throws-Doxygenkommandon som läggs "
24486"till i dokumentationen. Standardvärdet är <classname>Glib::Error</"
24487"classname>. Om du vill ha ett komma i beskrivningen av ett undantag föregår "
24488"du det med ett bakstreck. Exempel: <code>errthrow \"Glib::OptionError "
24489"Hello\\, world, Glib::ConvertError\"</code>"
1189624490
11897#. (itstool) path: varlistentry/term24491#. (itstool) path: varlistentry/term
n11898#: C/index-in.docbook:10539n24492#: C/index-in.docbook:10539 C/index-in.docbook:10762 C/index-in.docbook:10828
11899#: C/index-in.docbook:10762
11900#: C/index-in.docbook:10828
11901#: C/index-in.docbook:1107424493#: C/index-in.docbook:11074
11902msgid "deprecated [\"&lt;text&gt;\"]"24494msgid "deprecated [\"&lt;text&gt;\"]"
n11903msgstr ""n24495msgstr "deprecated [\"&lt;text&gt;\"]"
1190424496
11905#. (itstool) path: listitem/para24497#. (itstool) path: listitem/para
n11906#: C/index-in.docbook:10541n24498#: C/index-in.docbook:10541 C/index-in.docbook:10764 C/index-in.docbook:10830
11907#: C/index-in.docbook:10764
11908#: C/index-in.docbook:10830
11909#: C/index-in.docbook:1107624499#: C/index-in.docbook:11076
nn24500msgid ""
11910msgid "Puts the generated code in #ifdef blocks. Text about the deprecation can 24501"Puts the generated code in #ifdef blocks. Text about the deprecation can be "
>be specified as an optional parameter." 
24502"specified as an optional parameter."
11911msgstr ""24503msgstr ""
nn24504"Stoppar den genererade koden i #ifdef-block. Text om föråldringen kan anges "
24505"som en valfri parameter."
1191224506
11913#. (itstool) path: varlistentry/term24507#. (itstool) path: varlistentry/term
11914#: C/index-in.docbook:1054724508#: C/index-in.docbook:10547
11915msgid "ignore_deprecations"24509msgid "ignore_deprecations"
n11916msgstr ""n24510msgstr "ignore_deprecations"
1191724511
11918#. (itstool) path: listitem/para24512#. (itstool) path: listitem/para
11919#: C/index-in.docbook:1054924513#: C/index-in.docbook:10549
n11920msgid "Puts the generated code in the .cc file in a G_GNUC_BEGIN_IGNORE_DEPRECATn24514msgid ""
>IONS / G_GNUC_END_IGNORE_DEPRECATIONS block. (Only in glibmm &gt;= 2.70.1)" 
24515"Puts the generated code in the .cc file in a "
24516"G_GNUC_BEGIN_IGNORE_DEPRECATIONS / G_GNUC_END_IGNORE_DEPRECATIONS block. "
24517"(Only in glibmm &gt;= 2.70.1)"
11921msgstr ""24518msgstr ""
nn24519"Stoppar den genererade koden i .cc-filen i ett "
24520"G_GNUC_BEGIN_IGNORE_DEPRECATIONS / G_GNUC_END_IGNORE_DEPRECATIONS-block. "
24521"(Endast i glibmm &gt;= 2.70.1)"
1192224522
11923#. (itstool) path: varlistentry/term24523#. (itstool) path: varlistentry/term
11924#: C/index-in.docbook:1055524524#: C/index-in.docbook:10555
11925msgid "constversion"24525msgid "constversion"
n11926msgstr ""n24526msgstr "constversion"
1192724527
11928#. (itstool) path: listitem/para24528#. (itstool) path: listitem/para
11929#: C/index-in.docbook:1055724529#: C/index-in.docbook:10557
nn24530#, fuzzy
24531msgid ""
11930msgid "Just call the non-const version of the same function, instead of generati24532"Just call the non-const version of the same function, instead of generating "
>ng almost duplicate code." 
24533"almost duplicate code."
11931msgstr ""24534msgstr ""
nn24535"Anropa helt enkelt den icke-konstanta versionen av samma funktion i stället "
24536"för att generera nästan identisk kod."
1193224537
11933#. (itstool) path: varlistentry/term24538#. (itstool) path: varlistentry/term
n11934#: C/index-in.docbook:10562n24539#: C/index-in.docbook:10562 C/index-in.docbook:10669 C/index-in.docbook:10769
11935#: C/index-in.docbook:1066924540#: C/index-in.docbook:10835 C/index-in.docbook:11081
11936#: C/index-in.docbook:10769
11937#: C/index-in.docbook:10835
11938#: C/index-in.docbook:11081
11939msgid "newin \"&lt;version&gt;\""24541msgid "newin \"&lt;version&gt;\""
n11940msgstr ""n24542msgstr "newin \"&lt;version&gt;\""
1194124543
11942#. (itstool) path: listitem/para24544#. (itstool) path: listitem/para
n11943#: C/index-in.docbook:10564n24545#: C/index-in.docbook:10564 C/index-in.docbook:10671 C/index-in.docbook:10771
11944#: C/index-in.docbook:1067124546#: C/index-in.docbook:10837 C/index-in.docbook:11083
11945#: C/index-in.docbook:1077124547#, fuzzy
11946#: C/index-in.docbook:1083724548msgid ""
11947#: C/index-in.docbook:11083
11948msgid "Adds a @newin Doxygen command to the documentation, or replaces the @newi24549"Adds a @newin Doxygen command to the documentation, or replaces the @newin "
>command generated from the C documentation." 
24550"command generated from the C documentation."
11949msgstr ""24551msgstr ""
nn24552"Lägger till ett @newin-Doxygenkommando till dokumentationen, eller ersätter "
24553"@newin-kommandot som genererats från C-dokumentationen."
1195024554
11951#. (itstool) path: varlistentry/term24555#. (itstool) path: varlistentry/term
n11952#: C/index-in.docbook:10569n24556#: C/index-in.docbook:10569 C/index-in.docbook:10776 C/index-in.docbook:10909
11953#: C/index-in.docbook:10776
11954#: C/index-in.docbook:10909
11955#: C/index-in.docbook:1099624557#: C/index-in.docbook:10996
11956msgid "ifdef &lt;identifier&gt;"24558msgid "ifdef &lt;identifier&gt;"
n11957msgstr ""n24559msgstr "ifdef &lt;identifierare&gt;"
1195824560
11959#. (itstool) path: listitem/para24561#. (itstool) path: listitem/para
n11960#: C/index-in.docbook:10571n24562#: C/index-in.docbook:10571 C/index-in.docbook:10778 C/index-in.docbook:10911
11961#: C/index-in.docbook:10778
11962#: C/index-in.docbook:10911
11963#: C/index-in.docbook:1099824563#: C/index-in.docbook:10998
11964msgid "Puts the generated code in #ifdef blocks."24564msgid "Puts the generated code in #ifdef blocks."
n11965msgstr ""n24565msgstr "Stoppar den genererade koden i #ifdef-block."
1196624566
11967#. (itstool) path: varlistentry/term24567#. (itstool) path: varlistentry/term
n11968#: C/index-in.docbook:10575n24568#: C/index-in.docbook:10575 C/index-in.docbook:10915
11969#: C/index-in.docbook:10915
11970msgid "slot_name &lt;parameter_name&gt;"24569msgid "slot_name &lt;parameter_name&gt;"
n11971msgstr ""n24570msgstr "slot_name &lt;parameternamn&gt;"
1197224571
11973#. (itstool) path: listitem/para24572#. (itstool) path: listitem/para
n11974#: C/index-in.docbook:10577n24573#: C/index-in.docbook:10577 C/index-in.docbook:10917
11975#: C/index-in.docbook:1091724574#, fuzzy
11976msgid "Specifies the name of the slot parameter of the method, if it has one. Th24575msgid ""
>is enables <command>gmmproc</command> to generate code to copy the slot and pass 
> the copy on to the C function in its final <literal>gpointer user_data</literal 
>> parameter. The <literal>slot_callback</literal> option must also be used to sp 
>ecify the name of the glue callback function to also pass on to the C function." 
24576"Specifies the name of the slot parameter of the method, if it has one. This "
24577"enables <command>gmmproc</command> to generate code to copy the slot and "
24578"pass the copy on to the C function in its final <literal>gpointer user_data</"
24579"literal> parameter. The <literal>slot_callback</literal> option must also be "
24580"used to specify the name of the glue callback function to also pass on to "
24581"the C function."
11977msgstr ""24582msgstr ""
nn24583"Anger namnet på fackparametern för metoden om den har någon. Detta låter "
24584"<command>gmmproc</command> generera kod för att kopiera facket och skicka "
24585"kopian till C-funktionen i dess sista <literal>gpointer user_data</literal>-"
24586"parameter. Alternativet <literal>slot_callback</literal> måste också "
24587"användas för att ange namnet på limåteranropsfunktionen att också skicka "
24588"till C-funktionen."
1197824589
11979#. (itstool) path: varlistentry/term24590#. (itstool) path: varlistentry/term
n11980#: C/index-in.docbook:10587n24591#: C/index-in.docbook:10587 C/index-in.docbook:10927
11981#: C/index-in.docbook:10927
11982msgid "slot_callback &lt;function_name&gt;"24592msgid "slot_callback &lt;function_name&gt;"
n11983msgstr ""n24593msgstr "slot_callback &lt;funktionsnamn&gt;"
1198424594
11985#. (itstool) path: listitem/para24595#. (itstool) path: listitem/para
n11986#: C/index-in.docbook:10589n24596#: C/index-in.docbook:10589 C/index-in.docbook:10929
11987#: C/index-in.docbook:1092924597#, fuzzy
11988msgid "Used in conjunction with the <literal>slot_name</literal> option to speci24598msgid ""
>fy the name of the glue callback function that handles extracting the slot and t 
>hen calling it. The address of this callback is also passed on to the C function 
> that the method wraps." 
24599"Used in conjunction with the <literal>slot_name</literal> option to specify "
24600"the name of the glue callback function that handles extracting the slot and "
24601"then calling it. The address of this callback is also passed on to the C "
24602"function that the method wraps."
11989msgstr ""24603msgstr ""
nn24604"Används tillsammans med alternativet <literal>slot_name</literal> för att "
24605"ange namnet på limåteranropsfunktionen som hanterar extrahering av facket "
24606"och sedan anropar det. Adressen för detta återanrop skickas också till C-"
24607"funktionen som metoden omsluter."
1199024608
11991#. (itstool) path: varlistentry/term24609#. (itstool) path: varlistentry/term
n11992#: C/index-in.docbook:10597n24610#: C/index-in.docbook:10597 C/index-in.docbook:10937
11993#: C/index-in.docbook:10937
11994msgid "no_slot_copy"24611msgid "no_slot_copy"
n11995msgstr ""n24612msgstr "no_slot_copy"
1199624613
11997#. (itstool) path: listitem/para24614#. (itstool) path: listitem/para
n11998#: C/index-in.docbook:10599n24615#: C/index-in.docbook:10599 C/index-in.docbook:10939
11999#: C/index-in.docbook:1093924616#, fuzzy
12000msgid "Tells <command>gmmproc</command> not to pass a copy of the slot to the C 24617msgid ""
>function, if the method has one. Instead the slot itself is passed. The slot par 
>ameter name and the glue callback function must have been specified with the <li 
>teral>slot_name</literal> and <literal>slot_callback</literal> options respectiv 
>ely." 
24618"Tells <command>gmmproc</command> not to pass a copy of the slot to the C "
24619"function, if the method has one. Instead the slot itself is passed. The slot "
24620"parameter name and the glue callback function must have been specified with "
24621"the <literal>slot_name</literal> and <literal>slot_callback</literal> "
24622"options respectively."
12001msgstr ""24623msgstr ""
nn24624"Säger till <command>gmmproc</command> att inte skicka en kopia av facket "
24625"till C-funktionen, om metoden har en. I stället skickas facket självt. "
24626"Fackparameternamnet och limåteranropsfunktionen måste ha angivits med "
24627"alternativen <literal>slot_name</literal> respektive <literal>slot_callback</"
24628"literal>."
1200224629
12003#. (itstool) path: section/para24630#. (itstool) path: section/para
n12004#: C/index-in.docbook:10516n24631#: C/index-in.docbook:10516 C/index-in.docbook:10653 C/index-in.docbook:10724
12005#: C/index-in.docbook:1065324632#: C/index-in.docbook:10825 C/index-in.docbook:10859 C/index-in.docbook:11013
12006#: C/index-in.docbook:10724
12007#: C/index-in.docbook:10825
12008#: C/index-in.docbook:10859
12009#: C/index-in.docbook:11013
12010msgid "There are some optional extra arguments: <_:variablelist-1/>"24633msgid "There are some optional extra arguments: <_:variablelist-1/>"
n12011msgstr ""n24634msgstr "Det finns några valfria extra argument: <_:variablelist-1/>"
1201224635
12013#. (itstool) path: listitem/para24636#. (itstool) path: listitem/para
12014#: C/index-in.docbook:1061224637#: C/index-in.docbook:10612
n12015msgid "Objects used via <classname>RefPtr</classname>: Pass the <classname>RefPtn24638#, fuzzy
>r</classname> as a const reference. For instance, <code>const Glib::RefPtr&lt;Gt 
>k::FileFilter&gt;&amp; filter</code>." 
24639msgid ""
24640"Objects used via <classname>RefPtr</classname>: Pass the <classname>RefPtr</"
24641"classname> as a const reference. For instance, <code>const Glib::RefPtr&lt;"
24642"Gtk::FileFilter&gt;&amp; filter</code>."
12016msgstr ""24643msgstr ""
nn24644"Objekt använda via <classname>RefPtr</classname>: Skicka <classname>RefPtr</"
24645"classname> som en const-referens. Till exempel, <code>const Glib::RefPtr&lt;"
24646"Gtk::FileFilter&gt;&amp; filter</code>."
1201724647
12018#. (itstool) path: listitem/para24648#. (itstool) path: listitem/para
12019#: C/index-in.docbook:1061624649#: C/index-in.docbook:10616
n12020msgid "Const Objects used via <classname>RefPtr</classname>: If the object shouln24650#, fuzzy
>d not be changed by the function, then make sure that the object is const, even  
>if the <classname>RefPtr</classname> is already const. For instance, <code>const 
> Glib::RefPtr&lt;const Gtk::FileFilter&gt;&amp; filter</code>." 
24651msgid ""
24652"Const Objects used via <classname>RefPtr</classname>: If the object should "
24653"not be changed by the function, then make sure that the object is const, "
24654"even if the <classname>RefPtr</classname> is already const. For instance, "
24655"<code>const Glib::RefPtr&lt;const Gtk::FileFilter&gt;&amp; filter</code>."
12021msgstr ""24656msgstr ""
nn24657"Const-objekt som används via <classname>RefPtr</classname>: Om objektet inte "
24658"ska ändras av funktionen ser du till att objektet är const, även om "
24659"<classname>RefPtr</classname>-pekaren redan är const. Till exempel, "
24660"<code>const Glib::RefPtr&lt;const Gtk::FileFilter&gt;&amp; filter</code>."
1202224661
12023#. (itstool) path: listitem/para24662#. (itstool) path: listitem/para
12024#: C/index-in.docbook:1062124663#: C/index-in.docbook:10621
n12025msgid "Wrapping <classname>GList*</classname> and <classname>GSList*</classname>n24664#, fuzzy
> parameters: First, you need to discover what objects are contained in the list' 
>s data field for each item, usually by reading the documentation for the C funct 
>ion. The list can then be wrapped by a <classname>std::vector</classname> type.  
>For instance, <code>std::vector&lt;Glib::RefPtr&lt;Gdk::Pixbuf&gt;&gt;</code>. Y 
>ou may need to define a Traits type to specify how the C and <phrase role=\"nowr 
>ap\">C++</phrase> types should be converted." 
24665msgid ""
24666"Wrapping <classname>GList*</classname> and <classname>GSList*</classname> "
24667"parameters: First, you need to discover what objects are contained in the "
24668"list's data field for each item, usually by reading the documentation for "
24669"the C function. The list can then be wrapped by a <classname>std::vector</"
24670"classname> type. For instance, <code>std::vector&lt;Glib::RefPtr&lt;Gdk::"
24671"Pixbuf&gt;&gt;</code>. You may need to define a Traits type to specify how "
24672"the C and <phrase role=\"nowrap\">C++</phrase> types should be converted."
12026msgstr ""24673msgstr ""
nn24674"Omsluta <classname>GList*</classname>- och <classname>GSList*</classname>-"
24675"parametrar: Först behöver du upptäcka vilka objekt som innehålls i listans "
24676"datafält för varje objekt, vanligen genom att läsa dokumentationen för C-"
24677"funktionen. Listan kan sedan omslutas av en <classname>std::vector</"
24678"classname>-typ. Till exempel, <code>std::vector&lt;Glib::RefPtr&lt;Gdk::"
24679"Pixbuf&gt;&gt;</code>. Du kan behöva definiera en Traits-typ för att ange "
24680"hur C- och C++-typerna ska konverteras."
1202724681
12028#. (itstool) path: listitem/para24682#. (itstool) path: listitem/para
12029#: C/index-in.docbook:1062924683#: C/index-in.docbook:10629
n12030msgid "Wrapping <classname>GList*</classname> and <classname>GSList*</classname>n24684#, fuzzy
> return types: You must discover whether the caller should free the list and whe 
>ther it should release the items in the list, again by reading the documentation 
> of the C function. With this information you can choose the ownership (none, sh 
>allow or deep) for the m4 conversion rule, which you should probably put directl 
>y into the .hg file because the ownership depends on the function rather than th 
>e type. For instance:" 
24685msgid ""
24686"Wrapping <classname>GList*</classname> and <classname>GSList*</classname> "
24687"return types: You must discover whether the caller should free the list and "
24688"whether it should release the items in the list, again by reading the "
24689"documentation of the C function. With this information you can choose the "
24690"ownership (none, shallow or deep) for the m4 conversion rule, which you "
24691"should probably put directly into the .hg file because the ownership depends "
24692"on the function rather than the type. For instance:"
12031msgstr ""24693msgstr ""
nn24694"Omsluta <classname>GList*</classname>- och <classname>GSList*</classname>-"
24695"returtyper: Du måste upptäcka huruvida anroparen ska frigöra listan och "
24696"huruvida den ska släppa objekten i listan, igen genom att läsa "
24697"dokumentationen för C-funktionen. Med denna information kan du välja "
24698"ägarskapet (none, shallow eller deep) för m4-konverteringsregeln, vilket du "
24699"troligen ska stoppa direkt i .hg-filen för ägarskapet beror på funktionen "
24700"snarare än typen. Till exempel: <_:programlisting-1/>"
1203224701
12033#. (itstool) path: listitem/programlisting24702#. (itstool) path: listitem/programlisting
12034#: C/index-in.docbook:1063724703#: C/index-in.docbook:10637
n12035#, no-wrapn24704#, fuzzy, no-wrap
12036msgid ""24705#| msgid "#m4 _CONVERSION(`GSList*',`std::vector&lt;Widget*&gt;',`Glib::SListHan
 >dler&lt;Widget*&gt;::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')"
12037"<code>#m4 _CONVERSION(`GSList*',`std::vector&lt;Widget*&gt;',`Glib::SListHandle24706msgid "<code>#m4 _CONVERSION(`GSList*',`std::vector&lt;Widget*&gt;',`Glib::SList
>r&lt;Widget*&gt;::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')</code>">Handler&lt;Widget*&gt;::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')</code>"
12038msgstr ""24707msgstr "#m4 _CONVERSION(`GSList*',`std::vector&lt;Widget*&gt;',`Glib::SListHandl
 >er&lt;Widget*&gt;::slist_to_vector($3, Glib::OWNERSHIP_SHALLOW)')"
1203924708
12040#. (itstool) path: section/para24709#. (itstool) path: section/para
12041#: C/index-in.docbook:1060824710#: C/index-in.docbook:10608
n12042msgid "Selecting which <phrase role=\"nowrap\">C++</phrase> types should be usedn24711#, fuzzy
> is also important when wrapping C API. Though it's usually obvious what <phrase 
> role=\"nowrap\">C++</phrase> types should be used in the <phrase role=\"nowrap\ 
>">C++</phrase> method, here are some hints: <_:itemizedlist-1/>" 
24712msgid ""
24713"Selecting which <phrase role=\"nowrap\">C++</phrase> types should be used is "
24714"also important when wrapping C API. Though it's usually obvious what <phrase "
24715"role=\"nowrap\">C++</phrase> types should be used in the <phrase "
24716"role=\"nowrap\">C++</phrase> method, here are some hints: <_:itemizedlist-1/>"
12043msgstr ""24717msgstr ""
nn24718"Att välja vilka C++-typer som ska användas är också viktigt när C-API "
24719"omsluts. Även om det vanligen är uppenbart vilka C++-typer som ska användas "
24720"i C++-metoden så kommer några tips här: <_:itemizedlist-1/>"
1204424721
12045#. (itstool) path: section/title24722#. (itstool) path: section/title
12046#: C/index-in.docbook:1064324723#: C/index-in.docbook:10643
12047msgid "_WRAP_METHOD_DOCS_ONLY"24724msgid "_WRAP_METHOD_DOCS_ONLY"
n12048msgstr ""n24725msgstr "_WRAP_METHOD_DOCS_ONLY"
1204924726
12050#. (itstool) path: section/para24727#. (itstool) path: section/para
12051#: C/index-in.docbook:1064524728#: C/index-in.docbook:10645
n12052msgid "This macro is like <function>_WRAP_METHOD()</function>, but it generates n24729#, fuzzy
>only the documentation for a <phrase role=\"nowrap\">C++</phrase> method that wr 
>aps a C function. Use this when you must hand-code the method, but you want to u 
>se the documentation that would be generated if the method was generated." 
24730msgid ""
24731"This macro is like <function>_WRAP_METHOD()</function>, but it generates "
24732"only the documentation for a <phrase role=\"nowrap\">C++</phrase> method "
24733"that wraps a C function. Use this when you must hand-code the method, but "
24734"you want to use the documentation that would be generated if the method was "
24735"generated."
12053msgstr ""24736msgstr ""
nn24737"Detta makro är som <function>_WRAP_METHOD()</function>, men genererar bara "
24738"dokumentationen för en C++-metod som omsluter en C-funktion. Använd detta "
24739"när du måste handkoda metoden, men vill använda dokumentationen som skulle "
24740"genereras om metoden var genererad."
1205424741
12055#. (itstool) path: section/para24742#. (itstool) path: section/para
12056#: C/index-in.docbook:1064924743#: C/index-in.docbook:10649
12057msgid "<function>_WRAP_METHOD_DOCS_ONLY(C function name)</function>"24744msgid "<function>_WRAP_METHOD_DOCS_ONLY(C function name)</function>"
n12058msgstr ""n24745msgstr "<function>_WRAP_METHOD_DOCS_ONLY(C-funktionsnamn)</function>"
1205924746
12060#. (itstool) path: section/para24747#. (itstool) path: section/para
12061#: C/index-in.docbook:1065024748#: C/index-in.docbook:10650
12062msgid "For instance, from <filename>recentinfo.hg</filename>:"24749msgid "For instance, from <filename>recentinfo.hg</filename>:"
n12063msgstr ""n24750msgstr "Till exempel, från <filename>recentinfo.hg</filename>:"
1206424751
12065#. (itstool) path: section/programlisting24752#. (itstool) path: section/programlisting
12066#: C/index-in.docbook:1065124753#: C/index-in.docbook:10651
n12067#, no-wrapn24754#, fuzzy, no-wrap
24755#| msgid ""
24756#| "\n"
24757#| "_WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_applications)\n"
12068msgid ""24758msgid ""
12069"<code>_WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_applications)\n"24759"<code>_WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_applications)\n"
12070"</code>"24760"</code>"
12071msgstr ""24761msgstr ""
nn24762"\n"
24763"_WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_applications)\n"
1207224764
12073#. (itstool) path: listitem/para24765#. (itstool) path: listitem/para
12074#: C/index-in.docbook:1065824766#: C/index-in.docbook:10658
n12075msgid "Excludes documentation of the last GError** parameter of the C function. n24767#, fuzzy
>The optional \"&lt;exceptions&gt;\" is a comma-separated list of exceptions that 
> can be thrown. It determines which @throws Doxygen commands are added to the do 
>cumentation. Default value is <classname>Glib::Error</classname>. If you want a  
>comma in the description of an exception, precede it by a backslash. Example: <c 
>ode>errthrow \"Glib::OptionError Hello\\, world, Glib::ConvertError\"</code>" 
24768msgid ""
24769"Excludes documentation of the last GError** parameter of the C function. The "
24770"optional \"&lt;exceptions&gt;\" is a comma-separated list of exceptions that "
24771"can be thrown. It determines which @throws Doxygen commands are added to the "
24772"documentation. Default value is <classname>Glib::Error</classname>. If you "
24773"want a comma in the description of an exception, precede it by a backslash. "
24774"Example: <code>errthrow \"Glib::OptionError Hello\\, world, Glib::"
24775"ConvertError\"</code>"
12076msgstr ""24776msgstr ""
nn24777"Exkluderar dokumentationen för den sista GError**-parametern i C-funktionen. "
24778"Den valfria \"&lt;undantag&gt;\" är en kommaseparerad lista över undantag "
24779"som kan kastas. Det avgör vilka @throws-Doxygenkommandon som läggs till i "
24780"dokumentationen. Standardvärdet är <classname>Glib::Error</classname>. Om du "
24781"vill ha ett komma i beskrivningen av ett undantag föregår du det med ett "
24782"bakstreck. Exempel: <code>errthrow \"Glib::OptionError Hello\\, world, Glib::"
24783"ConvertError\"</code>"
1207724784
12078#. (itstool) path: varlistentry/term24785#. (itstool) path: varlistentry/term
12079#: C/index-in.docbook:1067624786#: C/index-in.docbook:10676
12080msgid "voidreturn"24787msgid "voidreturn"
n12081msgstr ""n24788msgstr "voidreturn"
1208224789
12083#. (itstool) path: listitem/para24790#. (itstool) path: listitem/para
12084#: C/index-in.docbook:1067824791#: C/index-in.docbook:10678
n12085msgid "Don't include a @return Doxygen command in the documentation. Useful if tn24792#, fuzzy
>he wrapped C function returns a value, but the corresponding <phrase role=\"nowr 
>ap\">C++</phrase> method returns <type>void</type>." 
24793msgid ""
24794"Don't include a @return Doxygen command in the documentation. Useful if the "
24795"wrapped C function returns a value, but the corresponding <phrase "
24796"role=\"nowrap\">C++</phrase> method returns <type>void</type>."
12086msgstr ""24797msgstr ""
nn24798"Inkludera inte ett @return-Doxygenkommando i dokumentationen. Användbart om "
24799"den omslutna C-funktionen returnerar ett värde, men den motsvarande C++-"
24800"metoden returnerar <type>void</type>."
1208724801
12088#. (itstool) path: section/title24802#. (itstool) path: section/title
12089#: C/index-in.docbook:1068824803#: C/index-in.docbook:10688
12090msgid "_IGNORE, _IGNORE_SIGNAL, _IGNORE_PROPERTY"24804msgid "_IGNORE, _IGNORE_SIGNAL, _IGNORE_PROPERTY"
n12091msgstr ""n24805msgstr "_IGNORE, _IGNORE_SIGNAL, _IGNORE_PROPERTY"
1209224806
12093#. (itstool) path: section/para24807#. (itstool) path: section/para
12094#: C/index-in.docbook:1069024808#: C/index-in.docbook:10690
n12095msgid "<command>gmmproc</command> will warn you on stdout about functions, signan24809#, fuzzy
>ls, properties and child properties that you have forgotten to wrap, helping to  
>ensure that you are wrapping the complete API. But if you don't want to wrap som 
>e functions, signals, properties or child properties, or if you chose to hand-co 
>de some methods then you can use the _IGNORE(), _IGNORE_SIGNAL() or _IGNORE_PROP 
>ERTY() macro to make <command>gmmproc</command> stop complaining." 
24810msgid ""
24811"<command>gmmproc</command> will warn you on stdout about functions, signals, "
24812"properties and child properties that you have forgotten to wrap, helping to "
24813"ensure that you are wrapping the complete API. But if you don't want to wrap "
24814"some functions, signals, properties or child properties, or if you chose to "
24815"hand-code some methods then you can use the _IGNORE(), _IGNORE_SIGNAL() or "
24816"_IGNORE_PROPERTY() macro to make <command>gmmproc</command> stop complaining."
12096msgstr ""24817msgstr ""
nn24818"<command>gmmproc</command> kommer varna dig på standard ut om funktioner, "
24819"signaler, egenskaper och underordnade egenskaper som du glömt bort att "
24820"omsluta, vilket hjälper till att säkerställa att du omsluter hela API:t. Men "
24821"om du inte vill omsluta några funktioner, signaler, egenskaper eller "
24822"underordnade egenskaper, eller om du väljer att handkoda vissa metoder, så "
24823"kan du använda makrona _IGNORE(), _IGNORE_SIGNAL() eller _IGNORE_PROPERTY() "
24824"för att få <command>gmmproc</command> att sluta klaga."
1209724825
12098#. (itstool) path: para/literallayout24826#. (itstool) path: para/literallayout
12099#: C/index-in.docbook:1069824827#: C/index-in.docbook:10698
12100#, no-wrap24828#, no-wrap
12101msgid ""24829msgid ""
12102"<function>_IGNORE(C function name 1, C function name 2, etc)\n"24830"<function>_IGNORE(C function name 1, C function name 2, etc)\n"
12103"_IGNORE_SIGNAL(C signal name 1, C signal name 2, etc)\n"24831"_IGNORE_SIGNAL(C signal name 1, C signal name 2, etc)\n"
12104"_IGNORE_PROPERTY(C property name 1, C property name 2, etc)</function>"24832"_IGNORE_PROPERTY(C property name 1, C property name 2, etc)</function>"
12105msgstr ""24833msgstr ""
nn24834"<function>_IGNORE(C-funktionsnamn 1, C-funktionsnamn 2, o.s.v.)\n"
24835"_IGNORE_SIGNAL(C-signalnamn 1, C-signalnamn 2, o.s.v.)\n"
24836"_IGNORE_PROPERTY(C-egenskapsnamn 1, C-egenskapsnamn 2, o.s.v.)</function>"
1210624837
12107#. (itstool) path: section/para24838#. (itstool) path: section/para
12108#: C/index-in.docbook:1070224839#: C/index-in.docbook:10702
12109msgid "For instance, from <filename>flowbox.hg</filename>:"24840msgid "For instance, from <filename>flowbox.hg</filename>:"
n12110msgstr ""n24841msgstr "Till exempel, från <filename>flowbox.hg</filename>:"
1211124842
12112#. (itstool) path: section/programlisting24843#. (itstool) path: section/programlisting
12113#: C/index-in.docbook:1070324844#: C/index-in.docbook:10703
n12114#, no-wrapn24845#, fuzzy, no-wrap
24846#| msgid ""
24847#| "\n"
24848#| "_IGNORE(gtk_flow_box_set_filter_func, gtk_flow_box_set_sort_func)\n"
24849#| "_IGNORE_SIGNAL(activate-cursor-child, toggle-cursor-child, move-cursor)\n"
12115msgid ""24850msgid ""
12116"<code>_IGNORE(gtk_flow_box_set_filter_func, gtk_flow_box_set_sort_func)\n"24851"<code>_IGNORE(gtk_flow_box_set_filter_func, gtk_flow_box_set_sort_func)\n"
12117"_IGNORE_SIGNAL(activate-cursor-child, toggle-cursor-child, move-cursor)\n"24852"_IGNORE_SIGNAL(activate-cursor-child, toggle-cursor-child, move-cursor)\n"
12118"</code>"24853"</code>"
12119msgstr ""24854msgstr ""
nn24855"\n"
24856"_IGNORE(gtk_flow_box_set_filter_func, gtk_flow_box_set_sort_func)\n"
24857"_IGNORE_SIGNAL(activate-cursor-child, toggle-cursor-child, move-cursor)\n"
1212024858
12121#. (itstool) path: section/title24859#. (itstool) path: section/title
12122#: C/index-in.docbook:1070924860#: C/index-in.docbook:10709
12123msgid "_WRAP_SIGNAL"24861msgid "_WRAP_SIGNAL"
n12124msgstr ""n24862msgstr "_WRAP_SIGNAL"
1212524863
12126#. (itstool) path: section/para24864#. (itstool) path: section/para
12127#: C/index-in.docbook:1071124865#: C/index-in.docbook:10711
n12128msgid "This macro generates the <phrase role=\"nowrap\">C++</phrase> libsigc++-sn24866#, fuzzy
>tyle signal to wrap a C GObject signal. It actually generates a public accessor  
>method, such as <function>signal_clicked()</function>, which returns a proxy obj 
>ect. <command>gmmproc</command> uses the .defs file to discover the C parameter  
>types and the .m4 convert files to discover appropriate type conversions." 
24867msgid ""
24868"This macro generates the <phrase role=\"nowrap\">C++</phrase> libsigc++-"
24869"style signal to wrap a C GObject signal. It actually generates a public "
24870"accessor method, such as <function>signal_clicked()</function>, which "
24871"returns a proxy object. <command>gmmproc</command> uses the .defs file to "
24872"discover the C parameter types and the .m4 convert files to discover "
24873"appropriate type conversions."
12129msgstr ""24874msgstr ""
nn24875"Detta makro genererar C++-signalen av libsigc++-stil som ska omsluta en C "
24876"Gobjekt-signal. Det genererar faktiskt en publik åtkomstmetod, som "
24877"<function>signal_clicked()</function> vilken returnerar ett proxyobjekt. "
24878"<command>gmmproc</command> använder .defs-filen för att upptäcka C-"
24879"parametertyperna och .m4-konverteringsfilerna för att upptäcka lämpliga "
24880"typkonverteringar."
1213024881
12131#. (itstool) path: section/para24882#. (itstool) path: section/para
12132#: C/index-in.docbook:1071724883#: C/index-in.docbook:10717
nn24884msgid ""
12133msgid "<function>_WRAP_SIGNAL( C++ signal handler signature, C signal name)</fun24885"<function>_WRAP_SIGNAL( C++ signal handler signature, C signal name)</"
>ction>" 
24886"function>"
12134msgstr ""24887msgstr ""
nn24888"<function>_WRAP_SIGNAL( C++-signalhanterarsignatur, C-signalnamn)</function>"
1213524889
12136#. (itstool) path: section/para24890#. (itstool) path: section/para
n12137#: C/index-in.docbook:10718n24891#: C/index-in.docbook:10718 C/index-in.docbook:10822
12138#: C/index-in.docbook:10822
12139msgid "For instance, from <filename>button.hg</filename>:"24892msgid "For instance, from <filename>button.hg</filename>:"
n12140msgstr ""n24893msgstr "Till exempel, från <filename>button.hg</filename>:"
1214124894
12142#. (itstool) path: section/programlisting24895#. (itstool) path: section/programlisting
12143#: C/index-in.docbook:1071924896#: C/index-in.docbook:10719
n12144#, no-wrapn24897#, fuzzy, no-wrap
24898#| msgid ""
24899#| "\n"
24900#| "_WRAP_SIGNAL(void clicked(),\"clicked\")\n"
12145msgid ""24901msgid ""
12146"<code>_WRAP_SIGNAL(void clicked(),\"clicked\")\n"24902"<code>_WRAP_SIGNAL(void clicked(),\"clicked\")\n"
12147"</code>"24903"</code>"
12148msgstr ""24904msgstr ""
nn24905"\n"
24906"_WRAP_SIGNAL(void clicked(),\"clicked\")\n"
1214924907
12150#. (itstool) path: section/para24908#. (itstool) path: section/para
12151#: C/index-in.docbook:1072124909#: C/index-in.docbook:10721
n12152msgid "Signals usually have function pointers in the GTK struct, with a correspon24910#, fuzzy
>nding enum value and a <function>g_signal_new()</function> in the .c file." 
24911msgid ""
24912"Signals usually have function pointers in the GTK struct, with a "
24913"corresponding enum value and a <function>g_signal_new()</function> in the .c "
24914"file."
12153msgstr ""24915msgstr ""
nn24916"Signaler har vanligen funktionspekare i GTK-structen, med ett motsvarande "
24917"uppräkningsvärde och en <function>g_signal_new()</function> i .c-fil."
1215424918
12155#. (itstool) path: varlistentry/term24919#. (itstool) path: varlistentry/term
12156#: C/index-in.docbook:1072724920#: C/index-in.docbook:10727
12157msgid "no_default_handler"24921msgid "no_default_handler"
n12158msgstr ""n24922msgstr "no_default_handler"
1215924923
12160#. (itstool) path: listitem/para24924#. (itstool) path: listitem/para
12161#: C/index-in.docbook:1072924925#: C/index-in.docbook:10729
n12162msgid "Do not generate an <function>on_something()</function> virtual method to n24926msgid ""
>allow easy overriding of the default signal handler. Use this when adding a sign 
>al with a default signal handler would break the ABI by increasing the size of t 
>he class's virtual function table, and when adding a signal without a public C d 
>efault handler." 
24927"Do not generate an <function>on_something()</function> virtual method to "
24928"allow easy overriding of the default signal handler. Use this when adding a "
24929"signal with a default signal handler would break the ABI by increasing the "
24930"size of the class's virtual function table, and when adding a signal without "
24931"a public C default handler."
12163msgstr ""24932msgstr ""
nn24933"Generera inte en virtuell metod <function>on_something()</function> för att "
24934"tillåta enkel åsidosättning av standardsignalhanteraren. Använd detta när "
24935"tillägg av en signal med en standardsignalhanterare skulle bryta ABI:t genom "
24936"att öka storleken på klassens virtuella funktionstabell, och vid tillägg av "
24937"en signal utan en öppen C-standardhanterare."
1216424938
12165#. (itstool) path: varlistentry/term24939#. (itstool) path: varlistentry/term
12166#: C/index-in.docbook:1073824940#: C/index-in.docbook:10738
12167msgid "custom_default_handler"24941msgid "custom_default_handler"
n12168msgstr ""n24942msgstr "custom_default_handler"
1216924943
12170#. (itstool) path: listitem/para24944#. (itstool) path: listitem/para
12171#: C/index-in.docbook:1074024945#: C/index-in.docbook:10740
n12172msgid "Generate a declaration of the <function>on_something()</function> virtualn24946#, fuzzy
> method in the <filename>.h</filename> file, but do not generate a definition in 
> the <filename>.cc</filename> file. Use this when you must generate the definiti 
>on by hand." 
24947msgid ""
24948"Generate a declaration of the <function>on_something()</function> virtual "
24949"method in the <filename>.h</filename> file, but do not generate a definition "
24950"in the <filename>.cc</filename> file. Use this when you must generate the "
24951"definition by hand."
12173msgstr ""24952msgstr ""
nn24953"Generera en deklaration av den virtuella metoden <function>on_something()</"
24954"function> i <filename>.h</filename>-filen, men generera inte någon "
24955"definition i <filename>.cc</filename>-filen. Använd detta då du måste "
24956"generera definitionen för hand."
1217424957
12175#. (itstool) path: varlistentry/term24958#. (itstool) path: varlistentry/term
12176#: C/index-in.docbook:1074724959#: C/index-in.docbook:10747
12177msgid "custom_c_callback"24960msgid "custom_c_callback"
n12178msgstr ""n24961msgstr "custom_c_callback"
1217924962
12180#. (itstool) path: listitem/para24963#. (itstool) path: listitem/para
12181#: C/index-in.docbook:1074924964#: C/index-in.docbook:10749
nn24965msgid ""
12182msgid "Do not generate a C callback function for the signal. Use this when you m24966"Do not generate a C callback function for the signal. Use this when you must "
>ust generate the callback function by hand." 
24967"generate the callback function by hand."
12183msgstr ""24968msgstr ""
nn24969"Generera inte en C-återanropsfunktion för signalen. Använd detta när du "
24970"måste generera återanropsfunktionen för hand."
1218424971
12185#. (itstool) path: listitem/para24972#. (itstool) path: listitem/para
12186#: C/index-in.docbook:1075624973#: C/index-in.docbook:10756
n12187msgid "Do an extra <function>reference()</function> on the return value of the <n24974#, fuzzy
>function>on_something()</function> virtual method, in case the C function does n 
>ot provide a reference." 
24975msgid ""
24976"Do an extra <function>reference()</function> on the return value of the "
24977"<function>on_something()</function> virtual method, in case the C function "
24978"does not provide a reference."
12188msgstr ""24979msgstr ""
nn24980"Gör en extra <function>reference()</function> på returvärdet för den "
24981"virtuella metoden <function>on_something()</function>, ifall C-funktionen "
24982"inte tillhandahåller en referens."
1218924983
12190#. (itstool) path: varlistentry/term24984#. (itstool) path: varlistentry/term
n12191#: C/index-in.docbook:10782n24985#: C/index-in.docbook:10782 C/index-in.docbook:10963
12192#: C/index-in.docbook:10963
12193msgid "exception_handler &lt;method_name&gt;"24986msgid "exception_handler &lt;method_name&gt;"
n12194msgstr ""n24987msgstr "exception_handler &lt;metodnamn&gt;"
1219524988
12196#. (itstool) path: listitem/para24989#. (itstool) path: listitem/para
n12197#: C/index-in.docbook:10784n24990#: C/index-in.docbook:10784 C/index-in.docbook:10965
12198#: C/index-in.docbook:1096524991#, fuzzy
12199msgid "Allows to use custom exception handler instead of default one. Exception 24992msgid ""
>might be rethrown by user-defined handler, and it will be caught by default hand 
>ler." 
24993"Allows to use custom exception handler instead of default one. Exception "
24994"might be rethrown by user-defined handler, and it will be caught by default "
24995"handler."
12200msgstr ""24996msgstr ""
nn24997"Tillåter användning av anpassad undantagshanterare i stället för den som är "
24998"standard. Undantag kan kastas igen av användardefinierade hanteraren och "
24999"kommer fångas av standardhanteraren."
1220125000
12202#. (itstool) path: varlistentry/term25001#. (itstool) path: varlistentry/term
12203#: C/index-in.docbook:1079025002#: C/index-in.docbook:10790
12204msgid "detail_name &lt;parameter_name&gt;"25003msgid "detail_name &lt;parameter_name&gt;"
n12205msgstr ""n25004msgstr "detail_name &lt;parameternamn&gt;"
1220625005
12207#. (itstool) path: listitem/para25006#. (itstool) path: listitem/para
12208#: C/index-in.docbook:1079225007#: C/index-in.docbook:10792
n12209msgid "Adds a <type>const Glib::ustring&amp;</type> parameter to the <methodnamen25008#, fuzzy
>>signal_something()</methodname> method. Use it, if the signal accepts a detaile 
>d signal name, i.e. if the underlying C code registers the signal with the <lite 
>ral>G_SIGNAL_DETAILED</literal> flag." 
25009msgid ""
25010"Adds a <type>const Glib::ustring&amp;</type> parameter to the "
25011"<methodname>signal_something()</methodname> method. Use it, if the signal "
25012"accepts a detailed signal name, i.e. if the underlying C code registers the "
25013"signal with the <literal>G_SIGNAL_DETAILED</literal> flag."
12210msgstr ""25014msgstr ""
nn25015"Lägger till en <type>const Glib::ustring&amp;</type>-parameter till "
25016"<methodname>signal_something()</methodname>-metoden. Använd det om signalen "
25017"accepterar ett detaljerat signalnamn, det vill säga om den underliggande C-"
25018"koden registrerar signalen med flaggan <literal>G_SIGNAL_DETAILED</literal>."
1221125019
12212#. (itstool) path: varlistentry/term25020#. (itstool) path: varlistentry/term
12213#: C/index-in.docbook:1079925021#: C/index-in.docbook:10799
12214msgid "two_signal_methods"25022msgid "two_signal_methods"
n12215msgstr ""n25023msgstr "two_signal_methods"
1221625024
12217#. (itstool) path: listitem/para25025#. (itstool) path: listitem/para
12218#: C/index-in.docbook:1080125026#: C/index-in.docbook:10801
n12219msgid "Used in conjunction with the <literal>detail_name</literal> option to genn25027#, fuzzy
>erate two <methodname>signal_something()</methodname> methods, one without a par 
>ameter and one with a parameter without a default value. With only the <literal> 
>detail_name</literal> option one method is generated, with a parameter with defa 
>ult value. Use the <literal>two_signal_methods</literal> option, if it's necessa 
>ry in order to preserve ABI." 
25028msgid ""
25029"Used in conjunction with the <literal>detail_name</literal> option to "
25030"generate two <methodname>signal_something()</methodname> methods, one "
25031"without a parameter and one with a parameter without a default value. With "
25032"only the <literal>detail_name</literal> option one method is generated, with "
25033"a parameter with default value. Use the <literal>two_signal_methods</"
25034"literal> option, if it's necessary in order to preserve ABI."
12220msgstr ""25035msgstr ""
nn25036"Används tillsammans med alternativet <literal>detail_name</literal> för att "
25037"generera två <methodname>signal_something()</methodname>-metoder, en utan "
25038"någon parameter och en med en parameter utan något standardvärde. Med endast "
25039"alternativet <literal>detail_name</literal> genereras en metod, med en "
25040"parameter med standardvärde. Använda alternativet "
25041"<literal>two_signal_methods</literal> om det är nödvändigt för att bevara "
25042"ABI."
1222125043
12222#. (itstool) path: section/title25044#. (itstool) path: section/title
12223#: C/index-in.docbook:1081525045#: C/index-in.docbook:10815
12224msgid "_WRAP_PROPERTY"25046msgid "_WRAP_PROPERTY"
n12225msgstr ""n25047msgstr "_WRAP_PROPERTY"
1222625048
12227#. (itstool) path: section/para25049#. (itstool) path: section/para
12228#: C/index-in.docbook:1081725050#: C/index-in.docbook:10817
n12229msgid "This macro generates the <phrase role=\"nowrap\">C++</phrase> method to wn25051#, fuzzy
>rap a C GObject property. You must specify the property name and the wanted <phr 
>ase role=\"nowrap\">C++</phrase> type for the property. <command>gmmproc</comman 
>d> uses the .defs file to discover the C type and the .m4 convert files to disco 
>ver appropriate type conversions." 
25052msgid ""
25053"This macro generates the <phrase role=\"nowrap\">C++</phrase> method to wrap "
25054"a C GObject property. You must specify the property name and the wanted "
25055"<phrase role=\"nowrap\">C++</phrase> type for the property. "
25056"<command>gmmproc</command> uses the .defs file to discover the C type and "
25057"the .m4 convert files to discover appropriate type conversions."
12230msgstr ""25058msgstr ""
nn25059"Detta makro genererar C++-metoden som ska omsluta en C GObject-egenskap. Du "
25060"måste ange egenskapsnamnet och den önskade C++-typen för egenskapen. "
25061"<command>gmmproc</command> använder .defs-filen för att upptäcka C-typen "
25062"och .m4-konverteringsfilerna för att upptäcka lämpliga typkonverteringar."
1223125063
12232#. (itstool) path: section/para25064#. (itstool) path: section/para
12233#: C/index-in.docbook:1082125065#: C/index-in.docbook:10821
12234msgid "<function>_WRAP_PROPERTY(C property name, C++ type)</function>"25066msgid "<function>_WRAP_PROPERTY(C property name, C++ type)</function>"
n12235msgstr ""n25067msgstr "<function>_WRAP_PROPERTY(C-egenskapsnamn, C++-typ)</function>"
1223625068
12237#. (itstool) path: section/programlisting25069#. (itstool) path: section/programlisting
12238#: C/index-in.docbook:1082325070#: C/index-in.docbook:10823
n12239#, no-wrapn25071#, fuzzy, no-wrap
25072#| msgid ""
25073#| "\n"
25074#| "_WRAP_PROPERTY(\"label\", Glib::ustring)\n"
12240msgid ""25075msgid ""
12241"<code>_WRAP_PROPERTY(\"label\", Glib::ustring)\n"25076"<code>_WRAP_PROPERTY(\"label\", Glib::ustring)\n"
12242"</code>"25077"</code>"
12243msgstr ""25078msgstr ""
nn25079"\n"
25080"_WRAP_PROPERTY(\"label\", Glib::ustring)\n"
1224425081
12245#. (itstool) path: section/title25082#. (itstool) path: section/title
12246#: C/index-in.docbook:1084625083#: C/index-in.docbook:10846
12247msgid "_WRAP_VFUNC"25084msgid "_WRAP_VFUNC"
n12248msgstr ""n25085msgstr "_WRAP_VFUNC"
1224925086
12250#. (itstool) path: section/para25087#. (itstool) path: section/para
12251#: C/index-in.docbook:1084825088#: C/index-in.docbook:10848
nn25089#, fuzzy
25090msgid ""
12252msgid "This macro generates the <phrase role=\"nowrap\">C++</phrase> method to w25091"This macro generates the <phrase role=\"nowrap\">C++</phrase> method to wrap "
>rap a virtual C function." 
25092"a virtual C function."
12253msgstr ""25093msgstr ""
nn25094"Detta makro genererar C++-metoden som ska omsluta en virtuell C-funktion."
1225425095
12255#. (itstool) path: section/para25096#. (itstool) path: section/para
12256#: C/index-in.docbook:1084925097#: C/index-in.docbook:10849
nn25098msgid ""
12257msgid "<function>_WRAP_VFUNC( C++ method signature, C function name)</function>"25099"<function>_WRAP_VFUNC( C++ method signature, C function name)</function>"
12258msgstr ""25100msgstr "<function>_WRAP_VFUNC( C++-metodsignatur, C-funktionsnamn)</function>"
1225925101
12260#. (itstool) path: section/para25102#. (itstool) path: section/para
12261#: C/index-in.docbook:1085025103#: C/index-in.docbook:10850
12262msgid "For instance, from <filename>widget.hg</filename>:"25104msgid "For instance, from <filename>widget.hg</filename>:"
n12263msgstr ""n25105msgstr "Till exempel, från <filename>widget.hg</filename>:"
1226425106
12265#. (itstool) path: section/programlisting25107#. (itstool) path: section/programlisting
12266#: C/index-in.docbook:1085125108#: C/index-in.docbook:10851
n12267#, no-wrapn25109#, fuzzy, no-wrap
25110#| msgid ""
25111#| "\n"
25112#| "_WRAP_VFUNC(SizeRequestMode get_request_mode() const, get_request_mode)\n"
12268msgid ""25113msgid ""
12269"<code>_WRAP_VFUNC(SizeRequestMode get_request_mode() const, get_request_mode)\n25114"<code>_WRAP_VFUNC(SizeRequestMode get_request_mode() const, get_request_mode)\n
>">"
12270"</code>"25115"</code>"
12271msgstr ""25116msgstr ""
nn25117"\n"
25118"_WRAP_VFUNC(SizeRequestMode get_request_mode() const, get_request_mode)\n"
1227225119
12273#. (itstool) path: section/para25120#. (itstool) path: section/para
12274#: C/index-in.docbook:1085325121#: C/index-in.docbook:10853
n12275msgid "The C function (e.g. <function>get_request_mode</function>) is described n25122#, fuzzy
>more fully in the <filename>*_vfuncs.defs</filename> file, and the <filename>con 
>vert*.m4</filename> files contain the necessary conversion from the <phrase role 
>=\"nowrap\">C++</phrase> parameter type to the C parameter type. Conversions can 
> also be written in the .hg file. Virtual functions often require special conver 
>sions that are best kept local to the .hg file where they are used." 
25123msgid ""
25124"The C function (e.g. <function>get_request_mode</function>) is described "
25125"more fully in the <filename>*_vfuncs.defs</filename> file, and the "
25126"<filename>convert*.m4</filename> files contain the necessary conversion from "
25127"the <phrase role=\"nowrap\">C++</phrase> parameter type to the C parameter "
25128"type. Conversions can also be written in the .hg file. Virtual functions "
25129"often require special conversions that are best kept local to the .hg file "
25130"where they are used."
12276msgstr ""25131msgstr ""
nn25132"C-funktionen (t.ex. <function>get_request_mode</function>) beskrivs mer "
25133"fullständigt i filen <filename>*_vfuncs.defs</filename>, och "
25134"<filename>convert*.m4</filename>-filerna innehåller den nödvändiga "
25135"konverteringen från C++-parametertypen till C-parametertypen. Konverteringar "
25136"kan också skrivas i .hg-filen. Virtuella funktioner kräver ofta speciella "
25137"konverteringar som är bästa att hålla lokala till .hg-filen där de används."
1227725138
12278#. (itstool) path: listitem/para25139#. (itstool) path: listitem/para
12279#: C/index-in.docbook:1086425140#: C/index-in.docbook:10864
n12280msgid "Do an extra <function>reference()</function> on the return value of the <n25141#, fuzzy
>function>something_vfunc()</function> function, in case the virtual C function d 
>oes not provide a reference." 
25142msgid ""
25143"Do an extra <function>reference()</function> on the return value of the "
25144"<function>something_vfunc()</function> function, in case the virtual C "
25145"function does not provide a reference."
12281msgstr ""25146msgstr ""
nn25147"Gör en extra <function>reference()</function> på returvärdet för funktionen "
25148"<function>something_vfunc()</function>, ifall den virtuella C-funktionen "
25149"inte tillhandahåller en referens."
1228225150
12283#. (itstool) path: varlistentry/term25151#. (itstool) path: varlistentry/term
12284#: C/index-in.docbook:1087025152#: C/index-in.docbook:10870
12285msgid "refreturn_ctype"25153msgid "refreturn_ctype"
n12286msgstr ""n25154msgstr "refreturn_ctype"
1228725155
12288#. (itstool) path: listitem/para25156#. (itstool) path: listitem/para
12289#: C/index-in.docbook:1087225157#: C/index-in.docbook:10872
n12290msgid "Do an extra <function>reference()</function> on the return value of an ovn25158#, fuzzy
>erridden <function>something_vfunc()</function> function in the C callback funct 
>ion, in case the calling C function expects it to provide a reference." 
25159msgid ""
25160"Do an extra <function>reference()</function> on the return value of an "
25161"overridden <function>something_vfunc()</function> function in the C callback "
25162"function, in case the calling C function expects it to provide a reference."
12291msgstr ""25163msgstr ""
nn25164"Gör en extra <function>reference()</function> på returvärdet för en "
25165"åsidosatt <function>something_vfunc()</function>-funktion i C-"
25166"återanropsfunktionen, ifall den anropande C-funktionen förväntar sig att den "
25167"ska tillhandahålla en referens."
1229225168
12293#. (itstool) path: varlistentry/term25169#. (itstool) path: varlistentry/term
12294#: C/index-in.docbook:1087925170#: C/index-in.docbook:10879
12295msgid "keep_return"25171msgid "keep_return"
n12296msgstr ""n25172msgstr "keep_return"
1229725173
12298#. (itstool) path: listitem/para25174#. (itstool) path: listitem/para
12299#: C/index-in.docbook:1088125175#: C/index-in.docbook:10881
n12300msgid "Keep a copy of the return value in the C callback function, in case the cn25176#, fuzzy
>alling C function does not expect to get its own reference." 
25177msgid ""
25178"Keep a copy of the return value in the C callback function, in case the "
25179"calling C function does not expect to get its own reference."
12301msgstr ""25180msgstr ""
nn25181"Behåll en kopia av returvärdet i C-återanropsfunktionen, ifall den anropande "
25182"C-funktionen inte förväntar sig att få sin egen referens."
1230225183
12303#. (itstool) path: listitem/para25184#. (itstool) path: listitem/para
12304#: C/index-in.docbook:1088925185#: C/index-in.docbook:10889
nn25186#, fuzzy
25187msgid ""
12305msgid "Use the last GError** parameter of the C virtual function (if there is on25188"Use the last GError** parameter of the C virtual function (if there is one) "
>e) to throw an exception." 
25189"to throw an exception."
12306msgstr ""25190msgstr ""
nn25191"Använd den sista GError**-parametern i den virtuella C-funktionen (om det "
25192"finns någon) för att kasta ett undantag."
1230725193
12308#. (itstool) path: varlistentry/term25194#. (itstool) path: varlistentry/term
12309#: C/index-in.docbook:1089425195#: C/index-in.docbook:10894
12310msgid "custom_vfunc"25196msgid "custom_vfunc"
n12311msgstr ""n25197msgstr "custom_vfunc"
1231225198
12313#. (itstool) path: listitem/para25199#. (itstool) path: listitem/para
12314#: C/index-in.docbook:1089625200#: C/index-in.docbook:10896
n12315msgid "Do not generate a definition of the vfunc in the <filename>.cc</filename>n25201#, fuzzy
> file. Use this when you must generate the vfunc by hand." 
25202msgid ""
25203"Do not generate a definition of the vfunc in the <filename>.cc</filename> "
25204"file. Use this when you must generate the vfunc by hand."
12316msgstr ""25205msgstr ""
nn25206"Generera inte en definition av vfunc i <filename>.cc</filename>-filen. "
25207"Använd detta när du måste generera vfunc för hand."
1231725208
12318#. (itstool) path: varlistentry/term25209#. (itstool) path: varlistentry/term
12319#: C/index-in.docbook:1090225210#: C/index-in.docbook:10902
12320msgid "custom_vfunc_callback"25211msgid "custom_vfunc_callback"
n12321msgstr ""n25212msgstr "custom_vfunc_callback"
1232225213
12323#. (itstool) path: listitem/para25214#. (itstool) path: listitem/para
12324#: C/index-in.docbook:1090425215#: C/index-in.docbook:10904
nn25216#, fuzzy
25217msgid ""
12325msgid "Do not generate a C callback function for the vfunc. Use this when you mu25218"Do not generate a C callback function for the vfunc. Use this when you must "
>st generate the callback function by hand." 
25219"generate the callback function by hand."
12326msgstr ""25220msgstr ""
nn25221"Generera en C-återanropsfunktion för din vfunc. Använd denna när du måste "
25222"generera återanropsfunktionen för hand."
1232725223
12328#. (itstool) path: varlistentry/term25224#. (itstool) path: varlistentry/term
12329#: C/index-in.docbook:1094725225#: C/index-in.docbook:10947
12330msgid "return_value &lt;value&gt;"25226msgid "return_value &lt;value&gt;"
n12331msgstr ""n25227msgstr "return_value &lt;värde&gt;"
1233225228
12333#. (itstool) path: listitem/para25229#. (itstool) path: listitem/para
12334#: C/index-in.docbook:1094925230#: C/index-in.docbook:10949
12335msgid "Defines a non-default return value."25231msgid "Defines a non-default return value."
n12336msgstr ""n25232msgstr "Definierar ett annat returvärde än standardvärdet."
1233725233
12338#. (itstool) path: varlistentry/term25234#. (itstool) path: varlistentry/term
12339#: C/index-in.docbook:1095325235#: C/index-in.docbook:10953
12340msgid "err_return_value &lt;value&gt;"25236msgid "err_return_value &lt;value&gt;"
n12341msgstr ""n25237msgstr "err_return_value &lt;värde&gt;"
1234225238
12343#. (itstool) path: listitem/para25239#. (itstool) path: listitem/para
12344#: C/index-in.docbook:1095525240#: C/index-in.docbook:10955
n12345msgid "Defines a non-default return value, used only if the <phrase role=\"nowran25241#, fuzzy
>p\">C++</phrase> <function>something_vfunc()</function> function throws an excep 
>tion which is propagated to the C callback function. If return_value is specifie 
>d, but err_return_value is not, then return_value is used also when an exception 
> is propagated." 
25242msgid ""
25243"Defines a non-default return value, used only if the <phrase "
25244"role=\"nowrap\">C++</phrase> <function>something_vfunc()</function> function "
25245"throws an exception which is propagated to the C callback function. If "
25246"return_value is specified, but err_return_value is not, then return_value is "
25247"used also when an exception is propagated."
12346msgstr ""25248msgstr ""
nn25249"Definierar ett annat returvärde än standardvärdet, används endast om C++-"
25250"funktionen <function>something_vfunc()</function> kastar ett undantag som "
25251"sprids till C-återanropsfunktionen. Om return_value anges, men inte "
25252"err_return_value, så kommer return_value användas även när ett undantag "
25253"sprids."
1234725254
12348#. (itstool) path: section/para25255#. (itstool) path: section/para
12349#: C/index-in.docbook:1097225256#: C/index-in.docbook:10972
n12350msgid "A rule to which there may be exceptions: If the virtual C function returnn25257#, fuzzy
>s a pointer to an object derived from <classname>GObject</classname>, i.e. a ref 
>erence-counted object, then the virtual <phrase role=\"nowrap\">C++</phrase> fun 
>ction shall return a <classname>Glib::RefPtr&lt;&gt;</classname> object. One of  
>the extra arguments <parameter>refreturn</parameter> or <parameter>refreturn_cty 
>pe</parameter> is required." 
25258msgid ""
25259"A rule to which there may be exceptions: If the virtual C function returns a "
25260"pointer to an object derived from <classname>GObject</classname>, i.e. a "
25261"reference-counted object, then the virtual <phrase role=\"nowrap\">C++</"
25262"phrase> function shall return a <classname>Glib::RefPtr&lt;&gt;</classname> "
25263"object. One of the extra arguments <parameter>refreturn</parameter> or "
25264"<parameter>refreturn_ctype</parameter> is required."
12351msgstr ""25265msgstr ""
nn25266"En regel till vilken det kan finnas undantag: Om den virtuella C-funktionen "
25267"returnerar en pekare till ett härlett från <classname>GObject</classname>, "
25268"det vill säga ett referensräknat objekt så ska den virtuella C++-funktionen "
25269"returnera ett <classname>Glib::RefPtr&lt;&gt;</classname>-objekt. Ett av de "
25270"extra argumenten <parameter>refreturn</parameter> eller "
25271"<parameter>refreturn_ctype</parameter> krävs."
1235225272
12353#. (itstool) path: section/title25273#. (itstool) path: section/title
12354#: C/index-in.docbook:1098325274#: C/index-in.docbook:10983
12355msgid "Other macros"25275msgid "Other macros"
n12356msgstr ""n25276msgstr "Andra makron"
1235725277
12358#. (itstool) path: section/title25278#. (itstool) path: section/title
12359#: C/index-in.docbook:1098625279#: C/index-in.docbook:10986
12360msgid "_IMPLEMENTS_INTERFACE"25280msgid "_IMPLEMENTS_INTERFACE"
n12361msgstr ""n25281msgstr "_IMPLEMENTS_INTERFACE"
1236225282
12363#. (itstool) path: section/para25283#. (itstool) path: section/para
12364#: C/index-in.docbook:1098825284#: C/index-in.docbook:10988
12365msgid "This macro generates initialization code for the interface."25285msgid "This macro generates initialization code for the interface."
n12366msgstr ""n25286msgstr "Detta makro genererar initieringskod för gränssnittet."
1236725287
12368#. (itstool) path: section/para25288#. (itstool) path: section/para
12369#: C/index-in.docbook:1098925289#: C/index-in.docbook:10989
12370msgid "<function>_IMPLEMENTS_INTERFACE(C++ interface name)</function>"25290msgid "<function>_IMPLEMENTS_INTERFACE(C++ interface name)</function>"
n12371msgstr ""n25291msgstr "<function>_IMPLEMENTS_INTERFACE(C++-gränssnittsnamn)</function>"
1237225292
12373#. (itstool) path: section/para25293#. (itstool) path: section/para
12374#: C/index-in.docbook:1099025294#: C/index-in.docbook:10990
12375msgid "For instance, from <filename>grid.hg</filename>:"25295msgid "For instance, from <filename>grid.hg</filename>:"
n12376msgstr ""n25296msgstr "Till exempel, från <filename>grid.hg</filename>:"
1237725297
12378#. (itstool) path: section/programlisting25298#. (itstool) path: section/programlisting
12379#: C/index-in.docbook:1099125299#: C/index-in.docbook:10991
n12380#, no-wrapn25300#, fuzzy, no-wrap
25301#| msgid ""
25302#| "\n"
25303#| "_IMPLEMENTS_INTERFACE(Orientable)\n"
12381msgid ""25304msgid ""
12382"<code>_IMPLEMENTS_INTERFACE(Orientable)\n"25305"<code>_IMPLEMENTS_INTERFACE(Orientable)\n"
12383"</code>"25306"</code>"
12384msgstr ""25307msgstr ""
nn25308"\n"
25309"_IMPLEMENTS_INTERFACE(Orientable)\n"
1238525310
12386#. (itstool) path: section/para25311#. (itstool) path: section/para
12387#: C/index-in.docbook:1099325312#: C/index-in.docbook:10993
12388msgid "There is one optional extra argument: <_:variablelist-1/>"25313msgid "There is one optional extra argument: <_:variablelist-1/>"
n12389msgstr ""n25314msgstr "Det finns ett valfritt extra argument: <_:variablelist-1/>"
1239025315
12391#. (itstool) path: section/title25316#. (itstool) path: section/title
12392#: C/index-in.docbook:1100625317#: C/index-in.docbook:11006
12393msgid "_WRAP_ENUM"25318msgid "_WRAP_ENUM"
n12394msgstr ""n25319msgstr "_WRAP_ENUM"
1239525320
12396#. (itstool) path: section/para25321#. (itstool) path: section/para
12397#: C/index-in.docbook:1100825322#: C/index-in.docbook:11008
n12398msgid "This macro generates a <phrase role=\"nowrap\">C++</phrase> enum to wrap n25323#, fuzzy
>a C enum. You must specify the desired <phrase role=\"nowrap\">C++</phrase> name 
> and the name of the underlying C enum." 
25324msgid ""
25325"This macro generates a <phrase role=\"nowrap\">C++</phrase> enum to wrap a C "
25326"enum. You must specify the desired <phrase role=\"nowrap\">C++</phrase> name "
25327"and the name of the underlying C enum."
12399msgstr ""25328msgstr ""
nn25329"Detta makro genererar en C++-uppräkning för att omsluta en C-uppräkning. Du "
25330"måste ange det önskade C++-namnet och namnet för den underliggande C-"
25331"uppräkningen."
1240025332
12401#. (itstool) path: section/para25333#. (itstool) path: section/para
12402#: C/index-in.docbook:1101025334#: C/index-in.docbook:11010
12403msgid "For instance, from <filename>enums.hg</filename>:"25335msgid "For instance, from <filename>enums.hg</filename>:"
n12404msgstr ""n25336msgstr "Till exempel, från <filename>enums.hg</filename>:"
1240525337
12406#. (itstool) path: section/programlisting25338#. (itstool) path: section/programlisting
12407#: C/index-in.docbook:1101125339#: C/index-in.docbook:11011
n12408#, no-wrapn25340#, fuzzy, no-wrap
25341#| msgid ""
25342#| "\n"
25343#| "_WRAP_ENUM(Orientation, GtkOrientation)\n"
12409msgid ""25344msgid ""
12410"<code>_WRAP_ENUM(Orientation, GtkOrientation, decl_prefix GTKMM_API)\n"25345"<code>_WRAP_ENUM(Orientation, GtkOrientation, decl_prefix GTKMM_API)\n"
12411"</code>"25346"</code>"
12412msgstr ""25347msgstr ""
nn25348"\n"
25349"_WRAP_ENUM(Orientation, GtkOrientation)\n"
1241325350
12414#. (itstool) path: varlistentry/term25351#. (itstool) path: varlistentry/term
12415#: C/index-in.docbook:1101625352#: C/index-in.docbook:11016
12416msgid "NO_GTYPE"25353msgid "NO_GTYPE"
n12417msgstr ""n25354msgstr "NO_GTYPE"
1241825355
12419#. (itstool) path: listitem/para25356#. (itstool) path: listitem/para
12420#: C/index-in.docbook:1101825357#: C/index-in.docbook:11018
n12421msgid "Use this option, if the enum is not a <classname>GType</classname>. This n25358#, fuzzy
>is the case when there is no <function>*_get_type()</function> function for the  
>C enum, but be careful that you don't just need to include an extra header for t 
>hat function. You should also file a bug against the C API, because all enums sh 
>ould be registered as GTypes." 
25359msgid ""
25360"Use this option, if the enum is not a <classname>GType</classname>. This is "
25361"the case when there is no <function>*_get_type()</function> function for the "
25362"C enum, but be careful that you don't just need to include an extra header "
25363"for that function. You should also file a bug against the C API, because all "
25364"enums should be registered as GTypes."
12422msgstr ""25365msgstr ""
nn25366"Använd detta alternativ om uppräkningen inte är en <classname>GType</"
25367"classname>. Detta är fallet när det inte finns någon <function>*_get_type()</"
25368"function>-funktion för C-uppräkningen, men var försiktig så att du inte vara "
25369"behöver inkludera ett extra huvud för den funktionen. Du bör också "
25370"rapportera ett fel mot C-API:t, för alla uppräkningar ska registreras som "
25371"GType-typer."
1242325372
12424#. (itstool) path: listitem/para25373#. (itstool) path: listitem/para
12425#: C/index-in.docbook:1102325374#: C/index-in.docbook:11023
n12426msgid "If you specify <literal>NO_GTYPE</literal>, don't use that enum as the tyn25375#, fuzzy
>pe in _WRAP_PROPERTY. It would cause a runtime error, when the generated <method 
>name>property_*()</methodname> method is called." 
25376msgid ""
25377"If you specify <literal>NO_GTYPE</literal>, don't use that enum as the type "
25378"in _WRAP_PROPERTY. It would cause a runtime error, when the generated "
25379"<methodname>property_*()</methodname> method is called."
12427msgstr ""25380msgstr ""
nn25381"Om du anger <literal>NO_GTYPE</literal>, använd inte den uppräkningen som "
25382"typen i _WRAP_PROPERTY. Det skulle orsaka ett körtidsfel, när den genererade "
25383"<methodname>property_*()</methodname>-metoden anropas."
1242825384
12429#. (itstool) path: listitem/para25385#. (itstool) path: listitem/para
12430#: C/index-in.docbook:1102625386#: C/index-in.docbook:11026
12431msgid "For example, from <filename>icontheme.hg</filename>:"25387msgid "For example, from <filename>icontheme.hg</filename>:"
n12432msgstr ""n25388msgstr "Till exempel, från <filename>icontheme.hg</filename>:"
1243325389
12434#. (itstool) path: listitem/programlisting25390#. (itstool) path: listitem/programlisting
12435#: C/index-in.docbook:1102725391#: C/index-in.docbook:11027
n12436#, no-wrapn25392#, fuzzy, no-wrap
25393#| msgid ""
25394#| "\n"
25395#| "_WRAP_ENUM(IconLookupFlags, GtkIconLookupFlags, NO_GTYPE)\n"
25396#| "      "
12437msgid ""25397msgid ""
12438"<code>_WRAP_ENUM(IconLookupFlags, GtkIconLookupFlags, NO_GTYPE, decl_prefix GTK25398"<code>_WRAP_ENUM(IconLookupFlags, GtkIconLookupFlags, NO_GTYPE, decl_prefix GTK
>MM_API)\n">MM_API)\n"
12439"      </code>"25399"      </code>"
12440msgstr ""25400msgstr ""
nn25401"\n"
25402"_WRAP_ENUM(IconLookupFlags, GtkIconLookupFlags, NO_GTYPE)\n"
25403"      "
1244125404
12442#. (itstool) path: varlistentry/term25405#. (itstool) path: varlistentry/term
12443#: C/index-in.docbook:1103225406#: C/index-in.docbook:11032
12444msgid "gtype_func &lt;function_name&gt;"25407msgid "gtype_func &lt;function_name&gt;"
n12445msgstr ""n25408msgstr "gtype_func &lt;funktionsnamn&gt;"
1244625409
12447#. (itstool) path: listitem/para25410#. (itstool) path: listitem/para
12448#: C/index-in.docbook:1103425411#: C/index-in.docbook:11034
n12449msgid "Specifies the name of the <function>*_get_type()</function> function for n25412#, fuzzy
>the C enum. Use this parameter if <command>gmmproc</command> can't deduce the co 
>rrect function name from the name of the C enum type." 
25413msgid ""
25414"Specifies the name of the <function>*_get_type()</function> function for the "
25415"C enum. Use this parameter if <command>gmmproc</command> can't deduce the "
25416"correct function name from the name of the C enum type."
12450msgstr ""25417msgstr ""
nn25418"Anger namnet på <function>*_get_type()</function>-funktionen för C-"
25419"uppräkningen. Använd denna parameter om <command>gmmproc</command> inte kan "
25420"räkna ut det rätta funktionsnamnet från namnet för C-uppräkningstypen."
1245125421
12452#. (itstool) path: listitem/para25422#. (itstool) path: listitem/para
12453#: C/index-in.docbook:1103725423#: C/index-in.docbook:11037
12454msgid "For example, from <filename>dbusproxy.hg</filename> in glibmm:"25424msgid "For example, from <filename>dbusproxy.hg</filename> in glibmm:"
n12455msgstr ""n25425msgstr "Till exempel, från <filename>dbusproxy.hg</filename> i glibmm:"
1245625426
12457#. (itstool) path: listitem/programlisting25427#. (itstool) path: listitem/programlisting
12458#: C/index-in.docbook:1103825428#: C/index-in.docbook:11038
n12459#, no-wrapn25429#, fuzzy, no-wrap
25430#| msgid ""
25431#| "\n"
25432#| "_WRAP_ENUM(ProxyFlags, GDBusProxyFlags, gtype_func g_dbus_proxy_flags_get_ty
 >pe)\n"
25433#| "      "
12460msgid ""25434msgid ""
12461"<code>_WRAP_ENUM(ProxyFlags, GDBusProxyFlags, gtype_func g_dbus_proxy_flags_get25435"<code>_WRAP_ENUM(ProxyFlags, GDBusProxyFlags, gtype_func g_dbus_proxy_flags_get
>_type, decl_prefix GIOMM_API)\n">_type, decl_prefix GIOMM_API)\n"
12462"      </code>"25436"      </code>"
12463msgstr ""25437msgstr ""
nn25438"\n"
25439"_WRAP_ENUM(ProxyFlags, GDBusProxyFlags, gtype_func g_dbus_proxy_flags_get_type)
 >\n"
25440"      "
1246425441
12465#. (itstool) path: varlistentry/term25442#. (itstool) path: varlistentry/term
12466#: C/index-in.docbook:1104325443#: C/index-in.docbook:11043
12467msgid "CONV_TO_INT"25444msgid "CONV_TO_INT"
n12468msgstr ""n25445msgstr "CONV_TO_INT"
1246925446
12470#. (itstool) path: listitem/para25447#. (itstool) path: listitem/para
12471#: C/index-in.docbook:1104525448#: C/index-in.docbook:11045
n12472msgid "\"Convertible to int.\" Generates a plain enum (not an enum class) withinn25449#, fuzzy
> a class. Such an enum is scoped like an enum class, but unlike an enum class, i 
>t can be implicitly converted to <type>int</type>." 
25450msgid ""
25451"\"Convertible to int.\" Generates a plain enum (not an enum class) within a "
25452"class. Such an enum is scoped like an enum class, but unlike an enum class, "
25453"it can be implicitly converted to <type>int</type>."
12473msgstr ""25454msgstr ""
nn25455"\"Convertible to int.\" Genererar en vanlig uppräkning (inte en "
25456"uppräkningsklass) i en klass. En sådan uppräckning har räckvidd som en "
25457"uppräkningsklass, men till skillnad från en uppräkningsklass kan den "
25458"implicit konverteras till <type>int</type>."
1247425459
12475#. (itstool) path: listitem/para25460#. (itstool) path: listitem/para
12476#: C/index-in.docbook:1104825461#: C/index-in.docbook:11048
12477msgid "For example, from <filename>dialog.hg</filename>:"25462msgid "For example, from <filename>dialog.hg</filename>:"
n12478msgstr ""n25463msgstr "Till exempel, från <filename>dialog.hg</filename>:"
1247925464
12480#. (itstool) path: listitem/programlisting25465#. (itstool) path: listitem/programlisting
12481#: C/index-in.docbook:1104925466#: C/index-in.docbook:11049
n12482#, no-wrapn25467#, fuzzy, no-wrap
25468#| msgid ""
25469#| "\n"
25470#| "_WRAP_ENUM(ResponseType, GtkResponseType, CONV_TO_INT)\n"
25471#| "      "
12483msgid ""25472msgid ""
12484"<code>_WRAP_ENUM(ResponseType, GtkResponseType, CONV_TO_INT, decl_prefix GTKMM_25473"<code>_WRAP_ENUM(ResponseType, GtkResponseType, CONV_TO_INT, decl_prefix GTKMM_
>API)\n">API)\n"
12485"      </code>"25474"      </code>"
12486msgstr ""25475msgstr ""
nn25476"\n"
25477"_WRAP_ENUM(ResponseType, GtkResponseType, CONV_TO_INT)\n"
25478"      "
1248725479
12488#. (itstool) path: varlistentry/term25480#. (itstool) path: varlistentry/term
12489#: C/index-in.docbook:1105425481#: C/index-in.docbook:11054
nn25482#, fuzzy
12490msgid "s#&lt;from&gt;#&lt;to&gt;#"25483msgid "s#&lt;from&gt;#&lt;to&gt;#"
n12491msgstr ""n25484msgstr "s#&lt;från&gt;#&lt;till&gt;#"
1249225485
12493#. (itstool) path: listitem/para25486#. (itstool) path: listitem/para
12494#: C/index-in.docbook:1105625487#: C/index-in.docbook:11056
nn25488#, fuzzy
25489msgid ""
12495msgid "Substitutes (part of) the name of one or more enum constants. You can add25490"Substitutes (part of) the name of one or more enum constants. You can add "
> any number of substitutions." 
25491"any number of substitutions."
12496msgstr ""25492msgstr ""
nn25493"Ersätter (en del av) namnet på en eller flera uppräkningskonstanter. Du kan "
25494"lägga till valfritt antal ersättningar."
1249725495
12498#. (itstool) path: listitem/para25496#. (itstool) path: listitem/para
12499#: C/index-in.docbook:1105825497#: C/index-in.docbook:11058
nn25498#, fuzzy
25499#| msgid "For example, from <filename>icontheme.hg</filename>:"
12500msgid "For example, from <filename>toplevel.hg</filename>:"25500msgid "For example, from <filename>toplevel.hg</filename>:"
n12501msgstr ""n25501msgstr "Till exempel, från <filename>icontheme.hg</filename>:"
1250225502
12503#. (itstool) path: listitem/programlisting25503#. (itstool) path: listitem/programlisting
12504#: C/index-in.docbook:1105925504#: C/index-in.docbook:11059
12505#, no-wrap25505#, no-wrap
12506msgid ""25506msgid ""
12515msgid "decl_prefix &lt;declaration_prefix&gt;"25515msgid "decl_prefix &lt;declaration_prefix&gt;"
12516msgstr ""25516msgstr ""
1251725517
12518#. (itstool) path: listitem/para25518#. (itstool) path: listitem/para
12519#: C/index-in.docbook:1106825519#: C/index-in.docbook:11068
n12520msgid "Typically used for a C preprocessor macro defined as <literal>__declspec(n25520msgid ""
>dllexport)</literal> or <literal>__declspec(dllimport)</literal> when building w 
>ith MSVC on Windows, defined as an empty string otherwise." 
25521"Typically used for a C preprocessor macro defined as "
25522"<literal>__declspec(dllexport)</literal> or <literal>__declspec(dllimport)</"
25523"literal> when building with MSVC on Windows, defined as an empty string "
25524"otherwise."
12521msgstr ""25525msgstr ""
1252225526
12523#. (itstool) path: section/title25527#. (itstool) path: section/title
12524#: C/index-in.docbook:1109225528#: C/index-in.docbook:11092
12525msgid "_WRAP_ENUM_DOCS_ONLY"25529msgid "_WRAP_ENUM_DOCS_ONLY"
n12526msgstr ""n25530msgstr "_WRAP_ENUM_DOCS_ONLY"
1252725531
12528#. (itstool) path: section/para25532#. (itstool) path: section/para
12529#: C/index-in.docbook:1109425533#: C/index-in.docbook:11094
n12530msgid "This macro just generates a Doxygen documentation block for the enum. Thin25534#, fuzzy
>s is useful for enums that can't be wrapped with <function>_WRAP_ENUM()</functio 
>n> because they are complexly defined (maybe using C macros) but including the g 
>enerated enum documentation is still desired. It is used with the same syntax as 
> <function>_WRAP_ENUM()</function> and also processes the same options (though N 
>O_GTYPE, gtype_func &lt;function_name&gt; and CONV_TO_INT are ignored because th 
>ey make no difference when just generating the enum's documentation)." 
25535msgid ""
25536"This macro just generates a Doxygen documentation block for the enum. This "
25537"is useful for enums that can't be wrapped with <function>_WRAP_ENUM()</"
25538"function> because they are complexly defined (maybe using C macros) but "
25539"including the generated enum documentation is still desired. It is used with "
25540"the same syntax as <function>_WRAP_ENUM()</function> and also processes the "
25541"same options (though NO_GTYPE, gtype_func &lt;function_name&gt; and "
25542"CONV_TO_INT are ignored because they make no difference when just generating "
25543"the enum's documentation)."
12531msgstr ""25544msgstr ""
nn25545"Detta makro genererar bara ett Doxygen-dokumentationsblock för uppräkningen. "
25546"Detta är användbart för uppräkningar som inte kan omslutas med "
25547"<function>_WRAP_ENUM()</function> för att de är komplext definierade (kanske "
25548"med C-makron) men att det fortfarande är önskvärt att inkludera den "
25549"genererade uppräkningsdokumentationen. Det används med samma syntax som "
25550"<function>_WRAP_ENUM()</function> och bearbetar även samma alternativ (även "
25551"om NO_GTYPE, gtype_func &lt;funktionsnamn&gt; och CONV_TO_INT ignoreras för "
25552"att de inte gör någon skillnad då bara uppräkningens dokumentation "
25553"genereras)."
1253225554
12533#. (itstool) path: section/title25555#. (itstool) path: section/title
12534#: C/index-in.docbook:1110625556#: C/index-in.docbook:11106
12535msgid "_WRAP_GERROR"25557msgid "_WRAP_GERROR"
n12536msgstr ""n25558msgstr "_WRAP_GERROR"
1253725559
12538#. (itstool) path: section/para25560#. (itstool) path: section/para
12539#: C/index-in.docbook:1110825561#: C/index-in.docbook:11108
n12540msgid "This macro generates a <phrase role=\"nowrap\">C++</phrase> exception clan25562#, fuzzy
>ss, derived from <classname>Glib::Error</classname>, with a <type>Code</type> en 
>um and a <methodname>code()</methodname> method. You must specify the desired <p 
>hrase role=\"nowrap\">C++</phrase> name, the name of the corresponding C enum, a 
>nd the prefix for the C enum values." 
25563msgid ""
25564"This macro generates a <phrase role=\"nowrap\">C++</phrase> exception class, "
25565"derived from <classname>Glib::Error</classname>, with a <type>Code</type> "
25566"enum and a <methodname>code()</methodname> method. You must specify the "
25567"desired <phrase role=\"nowrap\">C++</phrase> name, the name of the "
25568"corresponding C enum, and the prefix for the C enum values."
12541msgstr ""25569msgstr ""
nn25570"Detta makro genererar en C++-undantagsklass, härledd från <classname>Glib::"
25571"Error</classname> med en <type>Code</type>-uppräkning och en metod "
25572"<methodname>code()</methodname>. Du måste ange det önskade C++-namnet, "
25573"namnet på den motsvarande C-uppräkningen, och prefixet för C-"
25574"uppräkningsvärdena."
1254225575
12543#. (itstool) path: section/para25576#. (itstool) path: section/para
12544#: C/index-in.docbook:1111125577#: C/index-in.docbook:11111
nn25578#, fuzzy
25579msgid ""
12545msgid "This exception can then be thrown by methods which are generated from _WR25580"This exception can then be thrown by methods which are generated from "
>AP_METHOD() with the errthrow option." 
25581"_WRAP_METHOD() with the errthrow option."
12546msgstr ""25582msgstr ""
nn25583"Detta undantag kan sedan kastas av metoder som genereras från _WRAP_METHOD() "
25584"med errthrow-alternativet."
1254725585
12548#. (itstool) path: section/para25586#. (itstool) path: section/para
12549#: C/index-in.docbook:1111325587#: C/index-in.docbook:11113
12550msgid "For instance, from <filename>pixbuf.hg</filename>:"25588msgid "For instance, from <filename>pixbuf.hg</filename>:"
n12551msgstr ""n25589msgstr "Till exempel, från <filename>pixbuf.hg</filename>:"
1255225590
12553#. (itstool) path: section/programlisting25591#. (itstool) path: section/programlisting
12554#: C/index-in.docbook:1111425592#: C/index-in.docbook:11114
n12555#, no-wrapn25593#, fuzzy, no-wrap
25594#| msgid ""
25595#| "\n"
25596#| "_WRAP_GERROR(PixbufError, GdkPixbufError, GDK_PIXBUF_ERROR)\n"
12556msgid ""25597msgid ""
12557"<code>_WRAP_GERROR(PixbufError, GdkPixbufError, GDK_PIXBUF_ERROR, decl_prefix G25598"<code>_WRAP_GERROR(PixbufError, GdkPixbufError, GDK_PIXBUF_ERROR, decl_prefix G
>DKMM_API)\n">DKMM_API)\n"
12558"</code>"25599"</code>"
12559msgstr ""25600msgstr ""
nn25601"\n"
25602"_WRAP_GERROR(PixbufError, GdkPixbufError, GDK_PIXBUF_ERROR)\n"
1256025603
12561#. (itstool) path: section/para25604#. (itstool) path: section/para
12562#: C/index-in.docbook:1111625605#: C/index-in.docbook:11116
n12563msgid "_WRAP_GERROR() accepts the same optional arguments as _WRAP_ENUM() (thougn25606#, fuzzy
>h CONV_TO_INT is ignored because all exception class enums are plain enums withi 
>n a class)." 
25607msgid ""
25608"_WRAP_GERROR() accepts the same optional arguments as _WRAP_ENUM() (though "
25609"CONV_TO_INT is ignored because all exception class enums are plain enums "
25610"within a class)."
12564msgstr ""25611msgstr ""
nn25612"_WRAP_GERROR() accepterar samma valfria argument som _WRAP_ENUM() (även om "
25613"CONV_TO_INT ignoreras för att alla undantagsklassuppräkningar är vanliga "
25614"uppräkningar i en klass)."
1256525615
12566#. (itstool) path: section/title25616#. (itstool) path: section/title
12567#: C/index-in.docbook:1112225617#: C/index-in.docbook:11122
12568msgid "_MEMBER_GET / _MEMBER_SET"25618msgid "_MEMBER_GET / _MEMBER_SET"
n12569msgstr ""n25619msgstr "_MEMBER_GET / _MEMBER_SET"
1257025620
12571#. (itstool) path: section/para25621#. (itstool) path: section/para
12572#: C/index-in.docbook:1112325622#: C/index-in.docbook:11123
n12573msgid "Use these macros if you're wrapping a simple struct or boxed type that prn25623#, fuzzy
>ovides direct access to its data members, to create getters and setters for the  
>data members." 
25624msgid ""
25625"Use these macros if you're wrapping a simple struct or boxed type that "
25626"provides direct access to its data members, to create getters and setters "
25627"for the data members."
12574msgstr ""25628msgstr ""
nn25629"Använd dessa makron om du omsluter en ensam struct eller boxad typ som "
25630"tillhandahåller direkt åtkomst till sina datamedlemmar, för att skapa get- "
25631"och set-funktioner för datamedlemmarna."
1257525632
12576#. (itstool) path: section/para25633#. (itstool) path: section/para
12577#: C/index-in.docbook:1112725634#: C/index-in.docbook:11127
12578msgid "<function>_MEMBER_GET(C++ name, C name, C++ type, C type)</function>"25635msgid "<function>_MEMBER_GET(C++ name, C name, C++ type, C type)</function>"
n12579msgstr ""n25636msgstr "<function>_MEMBER_GET(C++-namn, C-namn, C++-typ, C-typ)</function>"
1258025637
12581#. (itstool) path: section/para25638#. (itstool) path: section/para
12582#: C/index-in.docbook:1112825639#: C/index-in.docbook:11128
12583msgid "<function>_MEMBER_SET(C++ name, C name, C++ type, C type)</function>"25640msgid "<function>_MEMBER_SET(C++ name, C name, C++ type, C type)</function>"
n12584msgstr ""n25641msgstr "<function>_MEMBER_SET(C++-namn, C-namn, C++-typ, C-typ)</function>"
1258525642
12586#. (itstool) path: section/para25643#. (itstool) path: section/para
12587#: C/index-in.docbook:1112925644#: C/index-in.docbook:11129
12588msgid "For example, in <filename>rectangle.hg</filename>:"25645msgid "For example, in <filename>rectangle.hg</filename>:"
n12589msgstr ""n25646msgstr "Till exempel, i <filename>rectangle.hg</filename>:"
1259025647
12591#. (itstool) path: section/programlisting25648#. (itstool) path: section/programlisting
12592#: C/index-in.docbook:1113225649#: C/index-in.docbook:11132
n12593#, no-wrapn25650#, fuzzy, no-wrap
12594msgid ""25651#| msgid "_MEMBER_GET(x, x, int, int)"
12595"<code>_MEMBER_GET(x, x, int, int)</code>"25652msgid "<code>_MEMBER_GET(x, x, int, int)</code>"
12596msgstr ""25653msgstr "_MEMBER_GET(x, x, int, int)"
1259725654
12598#. (itstool) path: section/title25655#. (itstool) path: section/title
12599#: C/index-in.docbook:1113625656#: C/index-in.docbook:11136
12600msgid "_MEMBER_GET_PTR / _MEMBER_SET_PTR"25657msgid "_MEMBER_GET_PTR / _MEMBER_SET_PTR"
n12601msgstr ""n25658msgstr "_MEMBER_GET_PTR / _MEMBER_SET_PTR"
1260225659
12603#. (itstool) path: section/para25660#. (itstool) path: section/para
12604#: C/index-in.docbook:1113725661#: C/index-in.docbook:11137
n12605msgid "Use these macros to automatically provide getters and setters for a data n25662#, fuzzy
>member that is a pointer type. For the getter function, it will create two metho 
>ds, one const and one non-const." 
25663msgid ""
25664"Use these macros to automatically provide getters and setters for a data "
25665"member that is a pointer type. For the getter function, it will create two "
25666"methods, one const and one non-const."
12606msgstr ""25667msgstr ""
nn25668"Använd dessa makron för att automatiskt tillhandahålla get- och set-"
25669"funktioner för en datamedlem som är en pekartyp. För get-funktionen kommer "
25670"det skapa två metoder, en const och en icke-const."
1260725671
12608#. (itstool) path: section/para25672#. (itstool) path: section/para
12609#: C/index-in.docbook:1114225673#: C/index-in.docbook:11142
nn25674msgid ""
12610msgid "<function>_MEMBER_GET_PTR(C++ name, C name, C++ type, C type)</function>"25675"<function>_MEMBER_GET_PTR(C++ name, C name, C++ type, C type)</function>"
12611msgstr ""25676msgstr "<function>_MEMBER_GET_PTR(C++-namn, C-namn, C++-typ, C-typ)</function>"
1261225677
12613#. (itstool) path: section/para25678#. (itstool) path: section/para
12614#: C/index-in.docbook:1114325679#: C/index-in.docbook:11143
nn25680msgid ""
12615msgid "<function>_MEMBER_SET_PTR(C++ name, C name, C++ type, C type)</function>"25681"<function>_MEMBER_SET_PTR(C++ name, C name, C++ type, C type)</function>"
12616msgstr ""25682msgstr "<function>_MEMBER_SET_PTR(C++-namn, C-namn, C++-typ, C-typ)</function>"
1261725683
12618#. (itstool) path: section/para25684#. (itstool) path: section/para
12619#: C/index-in.docbook:1114425685#: C/index-in.docbook:11144
nn25686msgid ""
12620msgid "For example, for <classname>Pango::Analysis</classname> in <filename>item25687"For example, for <classname>Pango::Analysis</classname> in <filename>item."
>.hg</filename>:" 
25688"hg</filename>:"
12621msgstr ""25689msgstr ""
nn25690"Till exempel, för <classname>Pango::Analysis</classname> i <filename>item."
25691"hg</filename>:"
1262225692
12623#. (itstool) path: section/programlisting25693#. (itstool) path: section/programlisting
12624#: C/index-in.docbook:1114625694#: C/index-in.docbook:11146
n12625#, no-wrapn25695#, fuzzy, no-wrap
25696#| msgid ""
25697#| "\n"
25698#| "// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang*)\
 >n"
25699#| "// It's just a comment. It's difficult to find a real-world example.\n"
12626msgid ""25700msgid ""
12627"<code>// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang25701"<code>// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang
>*)\n">*)\n"
12628"// It's just a comment. It's difficult to find a real-world example.\n"25702"// It's just a comment. It's difficult to find a real-world example.\n"
12629"</code>"25703"</code>"
12630msgstr ""25704msgstr ""
nn25705"\n"
25706"// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang*)\n"
25707"// Det är bara en kommentar. Det är svårt att hitta ett exempel i verkligheten.
 >\n"
1263125708
12632#. (itstool) path: section/title25709#. (itstool) path: section/title
12633#: C/index-in.docbook:1115225710#: C/index-in.docbook:11152
12634msgid "_MEMBER_GET_GOBJECT / _MEMBER_SET_GOBJECT"25711msgid "_MEMBER_GET_GOBJECT / _MEMBER_SET_GOBJECT"
n12635msgstr ""n25712msgstr "_MEMBER_GET_GOBJECT / _MEMBER_SET_GOBJECT"
1263625713
12637#. (itstool) path: section/para25714#. (itstool) path: section/para
12638#: C/index-in.docbook:1115325715#: C/index-in.docbook:11153
n12639msgid "Use these macros to provide getters and setters for a data member that isn25716#, fuzzy
> a <classname>GObject</classname> type that must be referenced before being retu 
>rned." 
25717msgid ""
25718"Use these macros to provide getters and setters for a data member that is a "
25719"<classname>GObject</classname> type that must be referenced before being "
25720"returned."
12640msgstr ""25721msgstr ""
nn25722"Använd dessa makron för att tillhandahålla get- och set-funktioner för en "
25723"datamedlem som är en <classname>GObject</classname>-typ som måste refereras "
25724"innan den returneras."
1264125725
12642#. (itstool) path: section/para25726#. (itstool) path: section/para
12643#: C/index-in.docbook:1115825727#: C/index-in.docbook:11158
nn25728msgid ""
12644msgid "<function>_MEMBER_GET_GOBJECT(C++ name, C name, C++ type, C type)</functi25729"<function>_MEMBER_GET_GOBJECT(C++ name, C name, C++ type, C type)</function>"
>on>" 
12645msgstr ""25730msgstr ""
nn25731"<function>_MEMBER_GET_GOBJECT(C++-namn, C-namn, C++-typ, C-typ)</function>"
1264625732
12647#. (itstool) path: section/para25733#. (itstool) path: section/para
12648#: C/index-in.docbook:1115925734#: C/index-in.docbook:11159
nn25735msgid ""
12649msgid "<function>_MEMBER_SET_GOBJECT(C++ name, C name, C++ type, C type)</functi25736"<function>_MEMBER_SET_GOBJECT(C++ name, C name, C++ type, C type)</function>"
>on>" 
12650msgstr ""25737msgstr ""
nn25738"<function>_MEMBER_SET_GOBJECT(C++-namn, C-namn, C++-typ, C-typ)</function>"
1265125739
12652#. (itstool) path: section/para25740#. (itstool) path: section/para
12653#: C/index-in.docbook:1116025741#: C/index-in.docbook:11160
12654msgid "For example, in Pangomm, <filename>layoutline.hg</filename>:"25742msgid "For example, in Pangomm, <filename>layoutline.hg</filename>:"
n12655msgstr ""n25743msgstr "Till exempel, i Pangomm, <filename>layoutline.hg</filename>:"
1265625744
12657#. (itstool) path: section/programlisting25745#. (itstool) path: section/programlisting
12658#: C/index-in.docbook:1116125746#: C/index-in.docbook:11161
n12659#, no-wrapn25747#, fuzzy, no-wrap
25748#| msgid ""
25749#| "\n"
25750#| "_MEMBER_GET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)\n"
12660msgid ""25751msgid ""
12661"<code>_MEMBER_GET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)\n"25752"<code>_MEMBER_GET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)\n"
12662"</code>"25753"</code>"
12663msgstr ""25754msgstr ""
nn25755"\n"
25756"_MEMBER_GET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)\n"
1266425757
12665#. (itstool) path: section/title25758#. (itstool) path: section/title
12666#: C/index-in.docbook:1116825759#: C/index-in.docbook:11168
12667msgid "gmmproc Parameter Processing"25760msgid "gmmproc Parameter Processing"
n12668msgstr ""n25761msgstr "Parameterbearbetning med gmmproc"
1266925762
12670#. (itstool) path: section/para25763#. (itstool) path: section/para
12671#: C/index-in.docbook:1116925764#: C/index-in.docbook:11169
n12672msgid "<command>gmmproc</command> allows processing the parameters in a method sn25765#, fuzzy
>ignature for the macros that process method signatures (like <function>_WRAP_MET 
>HOD()</function>, <function>_WRAP_CTOR()</function> and <function>_WRAP_CREATE() 
></function>) in a variety of ways:" 
25766msgid ""
25767"<command>gmmproc</command> allows processing the parameters in a method "
25768"signature for the macros that process method signatures (like "
25769"<function>_WRAP_METHOD()</function>, <function>_WRAP_CTOR()</function> and "
25770"<function>_WRAP_CREATE()</function>) in a variety of ways:"
12673msgstr ""25771msgstr ""
nn25772"<command>gmmproc</command> tillåter bearbetning av parametrarna i en "
25773"metodsignatur för makrona som bearbetar metodsignaturer (som "
25774"<function>_WRAP_METHOD()</function>, <function>_WRAP_CTOR()</function> och "
25775"<function>_WRAP_CREATE()</function>) på ett antal sätt:"
1267425776
12675#. (itstool) path: section/title25777#. (itstool) path: section/title
12676#: C/index-in.docbook:1117625778#: C/index-in.docbook:11176
12677msgid "Parameter Reordering"25779msgid "Parameter Reordering"
n12678msgstr ""n25780msgstr "Ändra ordning på parametrar"
1267925781
12680#. (itstool) path: section/para25782#. (itstool) path: section/para
12681#: C/index-in.docbook:1117825783#: C/index-in.docbook:11178
n12682msgid "For all the macros that process method signatures, it is possible to specn25784msgid ""
>ify a different order for the <phrase role=\"nowrap\">C++</phrase> parameters th 
>an the existing order in the C function, virtual function or signal. For example 
>, say that the following C function were being wrapped as a <phrase role=\"nowra 
>p\">C++</phrase> method for the <classname>Gtk::Widget</classname> class:" 
25785"For all the macros that process method signatures, it is possible to specify "
25786"a different order for the <phrase role=\"nowrap\">C++</phrase> parameters "
25787"than the existing order in the C function, virtual function or signal. For "
25788"example, say that the following C function were being wrapped as a <phrase "
25789"role=\"nowrap\">C++</phrase> method for the <classname>Gtk::Widget</"
25790"classname> class:"
12683msgstr ""25791msgstr ""
1268425792
12685#. (itstool) path: section/programlisting25793#. (itstool) path: section/programlisting
12686#: C/index-in.docbook:1118425794#: C/index-in.docbook:11184
n12687#, no-wrapn25795#, fuzzy, no-wrap
12688msgid ""25796msgid ""
12689"<code>void gtk_widget_set_device_events(GtkWidget* widget, GdkDevice* device,\n25797"<code>void gtk_widget_set_device_events(GtkWidget* widget, GdkDevice* device,\n
>">"
12690"  GdkEventMask events);\n"25798"  GdkEventMask events);\n"
12691"</code>"25799"</code>"
12692msgstr ""25800msgstr ""
nn25801"\n"
25802"void gtk_widget_set_device_events(GtkWidget* widget, GdkDevice* device,\n"
25803"  GdkEventMask events);\n"
1269325804
12694#. (itstool) path: section/para25805#. (itstool) path: section/para
12695#: C/index-in.docbook:1118725806#: C/index-in.docbook:11187
n12696msgid "However, changing the order of the <phrase role=\"nowrap\">C++</phrase> mn25807msgid ""
>ethod's two parameters is necessary. Something like the following would wrap the 
> function as a <phrase role=\"nowrap\">C++</phrase> method with a different orde 
>r for the two parameters:" 
25808"However, changing the order of the <phrase role=\"nowrap\">C++</phrase> "
25809"method's two parameters is necessary. Something like the following would "
25810"wrap the function as a <phrase role=\"nowrap\">C++</phrase> method with a "
25811"different order for the two parameters:"
12697msgstr ""25812msgstr ""
1269825813
12699#. (itstool) path: section/programlisting25814#. (itstool) path: section/programlisting
12700#: C/index-in.docbook:1119125815#: C/index-in.docbook:11191
n12701#, no-wrapn25816#, fuzzy, no-wrap
12702msgid ""25817msgid ""
12703"<code>_WRAP_METHOD(void set_device_events(Gdk::EventMask events{events},\n"25818"<code>_WRAP_METHOD(void set_device_events(Gdk::EventMask events{events},\n"
12704"  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{device}),\n"25819"  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{device}),\n"
12705"  gtk_widget_set_device_events)\n"25820"  gtk_widget_set_device_events)\n"
12706"</code>"25821"</code>"
12707msgstr ""25822msgstr ""
nn25823"\n"
25824"_WRAP_METHOD(void set_device_events(Gdk::EventMask events{events},\n"
25825"  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{device}),\n"
25826"  gtk_widget_set_device_events)\n"
1270825827
12709#. (itstool) path: section/para25828#. (itstool) path: section/para
12710#: C/index-in.docbook:1119525829#: C/index-in.docbook:11195
n12711msgid "The <literal>{c_param_name}</literal> following the method parameter namen25830msgid ""
>s tells <command>gmmproc</command> to map the <phrase role=\"nowrap\">C++</phras 
>e> parameter to the specified C parameter within the <literal>{}</literal>. Sinc 
>e the <phrase role=\"nowrap\">C++</phrase> parameter names correspond to the C o 
>nes, the above could be re-written as:" 
25831"The <literal>{c_param_name}</literal> following the method parameter names "
25832"tells <command>gmmproc</command> to map the <phrase role=\"nowrap\">C++</"
25833"phrase> parameter to the specified C parameter within the <literal>{}</"
25834"literal>. Since the <phrase role=\"nowrap\">C++</phrase> parameter names "
25835"correspond to the C ones, the above could be re-written as:"
12712msgstr ""25836msgstr ""
1271325837
12714#. (itstool) path: section/programlisting25838#. (itstool) path: section/programlisting
12715#: C/index-in.docbook:1120025839#: C/index-in.docbook:11200
n12716#, no-wrapn25840#, fuzzy, no-wrap
25841#| msgid ""
25842#| "\n"
25843#| "_WRAP_METHOD(void set_device_events(Gdk::EventMask events{.},\n"
25844#| "  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{.}),\n"
25845#| "  gtk_widget_set_device_events)\n"
12717msgid ""25846msgid ""
12718"<code>_WRAP_METHOD(void set_device_events(Gdk::EventMask events{.},\n"25847"<code>_WRAP_METHOD(void set_device_events(Gdk::EventMask events{.},\n"
12719"  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{.}),\n"25848"  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{.}),\n"
12720"  gtk_widget_set_device_events)\n"25849"  gtk_widget_set_device_events)\n"
12721"</code>"25850"</code>"
12722msgstr ""25851msgstr ""
nn25852"\n"
25853"_WRAP_METHOD(void set_device_events(Gdk::EventMask events{.},\n"
25854"  const Glib::RefPtr&lt;const Gdk::Device&gt;&amp; device{.}),\n"
25855"  gtk_widget_set_device_events)\n"
1272325856
12724#. (itstool) path: warning/para25857#. (itstool) path: warning/para
12725#: C/index-in.docbook:1120525858#: C/index-in.docbook:11205
n12726msgid "Please note that when reordering parameters for a <function>_WRAP_SIGNAL(n25859#, fuzzy
>)</function> method signature, the C parameter names would always be <literal>p0 
></literal>, <literal>p1</literal>, etc. because the <filename>generate_extra_def 
>s</filename> utility uses those parameter names no matter what the C API's param 
>eter names may be. It's how the utility is written presently." 
25860msgid ""
25861"Please note that when reordering parameters for a <function>_WRAP_SIGNAL()</"
25862"function> method signature, the C parameter names would always be "
25863"<literal>p0</literal>, <literal>p1</literal>, etc. because the "
25864"<filename>generate_extra_defs</filename> utility uses those parameter names "
25865"no matter what the C API's parameter names may be. It's how the utility is "
25866"written presently."
12727msgstr ""25867msgstr ""
nn25868"Observera att vid ändring av ordning för parametrar för en "
25869"<function>_WRAP_SIGNAL()</function>-metodsignatur skulle C-parameternamnen "
25870"alltid vara <literal>p0</literal>, <literal>p1</literal> och så vidare för "
25871"verktyget <filename>generate_extra_defs</filename> använder dessa "
25872"parameternamn oavsett vad C-API:ts parameternamn är. Det är hur verktyget är "
25873"skrivet för tillfället."
1272825874
12729#. (itstool) path: section/title25875#. (itstool) path: section/title
12730#: C/index-in.docbook:1121725876#: C/index-in.docbook:11217
12731msgid "Optional Parameter Processing"25877msgid "Optional Parameter Processing"
n12732msgstr ""n25878msgstr "Valfri parameterbearbetning"
1273325879
12734#. (itstool) path: section/para25880#. (itstool) path: section/para
12735#: C/index-in.docbook:1121925881#: C/index-in.docbook:11219
n12736msgid "For all macros processing method signatures except <function>_WRAP_SIGNALn25882msgid ""
>()</function> and <function>_WRAP_VFUNC()</function> it is also possible to make 
> the parameters optional so that extra <phrase role=\"nowrap\">C++</phrase> meth 
>ods are generated without the specified optional parameter. For example, say tha 
>t the following <function>*_new()</function> function were being wrapped as a co 
>nstructor in the <classname>Gtk::ToolButton</classname> class:" 
25883"For all macros processing method signatures except <function>_WRAP_SIGNAL()</"
25884"function> and <function>_WRAP_VFUNC()</function> it is also possible to make "
25885"the parameters optional so that extra <phrase role=\"nowrap\">C++</phrase> "
25886"methods are generated without the specified optional parameter. For example, "
25887"say that the following <function>*_new()</function> function were being "
25888"wrapped as a constructor in the <classname>Gtk::ToolButton</classname> class:"
12737msgstr ""25889msgstr ""
1273825890
12739#. (itstool) path: section/programlisting25891#. (itstool) path: section/programlisting
12740#: C/index-in.docbook:1122725892#: C/index-in.docbook:11227
n12741#, no-wrapn25893#, fuzzy, no-wrap
25894#| msgid ""
25895#| "\n"
25896#| "GtkToolItem* gtk_tool_button_new(GtkWidget* icon_widget, const gchar* label)
 >;\n"
12742msgid ""25897msgid ""
12743"<code>GtkToolItem* gtk_tool_button_new(GtkWidget* icon_widget, const gchar* lab25898"<code>GtkToolItem* gtk_tool_button_new(GtkWidget* icon_widget, const gchar* lab
>el);\n">el);\n"
12744"</code>"25899"</code>"
12745msgstr ""25900msgstr ""
nn25901"\n"
25902"GtkToolItem* gtk_tool_button_new(GtkWidget* icon_widget, const gchar* label);\n
 >"
1274625903
12747#. (itstool) path: section/para25904#. (itstool) path: section/para
12748#: C/index-in.docbook:1122925905#: C/index-in.docbook:11229
n12749msgid "Also, say that the C API allowed NULL for the function's <parameter>labeln25906msgid ""
></parameter> parameter so that that parameter is optional. It would be possible  
>to have <command>gmmproc</command> generate the original constructor (with all t 
>he parameters) along with an additional constructor without that optional parame 
>ter by appending a <literal>{?}</literal> to the parameter name like so:" 
25907"Also, say that the C API allowed NULL for the function's <parameter>label</"
25908"parameter> parameter so that that parameter is optional. It would be "
25909"possible to have <command>gmmproc</command> generate the original "
25910"constructor (with all the parameters) along with an additional constructor "
25911"without that optional parameter by appending a <literal>{?}</literal> to the "
25912"parameter name like so:"
12750msgstr ""25913msgstr ""
1275125914
12752#. (itstool) path: section/programlisting25915#. (itstool) path: section/programlisting
12753#: C/index-in.docbook:1123525916#: C/index-in.docbook:11235
n12754#, no-wrapn25917#, fuzzy, no-wrap
25918#| msgid ""
25919#| "\n"
25920#| "_WRAP_CTOR(ToolButton(Widget&amp; icon_widget, const Glib::ustring&amp; labe
 >l{?}),\n"
25921#| "  gtk_tool_button_new)\n"
12755msgid ""25922msgid ""
12756"<code>_WRAP_CTOR(ToolButton(Widget&amp; icon_widget, const Glib::ustring&amp; l25923"<code>_WRAP_CTOR(ToolButton(Widget&amp; icon_widget, const Glib::ustring&amp; l
>abel{?}),\n">abel{?}),\n"
12757"  gtk_tool_button_new)\n"25924"  gtk_tool_button_new)\n"
12758"</code>"25925"</code>"
12759msgstr ""25926msgstr ""
nn25927"\n"
25928"_WRAP_CTOR(ToolButton(Widget&amp; icon_widget, const Glib::ustring&amp; label{?
 >}),\n"
25929"  gtk_tool_button_new)\n"
1276025930
12761#. (itstool) path: section/para25931#. (itstool) path: section/para
12762#: C/index-in.docbook:1123825932#: C/index-in.docbook:11238
nn25933msgid ""
12763msgid "In this case, two constructors would be generated: One with the optional 25934"In this case, two constructors would be generated: One with the optional "
>parameter and one without it." 
25935"parameter and one without it."
12764msgstr ""25936msgstr ""
1276525937
12766#. (itstool) path: section/title25938#. (itstool) path: section/title
12767#: C/index-in.docbook:1124425939#: C/index-in.docbook:11244
nn25940#, fuzzy
12768msgid "Output Parameter Processing"25941msgid "Output Parameter Processing"
n12769msgstr ""n25942msgstr "Parameterbearbetning av utdata"
1277025943
12771#. (itstool) path: section/para25944#. (itstool) path: section/para
12772#: C/index-in.docbook:1124625945#: C/index-in.docbook:11246
n12773msgid "With <function>_WRAP_METHOD()</function> it is also possible for the retun25946msgid ""
>rn of the wrapped C function (if it has one) to be placed in an output parameter 
> of the <phrase role=\"nowrap\">C++</phrase> method instead of having the <phras 
>e role=\"nowrap\">C++</phrase> method also return a value like the C function do 
>es. To do that, simply include the output parameter in the <phrase role=\"nowrap 
>\">C++</phrase> method parameter list appending a <literal>{OUT}</literal> to th 
>e output parameter name. For example, if <function>gtk_widget_get_request_mode() 
></function> is declared as the following:" 
25947"With <function>_WRAP_METHOD()</function> it is also possible for the return "
25948"of the wrapped C function (if it has one) to be placed in an output "
25949"parameter of the <phrase role=\"nowrap\">C++</phrase> method instead of "
25950"having the <phrase role=\"nowrap\">C++</phrase> method also return a value "
25951"like the C function does. To do that, simply include the output parameter in "
25952"the <phrase role=\"nowrap\">C++</phrase> method parameter list appending a "
25953"<literal>{OUT}</literal> to the output parameter name. For example, if "
25954"<function>gtk_widget_get_request_mode()</function> is declared as the "
25955"following:"
12774msgstr ""25956msgstr ""
1277525957
12776#. (itstool) path: section/programlisting25958#. (itstool) path: section/programlisting
12777#: C/index-in.docbook:1125525959#: C/index-in.docbook:11255
n12778#, no-wrapn25960#, fuzzy, no-wrap
25961#| msgid ""
25962#| "\n"
25963#| "GtkSizeRequestMode gtk_widget_get_request_mode(GtkWidget* widget);\n"
12779msgid ""25964msgid ""
12780"<code>GtkSizeRequestMode gtk_widget_get_request_mode(GtkWidget* widget);\n"25965"<code>GtkSizeRequestMode gtk_widget_get_request_mode(GtkWidget* widget);\n"
12781"</code>"25966"</code>"
12782msgstr ""25967msgstr ""
nn25968"\n"
25969"GtkSizeRequestMode gtk_widget_get_request_mode(GtkWidget* widget);\n"
1278325970
12784#. (itstool) path: section/para25971#. (itstool) path: section/para
12785#: C/index-in.docbook:1125725972#: C/index-in.docbook:11257
n12786msgid "And having the <phrase role=\"nowrap\">C++</phrase> method set an output n25973msgid ""
>parameter is desired instead of returning a <type>SizeRequestMode</type>, someth 
>ing like the following could be used:" 
25974"And having the <phrase role=\"nowrap\">C++</phrase> method set an output "
25975"parameter is desired instead of returning a <type>SizeRequestMode</type>, "
25976"something like the following could be used:"
12787msgstr ""25977msgstr ""
1278825978
12789#. (itstool) path: section/programlisting25979#. (itstool) path: section/programlisting
12790#: C/index-in.docbook:1126025980#: C/index-in.docbook:11260
n12791#, no-wrapn25981#, fuzzy, no-wrap
12792msgid ""25982msgid ""
12793"<code>_WRAP_METHOD(void get_request_mode(SizeRequestMode&amp; mode{OUT}) const,25983"<code>_WRAP_METHOD(void get_request_mode(SizeRequestMode&amp; mode{OUT}) const,
>\n">\n"
12794"  gtk_widget_get_request_mode)\n"25984"  gtk_widget_get_request_mode)\n"
12795"</code>"25985"</code>"
12796msgstr ""25986msgstr ""
nn25987"\n"
25988"_WRAP_METHOD(void get_request_mode(SizeRequestMode&amp; mode{OUT}) const,\n"
25989"  gtk_widget_get_request_mode)\n"
1279725990
12798#. (itstool) path: section/para25991#. (itstool) path: section/para
12799#: C/index-in.docbook:1126325992#: C/index-in.docbook:11263
n12800msgid "The <literal>{OUT}</literal> appended to the name of the <parameter>mode<n25993msgid ""
>/parameter> output parameter tells <command>gmmproc</command> to place the retur 
>n of the C function in that output parameter. In this case, however, a necessary 
> initialization macro like the following would also have to be specified:" 
25994"The <literal>{OUT}</literal> appended to the name of the <parameter>mode</"
25995"parameter> output parameter tells <command>gmmproc</command> to place the "
25996"return of the C function in that output parameter. In this case, however, a "
25997"necessary initialization macro like the following would also have to be "
25998"specified:"
12801msgstr ""25999msgstr ""
1280226000
12803#. (itstool) path: section/programlisting26001#. (itstool) path: section/programlisting
12804#: C/index-in.docbook:1126826002#: C/index-in.docbook:11268
n12805#, no-wrapn26003#, fuzzy, no-wrap
26004#| msgid ""
26005#| "\n"
26006#| "_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = (SizeReque
 >stMode)($4)')\n"
12806msgid ""26007msgid ""
12807"<code>_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = (SizeRe26008"<code>_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = (SizeRe
>questMode)($4)')\n">questMode)($4)')\n"
12808"</code>"26009"</code>"
12809msgstr ""26010msgstr ""
nn26011"\n"
26012"_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = (SizeRequestM
 >ode)($4)')\n"
1281026013
12811#. (itstool) path: section/para26014#. (itstool) path: section/para
12812#: C/index-in.docbook:1127026015#: C/index-in.docbook:11270
12813msgid "Which could also be written as:"26016msgid "Which could also be written as:"
12814msgstr ""26017msgstr ""
1281526018
12816#. (itstool) path: section/programlisting26019#. (itstool) path: section/programlisting
12817#: C/index-in.docbook:1127126020#: C/index-in.docbook:11271
n12818#, no-wrapn26021#, fuzzy, no-wrap
26022#| msgid ""
26023#| "\n"
26024#| "_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = ($1)($4)')
 >\n"
12819msgid ""26025msgid ""
12820"<code>_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = ($1)($426026"<code>_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = ($1)($4
>)')\n">)')\n"
12821"</code>"26027"</code>"
12822msgstr ""26028msgstr ""
nn26029"\n"
26030"_INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = ($1)($4)')\n"
1282326031
12824#. (itstool) path: section/para26032#. (itstool) path: section/para
12825#: C/index-in.docbook:1127326033#: C/index-in.docbook:11273
n12826msgid "<function>_WRAP_METHOD()</function> also supports setting <phrase role=\"n26034msgid ""
>nowrap\">C++</phrase> output parameters from C output parameters if the C functi 
>on being wrapped has any. Suppose, for example, that we want to wrap the followi 
>ng C function that returns a value in its C output parameter <parameter>out_mime 
>_type</parameter>:" 
26035"<function>_WRAP_METHOD()</function> also supports setting <phrase "
26036"role=\"nowrap\">C++</phrase> output parameters from C output parameters if "
26037"the C function being wrapped has any. Suppose, for example, that we want to "
26038"wrap the following C function that returns a value in its C output parameter "
26039"<parameter>out_mime_type</parameter>:"
12827msgstr ""26040msgstr ""
1282826041
12829#. (itstool) path: section/programlisting26042#. (itstool) path: section/programlisting
12830#: C/index-in.docbook:1127926043#: C/index-in.docbook:11279
n12831#, no-wrapn26044#, fuzzy, no-wrap
26045#| msgid ""
26046#| "\n"
26047#| "GInputStream* gdk_clipboard_read_finish(GdkClipboard* clipboard,\n"
26048#| "  GAsyncResult* result, const char** out_mime_type, GError** error)\n"
12832msgid ""26049msgid ""
12833"<code>GInputStream* gdk_clipboard_read_finish(GdkClipboard* clipboard,\n"26050"<code>GInputStream* gdk_clipboard_read_finish(GdkClipboard* clipboard,\n"
12834"  GAsyncResult* result, const char** out_mime_type, GError** error)\n"26051"  GAsyncResult* result, const char** out_mime_type, GError** error)\n"
12835"</code>"26052"</code>"
12836msgstr ""26053msgstr ""
nn26054"\n"
26055"GInputStream* gdk_clipboard_read_finish(GdkClipboard* clipboard,\n"
26056"  GAsyncResult* result, const char** out_mime_type, GError** error)\n"
1283726057
12838#. (itstool) path: section/para26058#. (itstool) path: section/para
12839#: C/index-in.docbook:1128226059#: C/index-in.docbook:11282
n12840msgid "To have <command>gmmproc</command> place the value returned in the <phrasn26060msgid ""
>e role=\"nowrap\">C++</phrase> <parameter>out_mime_type</parameter> output param 
>eter, something like the following <function>_WRAP_METHOD()</function> macro cou 
>ld be used:" 
26061"To have <command>gmmproc</command> place the value returned in the <phrase "
26062"role=\"nowrap\">C++</phrase> <parameter>out_mime_type</parameter> output "
26063"parameter, something like the following <function>_WRAP_METHOD()</function> "
26064"macro could be used:"
12841msgstr ""26065msgstr ""
1284226066
12843#. (itstool) path: section/programlisting26067#. (itstool) path: section/programlisting
12844#: C/index-in.docbook:1128626068#: C/index-in.docbook:11286
n12845#, no-wrapn26069#, fuzzy, no-wrap
12846msgid ""26070msgid ""
12847"<code>\n"26071"<code>\n"
12848"_WRAP_METHOD(Glib::RefPtr&lt;Gio::InputStream&gt; read_finish(\n"26072"_WRAP_METHOD(Glib::RefPtr&lt;Gio::InputStream&gt; read_finish(\n"
12849"  const Glib::RefPtr&lt;Gio::AsyncResult&gt;&amp; result,\n"26073"  const Glib::RefPtr&lt;Gio::AsyncResult&gt;&amp; result,\n"
12850"  Glib::ustring&amp; out_mime_type{&gt;&gt;}), gdk_clipboard_read_finish, errth26074"  Glib::ustring&amp; out_mime_type{&gt;&gt;}), gdk_clipboard_read_finish, errth
>row)\n">row)\n"
12851"</code>"26075"</code>"
12852msgstr ""26076msgstr ""
nn26077"\n"
26078"_WRAP_METHOD(Glib::RefPtr&lt;Gio::InputStream&gt; read_finish(\n"
26079"  const Glib::RefPtr&lt;Gio::AsyncResult&gt;&amp; result,\n"
26080"  Glib::ustring&amp; out_mime_type{&gt;&gt;}), gdk_clipboard_read_finish, errth
 >row)\n"
1285326081
12854#. (itstool) path: section/para26082#. (itstool) path: section/para
12855#: C/index-in.docbook:1129126083#: C/index-in.docbook:11291
n12856msgid "The <literal>{&gt;&gt;}</literal> following the <parameter>out_mime_type<n26084#, fuzzy
>/parameter> parameter name indicates that the <phrase role=\"nowrap\">C++</phras 
>e> output parameter should be set from the value returned in the C parameter fro 
>m the C function. <command>gmmproc</command> will generate a declaration of a te 
>mporary variable in which to store the value of the C output parameter and a sta 
>tement that sets the <phrase role=\"nowrap\">C++</phrase> output parameter from  
>the temporary variable. In this case it may be necessary to have an <function>_I 
>NITIALIZATION()</function> describing how to set a <classname>Glib::ustring&amp; 
></classname> from a <classname>const char**</classname> such as the following:" 
26085msgid ""
26086"The <literal>{&gt;&gt;}</literal> following the <parameter>out_mime_type</"
26087"parameter> parameter name indicates that the <phrase role=\"nowrap\">C++</"
26088"phrase> output parameter should be set from the value returned in the C "
26089"parameter from the C function. <command>gmmproc</command> will generate a "
26090"declaration of a temporary variable in which to store the value of the C "
26091"output parameter and a statement that sets the <phrase role=\"nowrap\">C++</"
26092"phrase> output parameter from the temporary variable. In this case it may be "
26093"necessary to have an <function>_INITIALIZATION()</function> describing how "
26094"to set a <classname>Glib::ustring&amp;</classname> from a <classname>const "
26095"char**</classname> such as the following:"
12857msgstr ""26096msgstr ""
nn26097"<function>_WRAP_METHOD()</function> stöder också att sätta C++-"
26098"utdataparametrar från C- utdataparametrar om den omslutna C-funktionen har "
26099"några. Anta till exempel att vi vill omsluta följande C-funktion som "
26100"returnerar ett värde i sin C-utdataparameter <parameter>out_mime_type</"
26101"parameter>: <_:programlisting-1/> För att <command>gmmproc</command> ska "
26102"placera det returnerade värdet i C++-utdataparametern "
26103"<parameter>out_mime_type</parameter> ska något i stil med följande "
26104"<function>_WRAP_METHOD()</function>-makro användas: <_:programlisting-2/> "
26105"Den <literal>{&gt;&gt;}</literal> som följer parameternamnet "
26106"<parameter>out_mime_type</parameter> indikerar att C++-utdataparametern ska "
26107"ställas in från värdet som returneras i C-parametern från C-funktionen. "
26108"<command>gmmproc</command> kommer att generera en deklaration av en temporär "
26109"variabel i vilken värdet av C-utdataparametern och en sats som sätter C++-"
26110"utdataparametern från temporärvariabeln. I detta fall kan det vara "
26111"nödvändigt att ha en <function>_INITIALIZATION()</function> som beskriver "
26112"hur en <classname>Glib::ustring&amp;</classname> ska sättas från en "
26113"<classname>const char**</classname> som i det följande: <_:programlisting-3/>"
1285826114
12859#. (itstool) path: section/programlisting26115#. (itstool) path: section/programlisting
12860#: C/index-in.docbook:1130126116#: C/index-in.docbook:11301
n12861#, no-wrapn26117#, fuzzy, no-wrap
26118#| msgid ""
26119#| "\n"
26120#| "_INITIALIZATION(`Glib::ustring&amp;',`const char*',`$3 = Glib::convert_const
 >_gchar_ptr_to_ustring($4)')\n"
12862msgid ""26121msgid ""
12863"<code>\n"26122"<code>\n"
12864"_INITIALIZATION(`Glib::ustring&amp;',`const char*',`$3 = Glib::convert_const_gc26123"_INITIALIZATION(`Glib::ustring&amp;',`const char*',`$3 = Glib::convert_const_gc
>har_ptr_to_ustring($4)')\n">har_ptr_to_ustring($4)')\n"
12865"</code>"26124"</code>"
12866msgstr ""26125msgstr ""
nn26126"\n"
26127"_INITIALIZATION(`Glib::ustring&amp;',`const char*',`$3 = Glib::convert_const_gc
 >har_ptr_to_ustring($4)')\n"
1286726128
12868#. (itstool) path: section/title26129#. (itstool) path: section/title
12869#: C/index-in.docbook:1130726130#: C/index-in.docbook:11307
nn26131#, fuzzy
12870msgid "String Parameter Processing"26132msgid "String Parameter Processing"
n12871msgstr ""n26133msgstr "Parameterbearbetning av strängar"
1287226134
12873#. (itstool) path: section/para26135#. (itstool) path: section/para
12874#: C/index-in.docbook:1130926136#: C/index-in.docbook:11309
n12875msgid "A string-valued input parameter in a <phrase role=\"nowrap\">C++</phrase>n26137#, fuzzy
> method is usually a <type>const Glib::ustring&amp;</type> or a <type>const std: 
>:string&amp;</type>. In C code it's a <type>const gchar*</type>. When an empty s 
>tring is converted to <type>const gchar*</type>, it can be converted either to < 
>literal>nullptr</literal> or to a pointer to an empty string (with <methodname>c 
>_str()</methodname>). Some parameters in some C functions accept a <literal>null 
>ptr</literal>, and interpret it in a special way. Other parameters must not be < 
>literal>nullptr</literal>." 
26138msgid ""
26139"A string-valued input parameter in a <phrase role=\"nowrap\">C++</phrase> "
26140"method is usually a <type>const Glib::ustring&amp;</type> or a <type>const "
26141"std::string&amp;</type>. In C code it's a <type>const gchar*</type>. When an "
26142"empty string is converted to <type>const gchar*</type>, it can be converted "
26143"either to <literal>nullptr</literal> or to a pointer to an empty string "
26144"(with <methodname>c_str()</methodname>). Some parameters in some C functions "
26145"accept a <literal>nullptr</literal>, and interpret it in a special way. "
26146"Other parameters must not be <literal>nullptr</literal>."
12876msgstr ""26147msgstr ""
nn26148"En strängvärd indataparameter i en C++-metod är vanligen en <type>const "
26149"Glib::ustring&amp;</type> eller en <type>const std::string&amp;</type>. I C-"
26150"kod är det en <type>const gchar*</type>. När en tom sträng konverteras till "
26151"<type>const gchar*</type> kan den konverteras antingen till "
26152"<literal>nullptr</literal> eller till en pekare till en tom sträng (med "
26153"<methodname>c_str()</methodname>). Några parametrar i vissa C-funktioner "
26154"accepterar en <literal>nullptr</literal> och tolkar den på ett speciellt "
26155"sätt. Andra parametrar får inte vara <literal>nullptr</literal>."
1287726156
12878#. (itstool) path: listitem/para26157#. (itstool) path: listitem/para
12879#: C/index-in.docbook:1132226158#: C/index-in.docbook:11322
nn26159#, fuzzy
26160msgid ""
12880msgid "for mandatory parameters (with or without default values): empty string t26161"for mandatory parameters (with or without default values): empty string to "
>empty string," 
26162"empty string,"
12881msgstr ""26163msgstr ""
nn26164"för obligatoriska parametrar (med eller utan standardvärden): tom sträng "
26165"till tom sträng,"
1288226166
12883#. (itstool) path: listitem/para26167#. (itstool) path: listitem/para
12884#: C/index-in.docbook:1132426168#: C/index-in.docbook:11324
nn26169#, fuzzy
26170msgid ""
12885msgid "for optional parameters (with appended <literal>{?}</literal>): empty str26171"for optional parameters (with appended <literal>{?}</literal>): empty string "
>ing to <literal>nullptr</literal>." 
26172"to <literal>nullptr</literal>."
12886msgstr ""26173msgstr ""
nn26174"för valfria parametrar (med tillagd <literal>{?}</literal>): tom sträng till "
26175"<literal>nullptr</literal>."
1288726176
12888#. (itstool) path: section/para26177#. (itstool) path: section/para
12889#: C/index-in.docbook:1131826178#: C/index-in.docbook:11318
n12890msgid "The default conversion in <function>_WRAP_METHOD()</function> and similarn26179#, fuzzy
> macros is <_:itemizedlist-1/> If the default conversion is not the best convers 
>ion, append <literal>{NULL}</literal> to a mandatory parameter or <literal>{?!NU 
>LL}</literal> to an optional parameter (<literal>!NULL</literal> = not <literal> 
>NULL</literal>). If you append both a C parameter name and <literal>NULL</litera 
>l>, separate them with a space: <literal>{c_param_name NULL}</literal>." 
26180msgid ""
26181"The default conversion in <function>_WRAP_METHOD()</function> and similar "
26182"macros is <_:itemizedlist-1/> If the default conversion is not the best "
26183"conversion, append <literal>{NULL}</literal> to a mandatory parameter or "
26184"<literal>{?!NULL}</literal> to an optional parameter (<literal>!NULL</"
26185"literal> = not <literal>NULL</literal>). If you append both a C parameter "
26186"name and <literal>NULL</literal>, separate them with a space: "
26187"<literal>{c_param_name NULL}</literal>."
12891msgstr ""26188msgstr ""
nn26189"Standardkonverteringen i <function>_WRAP_METHOD()</function> och liknande "
26190"makron är <_:itemizedlist-1/> Om standardkonverteringen inte är den bästa "
26191"konverteringen lägger du till <literal>{NULL}</literal> till en obligatorisk "
26192"parameter eller <literal>{?!NULL}</literal> till en valfri parameter "
26193"(<literal>!NULL</literal> = not <literal>NULL</literal>). Om du lägger till "
26194"både ett C-parameternamn och <literal>NULL</literal> separerar du dem med "
26195"ett blanksteg: <literal>{c_param_name NULL}</literal>."
1289226196
12893#. (itstool) path: section/title26197#. (itstool) path: section/title
12894#: C/index-in.docbook:1133826198#: C/index-in.docbook:11338
12895msgid "Basic Types"26199msgid "Basic Types"
n12896msgstr ""n26200msgstr "Grundläggande typer"
1289726201
12898#. (itstool) path: section/para26202#. (itstool) path: section/para
12899#: C/index-in.docbook:1133926203#: C/index-in.docbook:11339
n12900msgid "Some of the basic types that are used in C APIs have better alternatives n26204#, fuzzy
>in <phrase role=\"nowrap\">C++</phrase>. For example, there's no need for a <typ 
>e>gboolean</type> type since <phrase role=\"nowrap\">C++</phrase> has <type>bool 
></type>. The following list shows some commonly-used types in C APIs and what yo 
>u might convert them to in a <phrase role=\"nowrap\">C++</phrase> wrapper librar 
>y." 
26205#| msgid ""
26206#| "Some of the basic types that are used in C APIs have better alternatives "
26207#| "in C++. For example, there's no need for a <type>gboolean</type> type "
26208#| "since C++ has <type>bool</type>. The following list shows some commonly-"
26209#| "used types in C APIs and what you might convert them to in a C++ wrapper "
26210#| "library."
26211msgid ""
26212"Some of the basic types that are used in C APIs have better alternatives in "
26213"<phrase role=\"nowrap\">C++</phrase>. For example, there's no need for a "
26214"<type>gboolean</type> type since <phrase role=\"nowrap\">C++</phrase> has "
26215"<type>bool</type>. The following list shows some commonly-used types in C "
26216"APIs and what you might convert them to in a <phrase role=\"nowrap\">C++</"
26217"phrase> wrapper library."
12901msgstr ""26218msgstr ""
nn26219"Vissa av de grundläggande typerna som används i C-API:er har bättre "
26220"alternativ i C++. Exempelvis finns inget behov av en <type>gboolean</type>-"
26221"typ eftersom C++ har <type>bool</type>. Följande lista visar några vanligt "
26222"använda typer i C-API:er och vad du kanske konverterar dem till i ett C++-"
26223"omslagsbibliotek."
1290226224
12903#. (itstool) path: segmentedlist/segtitle26225#. (itstool) path: segmentedlist/segtitle
12904#: C/index-in.docbook:1134626226#: C/index-in.docbook:11346
12905msgid "C type"26227msgid "C type"
n12906msgstr ""n26228msgstr "C-typ"
1290726229
12908#. (itstool) path: segmentedlist/segtitle26230#. (itstool) path: segmentedlist/segtitle
12909#: C/index-in.docbook:1134726231#: C/index-in.docbook:11347
12910msgid "C++ type"26232msgid "C++ type"
n12911msgstr ""n26233msgstr "C++-typ"
1291226234
12913#. (itstool) path: seglistitem/seg26235#. (itstool) path: seglistitem/seg
12914#: C/index-in.docbook:1134826236#: C/index-in.docbook:11348
12915msgid "<type>gboolean</type>"26237msgid "<type>gboolean</type>"
n12916msgstr ""n26238msgstr "<type>gboolean</type>"
1291726239
12918#. (itstool) path: seglistitem/seg26240#. (itstool) path: seglistitem/seg
12919#: C/index-in.docbook:1134826241#: C/index-in.docbook:11348
12920msgid "<type>bool</type>"26242msgid "<type>bool</type>"
n12921msgstr ""n26243msgstr "<type>bool</type>"
1292226244
12923#. (itstool) path: seglistitem/seg26245#. (itstool) path: seglistitem/seg
12924#: C/index-in.docbook:1134926246#: C/index-in.docbook:11349
12925msgid "<type>gint</type>"26247msgid "<type>gint</type>"
n12926msgstr ""n26248msgstr "<type>gint</type>"
1292726249
12928#. (itstool) path: seglistitem/seg26250#. (itstool) path: seglistitem/seg
12929#: C/index-in.docbook:1134926251#: C/index-in.docbook:11349
12930msgid "<type>int</type>"26252msgid "<type>int</type>"
n12931msgstr ""n26253msgstr "<type>int</type>"
1293226254
12933#. (itstool) path: seglistitem/seg26255#. (itstool) path: seglistitem/seg
12934#: C/index-in.docbook:1135026256#: C/index-in.docbook:11350
n12935#: C/index-in.docbook:11350n
12936msgid "<type>guint</type>"26257msgid "<type>guint</type>"
n12937msgstr ""n26258msgstr "<type>guint</type>"
1293826259
12939#. (itstool) path: seglistitem/seg26260#. (itstool) path: seglistitem/seg
12940#: C/index-in.docbook:1135126261#: C/index-in.docbook:11351
12941msgid "<type>gdouble</type>"26262msgid "<type>gdouble</type>"
n12942msgstr ""n26263msgstr "<type>gdouble</type>"
1294326264
12944#. (itstool) path: seglistitem/seg26265#. (itstool) path: seglistitem/seg
12945#: C/index-in.docbook:1135126266#: C/index-in.docbook:11351
12946msgid "<type>double</type>"26267msgid "<type>double</type>"
n12947msgstr ""n26268msgstr "<type>double</type>"
1294826269
12949#. (itstool) path: seglistitem/seg26270#. (itstool) path: seglistitem/seg
12950#: C/index-in.docbook:1135226271#: C/index-in.docbook:11352
n12951#: C/index-in.docbook:11352n
12952msgid "<type>gunichar</type>"26272msgid "<type>gunichar</type>"
n12953msgstr ""n26273msgstr "<type>gunichar</type>"
1295426274
12955#. (itstool) path: seglistitem/seg26275#. (itstool) path: seglistitem/seg
12956#: C/index-in.docbook:1135326276#: C/index-in.docbook:11353
12957msgid "<type>gchar*</type>"26277msgid "<type>gchar*</type>"
n12958msgstr ""n26278msgstr "<type>gchar*</type>"
1295926279
12960#. (itstool) path: seglistitem/seg26280#. (itstool) path: seglistitem/seg
12961#: C/index-in.docbook:1135326281#: C/index-in.docbook:11353
nn26282msgid ""
12962msgid "<classname>Glib::ustring</classname> (or <classname>std::string</classnam26283"<classname>Glib::ustring</classname> (or <classname>std::string</classname> "
>e> for filenames)" 
26284"for filenames)"
12963msgstr ""26285msgstr ""
nn26286"<classname>Glib::ustring</classname> (eller <classname>std::string</"
26287"classname> för filnamn)"
1296426288
12965#. (itstool) path: section/title26289#. (itstool) path: section/title
12966#: C/index-in.docbook:1135926290#: C/index-in.docbook:11359
12967msgid "Hand-coded source files"26291msgid "Hand-coded source files"
n12968msgstr ""n26292msgstr "Handkodade källkodsfiler"
1296926293
12970#. (itstool) path: section/para26294#. (itstool) path: section/para
12971#: C/index-in.docbook:1136126295#: C/index-in.docbook:11361
n12972msgid "You might want to include additional source files that will not be generan26296#, fuzzy
>ted by <command>gmmproc</command> from <filename>.hg</filename> and <filename>.c 
>cg</filename> files. You can simply place these in your <filename>libsomething/l 
>ibsomethingmm</filename> directory and mention them in the <filename>meson.build 
></filename> in the <varname>extra_h_files</varname> and <varname>extra_cc_files< 
>/varname> variables." 
26297msgid ""
26298"You might want to include additional source files that will not be generated "
26299"by <command>gmmproc</command> from <filename>.hg</filename> and <filename>."
26300"ccg</filename> files. You can simply place these in your "
26301"<filename>libsomething/libsomethingmm</filename> directory and mention them "
26302"in the <filename>meson.build</filename> in the <varname>extra_h_files</"
26303"varname> and <varname>extra_cc_files</varname> variables."
12973msgstr ""26304msgstr ""
nn26305"Du kan vilja inkludera ytterligare källkodsfiler som inte kommer genereras "
26306"av <command>gmmproc</command> från <filename>.hg</filename>- och <filename>."
26307"ccg</filename>-filer. Du kan helt enkelt placera dessa i din katalog "
26308"<filename>libsomething/libsomethingmm</filename> och nämna dem i "
26309"<filename>meson.build</filename> i variablerna <varname>extra_h_files</"
26310"varname> och <varname>extra_cc_files</varname>."
1297426311
12975#. (itstool) path: section/title26312#. (itstool) path: section/title
12976#: C/index-in.docbook:1137126313#: C/index-in.docbook:11371
12977msgid "Initialization"26314msgid "Initialization"
n12978msgstr ""n26315msgstr "Initiering"
1297926316
12980#. (itstool) path: section/para26317#. (itstool) path: section/para
12981#: C/index-in.docbook:1137326318#: C/index-in.docbook:11373
n12982msgid "Your library must be initialized before it can be used, to register the nn26319#, fuzzy
>ew types that it makes available. Also, the C library that you are wrapping migh 
>t have its own initialization function that you should call. You can do this in  
>an <function>init()</function> function that you can place in hand-coded <filena 
>me>init.h</filename> and <filename>init.cc</filename> files. This function shoul 
>d initialize your dependencies (such as the C function, and <application>gtkmm</ 
>application>) and call your generated <function>wrap_init()</function> function. 
> For instance:" 
26320msgid ""
26321"Your library must be initialized before it can be used, to register the new "
26322"types that it makes available. Also, the C library that you are wrapping "
26323"might have its own initialization function that you should call. You can do "
26324"this in an <function>init()</function> function that you can place in hand-"
26325"coded <filename>init.h</filename> and <filename>init.cc</filename> files. "
26326"This function should initialize your dependencies (such as the C function, "
26327"and <application>gtkmm</application>) and call your generated "
26328"<function>wrap_init()</function> function. For instance:"
12983msgstr ""26329msgstr ""
nn26330"Ditt bibliotek måste initieras innan det kan användas för att registrera de "
26331"nya typer som det gör tillgängligt. C-biblioteket som du omsluter kan också "
26332"ha sin egen initieringsfunktion som du ska anropa. Du kan göra detta i en "
26333"<function>init()</function>-funktion som du kan placera i handkodade "
26334"<filename>init.h</filename>- och <filename>init.cc</filename>-filer. Denna "
26335"funktion ska initiera dina beroenden (som C-funktionen och "
26336"<application>gtkmm</application>) och anropa din genererade "
26337"<function>wrap_init()</function>-funktion. Till exempel:"
1298426338
12985#. (itstool) path: section/programlisting26339#. (itstool) path: section/programlisting
12986#: C/index-in.docbook:1138126340#: C/index-in.docbook:11381
n12987#, no-wrapn26341#, fuzzy, no-wrap
12988msgid ""26342msgid ""
12989"<code>void init()\n"26343"<code>void init()\n"
12990"{\n"26344"{\n"
12991"  Gtk::init_gtkmm_internals(); //Sets up the g type system and the Glib::wrap()26345"  Gtk::init_gtkmm_internals(); //Sets up the g type system and the Glib::wrap()
> table.\n"> table.\n"
12992"  wrap_init(); //Tells the Glib::wrap() table about the libsomethingmm classes.26346"  wrap_init(); //Tells the Glib::wrap() table about the libsomethingmm classes.
>\n">\n"
12993"}\n"26347"}\n"
12994"</code>"26348"</code>"
12995msgstr ""26349msgstr ""
nn26350"\n"
26351"void init()\n"
26352"{\n"
26353"  Gtk::init_gtkmm_internals(); //Konfigurerar g type-systemet och Glib::wrap()-
 >tabellen.\n"
26354"  wrap_init(); //Säger till Glib::wrap()-tabellen om libsomethingmm-klasserna.\
 >n"
26355"}\n"
1299626356
12997#. (itstool) path: section/para26357#. (itstool) path: section/para
12998#: C/index-in.docbook:1138726358#: C/index-in.docbook:11387
n12999msgid "The implementation of the <function>wrap_init()</function> method in <filn26359#, fuzzy
>ename>wrap_init.cc</filename> is generated by <filename>generate_wrap_init.pl</f 
>ilename>, but the declaration in <filename>wrap_init.h</filename> is hand-coded, 
> so you will need to adjust <filename>wrap_init.h</filename> so that the <functi 
>on>wrap_init()</function> function appears in the correct <phrase role=\"nowrap\ 
>">C++</phrase> namespace." 
26360msgid ""
26361"The implementation of the <function>wrap_init()</function> method in "
26362"<filename>wrap_init.cc</filename> is generated by "
26363"<filename>generate_wrap_init.pl</filename>, but the declaration in "
26364"<filename>wrap_init.h</filename> is hand-coded, so you will need to adjust "
26365"<filename>wrap_init.h</filename> so that the <function>wrap_init()</"
26366"function> function appears in the correct <phrase role=\"nowrap\">C++</"
26367"phrase> namespace."
13000msgstr ""26368msgstr ""
nn26369"Implementationen av <function>wrap_init()</function>-metoden i "
26370"<filename>wrap_init.cc</filename> genereras av <filename>generate_wrap_init."
26371"pl</filename>, men deklarationen i <filename>wrap_init.h</filename> är "
26372"handkodad, så du kommer behöva justera <filename>wrap_init.h</filename> så "
26373"att <function>wrap_init()</function>-funktion dyker upp i rätt C++-namnrymd."
1300126374
13002#. (itstool) path: section/title26375#. (itstool) path: section/title
13003#: C/index-in.docbook:1139626376#: C/index-in.docbook:11396
13004msgid "Problems in the C API."26377msgid "Problems in the C API."
n13005msgstr ""n26378msgstr "Problem i C-API:t."
1300626379
13007#. (itstool) path: section/para26380#. (itstool) path: section/para
13008#: C/index-in.docbook:1139826381#: C/index-in.docbook:11398
n13009msgid "You are likely to encounter some problems in the library that you are wran26382#, fuzzy
>pping, particularly if it is a new project. Here are some common problems, with  
>solutions." 
26383msgid ""
26384"You are likely to encounter some problems in the library that you are "
26385"wrapping, particularly if it is a new project. Here are some common "
26386"problems, with solutions."
13010msgstr ""26387msgstr ""
nn26388"Du kommer troligen stöta på några problem i biblioteket som du omsluter, "
26389"särskilt om det är ett nytt projekt. Här är några vanliga problem, med "
26390"lösning."
1301126391
13012#. (itstool) path: section/title26392#. (itstool) path: section/title
13013#: C/index-in.docbook:1140026393#: C/index-in.docbook:11400
nn26394#, fuzzy
13014msgid "Unable to predeclare structs"26395msgid "Unable to predeclare structs"
n13015msgstr ""n26396msgstr "Kan inte fördeklarera struct"
1301626397
13017#. (itstool) path: section/para26398#. (itstool) path: section/para
13018#: C/index-in.docbook:1140226399#: C/index-in.docbook:11402
nn26400#, fuzzy
13019msgid "By convention, structs are declared in glib/GTK-style headers like so:"26401msgid "By convention, structs are declared in glib/GTK-style headers like so:"
n13020msgstr ""n26402msgstr "Enligt sedvänja deklareras structar i huvuden av glib/GTK-stil så här:"
1302126403
13022#. (itstool) path: section/programlisting26404#. (itstool) path: section/programlisting
13023#: C/index-in.docbook:1140326405#: C/index-in.docbook:11403
n13024#, no-wrapn26406#, fuzzy, no-wrap
13025msgid ""26407msgid ""
13026"<code>typedef struct _ExampleWidget ExampleWidget;\n"26408"<code>typedef struct _ExampleWidget ExampleWidget;\n"
13027"\n"26409"\n"
13028"struct _ExampleWidget\n"26410"struct _ExampleWidget\n"
13029"{\n"26411"{\n"
13030"  ...\n"26412"  ...\n"
13031"};\n"26413"};\n"
13032"</code>"26414"</code>"
13033msgstr ""26415msgstr ""
nn26416"\n"
26417"typedef struct _ExampleWidget ExampleWidget;\n"
26418"\n"
26419"struct _ExampleWidget\n"
26420"{\n"
26421"  ...\n"
26422"};\n"
1303426423
13035#. (itstool) path: section/para26424#. (itstool) path: section/para
13036#: C/index-in.docbook:1141026425#: C/index-in.docbook:11410
n13037msgid "The extra typedef allows the struct to be used in a header without includn26426#, fuzzy
>ing its full definition, simply by predeclaring it, by repeating that typedef. T 
>his means that you don't have to include the C library's header in your <phrase  
>role=\"nowrap\">C++</phrase> header, thus keeping it out of your public API. <co 
>mmand>gmmproc</command> assumes that this technique was used, so you will see co 
>mpiler errors if that is not the case." 
26427msgid ""
26428"The extra typedef allows the struct to be used in a header without including "
26429"its full definition, simply by predeclaring it, by repeating that typedef. "
26430"This means that you don't have to include the C library's header in your "
26431"<phrase role=\"nowrap\">C++</phrase> header, thus keeping it out of your "
26432"public API. <command>gmmproc</command> assumes that this technique was used, "
26433"so you will see compiler errors if that is not the case."
13038msgstr ""26434msgstr ""
nn26435"Denna extra typedef låter structen användas i ett huvud utan att inkludera "
26436"dess fullständiga definition genom att helt enkelt fördeklarera den, genom "
26437"att repetera denna typedef. Detta betyder att du inte behöver inkludera C-"
26438"bibliotekets header i din C++-header, och därmed hålla den utanför ditt "
26439"publika API. <command>gmmproc</command> antar att denna teknik användes, så "
26440"du kommer se kompileringsfel om så inte är fallet."
1303926441
13040#. (itstool) path: section/para26442#. (itstool) path: section/para
13041#: C/index-in.docbook:1141526443#: C/index-in.docbook:11415
nn26444#, fuzzy
26445#| msgid "The menu looks like this:"
13042msgid "This compiler error might look like this:"26446msgid "This compiler error might look like this:"
n13043msgstr ""n26447msgstr "Menyn ser ut så här:"
1304426448
13045#. (itstool) path: section/programlisting26449#. (itstool) path: section/programlisting
13046#: C/index-in.docbook:1141726450#: C/index-in.docbook:11417
n13047#, no-wrapn26451#, fuzzy, no-wrap
26452#| msgid ""
26453#| "\n"
26454#| "example-widget.h:56: error: using typedef-name 'ExampleWidget' after 'struct
 >'\n"
26455#| "../../libexample/libexamplemm/example-widget.h:34: error: 'ExampleWidget' ha
 >s a previous declaration here\n"
26456#| "make[4]: *** [example-widget.lo] Error 1\n"
13048msgid ""26457msgid ""
13049"<code>example-widget.h:56: error: using typedef-name 'ExampleWidget' after 'str26458"<code>example-widget.h:56: error: using typedef-name 'ExampleWidget' after 'str
>uct'\n">uct'\n"
13050"../../libexample/libexamplemm/example-widget.h:34: error: 'ExampleWidget' has a26459"../../libexample/libexamplemm/example-widget.h:34: error: 'ExampleWidget' has a
> previous declaration here\n"> previous declaration here\n"
13051"make[4]: *** [example-widget.lo] Error 1\n"26460"make[4]: *** [example-widget.lo] Error 1\n"
13052"</code>"26461"</code>"
13053msgstr ""26462msgstr ""
nn26463"\n"
26464"example-widget.h:56: error: using typedef-name 'ExampleWidget' after 'struct'\n
 >"
26465"../../libexample/libexamplemm/example-widget.h:34: error: 'ExampleWidget' has a
 > previous declaration here\n"
26466"make[4]: *** [example-widget.lo] Error 1\n"
1305426467
13055#. (itstool) path: section/para26468#. (itstool) path: section/para
13056#: C/index-in.docbook:1142126469#: C/index-in.docbook:11421
13057msgid "or this:"26470msgid "or this:"
13058msgstr ""26471msgstr ""
1305926472
13060#. (itstool) path: section/programlisting26473#. (itstool) path: section/programlisting
13061#: C/index-in.docbook:1142226474#: C/index-in.docbook:11422
n13062#, no-wrapn26475#, fuzzy, no-wrap
26476#| msgid ""
26477#| "\n"
26478#| "example-widget.h:60: error: '_ExampleWidget ExampleWidget' redeclared as dif
 >ferent kind of symbol\n"
26479#| "../../libexample/libexamplemm/example-widget.h:34: error: previous declarati
 >on of 'typedef struct _ExampleWidget ExampleWidget'\n"
13063msgid ""26480msgid ""
13064"<code>example-widget.h:60: error: '_ExampleWidget ExampleWidget' redeclared as 26481"<code>example-widget.h:60: error: '_ExampleWidget ExampleWidget' redeclared as 
>different kind of symbol\n">different kind of symbol\n"
13065"../../libexample/libexamplemm/example-widget.h:34: error: previous declaration 26482"../../libexample/libexamplemm/example-widget.h:34: error: previous declaration 
>of 'typedef struct _ExampleWidget ExampleWidget'\n">of 'typedef struct _ExampleWidget ExampleWidget'\n"
13066"</code>"26483"</code>"
13067msgstr ""26484msgstr ""
nn26485"\n"
26486"example-widget.h:60: error: '_ExampleWidget ExampleWidget' redeclared as differ
 >ent kind of symbol\n"
26487"../../libexample/libexamplemm/example-widget.h:34: error: previous declaration 
 >of 'typedef struct _ExampleWidget ExampleWidget'\n"
1306826488
13069#. (itstool) path: section/para26489#. (itstool) path: section/para
13070#: C/index-in.docbook:1142526490#: C/index-in.docbook:11425
nn26491#, fuzzy
26492msgid ""
13071msgid "This is easy to correct in the C library, so do send a patch to the relev26493"This is easy to correct in the C library, so do send a patch to the relevant "
>ant maintainer." 
26494"maintainer."
13072msgstr ""26495msgstr ""
nn26496"Detta är lätt att rätta till i C-biblioteket, så skicka en programfix till "
26497"rätt utvecklare."
1307326498
13074#. (itstool) path: section/title26499#. (itstool) path: section/title
13075#: C/index-in.docbook:1142926500#: C/index-in.docbook:11429
13076msgid "Lack of properties"26501msgid "Lack of properties"
n13077msgstr ""n26502msgstr "Avsaknad av egenskaper"
1307826503
13079#. (itstool) path: section/para26504#. (itstool) path: section/para
13080#: C/index-in.docbook:1143126505#: C/index-in.docbook:11431
n13081msgid "By convention, glib/GTK-style objects have <function>*_new()</function> fn26506#, fuzzy
>unctions, such as <function>example_widget_new()</function> that do nothing more 
> than call <function>g_object_new()</function> and return the result. The input  
>parameters are supplied to <function>g_object_new()</function> along with the na 
>mes of the properties for which they are values. For instance," 
26507msgid ""
26508"By convention, glib/GTK-style objects have <function>*_new()</function> "
26509"functions, such as <function>example_widget_new()</function> that do nothing "
26510"more than call <function>g_object_new()</function> and return the result. "
26511"The input parameters are supplied to <function>g_object_new()</function> "
26512"along with the names of the properties for which they are values. For "
26513"instance,"
13082msgstr ""26514msgstr ""
nn26515"Enligt konvention har objekt av glib/GTK-stil <function>*_new()</function>-"
26516"funktioner, som <function>example_widget_new()</function> som inte gör något "
26517"mera än att anropa <function>g_object_new()</function> och returnera "
26518"resultatet. Indataparametrarna tillhandahålls till <function>g_object_new()</"
26519"function> tillsammans med namnen på egenskaperna för vilka de är värden. "
26520"Till exempel,"
1308326521
13084#. (itstool) path: section/programlisting26522#. (itstool) path: section/programlisting
13085#: C/index-in.docbook:1143726523#: C/index-in.docbook:11437
n13086#, no-wrapn26524#, fuzzy, no-wrap
13087msgid ""26525msgid ""
13088"<code>GtkWidget* example_widget_new(int something, const char* thing)\n"26526"<code>GtkWidget* example_widget_new(int something, const char* thing)\n"
13089"{\n"26527"{\n"
13090"        return g_object_new (EXAMPLE_TYPE_WIDGET, \"something\", something, \"t26528"        return g_object_new (EXAMPLE_TYPE_WIDGET, \"something\", something, \"t
>hing\", thing, NULL);\n">hing\", thing, NULL);\n"
13091"}\n"26529"}\n"
13092"</code>"26530"</code>"
13093msgstr ""26531msgstr ""
nn26532"\n"
26533"GtkWidget* example_widget_new(int something, const char* thing)\n"
26534"{\n"
26535"        return g_object_new (EXAMPLE_TYPE_WIDGET, \"something\", something, \"t
 >hing\", thing, NULL);\n"
26536"}\n"
1309426537
13095#. (itstool) path: section/para26538#. (itstool) path: section/para
13096#: C/index-in.docbook:1144226539#: C/index-in.docbook:11442
n13097msgid "This allows language bindings to implement their own equivalents (such asn26540#, fuzzy
> <phrase role=\"nowrap\">C++</phrase> constructors), without using the <function 
>>*_new()</function> function. This is often necessary so that they can actually  
>instantiate a derived GType, to add their own hooks for signal handlers and vfun 
>cs." 
26541msgid ""
26542"This allows language bindings to implement their own equivalents (such as "
26543"<phrase role=\"nowrap\">C++</phrase> constructors), without using the "
26544"<function>*_new()</function> function. This is often necessary so that they "
26545"can actually instantiate a derived GType, to add their own hooks for signal "
26546"handlers and vfuncs."
13098msgstr ""26547msgstr ""
nn26548"Detta låter språkbindningar implementera sina egna motsvarigheter (som C++-"
26549"konstruktorer), utan att använda <function>*_new()</function>-funktionen. "
26550"Detta är ofta nödvändigt så att de faktiskt kan instansiera en härledd "
26551"GType, för att lägga till deras egna krokar för signalhanterare och vfunc-"
26552"funktioner."
1309926553
13100#. (itstool) path: section/para26554#. (itstool) path: section/para
13101#: C/index-in.docbook:1144626555#: C/index-in.docbook:11446
n13102msgid "At the least, the <function>_new()</function> function should not use anyn26556#, fuzzy
> private API (functions that are only in a .c file). Even when there are no func 
>tions, we can sometimes reimplement 2 or 3 lines of code in a <function>_new()</ 
>function> function as long as those lines of code use API that is available to u 
>s." 
26557msgid ""
26558"At the least, the <function>_new()</function> function should not use any "
26559"private API (functions that are only in a .c file). Even when there are no "
26560"functions, we can sometimes reimplement 2 or 3 lines of code in a "
26561"<function>_new()</function> function as long as those lines of code use API "
26562"that is available to us."
13103msgstr ""26563msgstr ""
nn26564"Åtminstone ska <function>_new()</function>-funktionen inte använda något "
26565"privat API (funktioner som bara finns i en .c-fil). Även då det inte finns "
26566"några funktioner kan vi ibland implementera om 2 eller 3 rader kod i en "
26567"<function>_new()</function>-funktion så länge som dessa rader kod använder "
26568"API som är tillgängliga för oss."
1310426569
13105#. (itstool) path: section/para26570#. (itstool) path: section/para
13106#: C/index-in.docbook:1145126571#: C/index-in.docbook:11451
n13107msgid "Another workaround is to add a <function>*_construct()</function> function26572#, fuzzy
>n that the <phrase role=\"nowrap\">C++</phrase> constructor can call after insta 
>ntiating its own type. For instance," 
26573msgid ""
26574"Another workaround is to add a <function>*_construct()</function> function "
26575"that the <phrase role=\"nowrap\">C++</phrase> constructor can call after "
26576"instantiating its own type. For instance,"
13108msgstr ""26577msgstr ""
nn26578"En annan lösning är att lägga till en <function>*_construct()</function>-"
26579"funktion som C++-konstruktorn kan anropa efter att ha instansierat sin egen "
26580"typ. Till exempel,"
1310926581
13110#. (itstool) path: section/programlisting26582#. (itstool) path: section/programlisting
13111#: C/index-in.docbook:1145426583#: C/index-in.docbook:11454
n13112#, no-wrapn26584#, fuzzy, no-wrap
13113msgid ""26585msgid ""
13114"<code>GtkWidget* example_widget_new(int something, const char* thing)\n"26586"<code>GtkWidget* example_widget_new(int something, const char* thing)\n"
13115"{\n"26587"{\n"
13116"        ExampleWidget* widget;\n"26588"        ExampleWidget* widget;\n"
13117"        widget = g_object_new (EXAMPLE_TYPE_WIDGET, NULL);\n"26589"        widget = g_object_new (EXAMPLE_TYPE_WIDGET, NULL);\n"
13124"        widget-&gt;priv-&gt;thing = thing;\n"26596"        widget-&gt;priv-&gt;thing = thing;\n"
13125"        do_something(something);\n"26597"        do_something(something);\n"
13126"}\n"26598"}\n"
13127"</code>"26599"</code>"
13128msgstr ""26600msgstr ""
nn26601"\n"
26602"GtkWidget* example_widget_new(int something, const char* thing)\n"
26603"{\n"
26604"        ExampleWidget* widget;\n"
26605"        widget = g_object_new (EXAMPLE_TYPE_WIDGET, NULL);\n"
26606"        example_widget_construct(widget, \"something\", something, \"thing\", t
 >hing);\n"
26607"}\n"
26608"\n"
26609"void example_widget_construct(ExampleWidget* widget, int something, const char*
 > thing)\n"
26610"{\n"
26611"        //Gör saker som använder privat API:\n"
26612"        widget-&gt;priv-&gt;thing = thing;\n"
26613"        do_something(something);\n"
26614"}\n"
1312926615
13130#. (itstool) path: section/para26616#. (itstool) path: section/para
13131#: C/index-in.docbook:1146826617#: C/index-in.docbook:11468
n13132msgid "Adding properties, and ensuring that they interact properly with each othn26618#, fuzzy
>er, is relatively difficult to correct in the C library, but it is possible, so  
>do file a bug and try to send a patch to the relevant maintainer." 
26619msgid ""
26620"Adding properties, and ensuring that they interact properly with each other, "
26621"is relatively difficult to correct in the C library, but it is possible, so "
26622"do file a bug and try to send a patch to the relevant maintainer."
13133msgstr ""26623msgstr ""
nn26624"Att lägga till egenskaper och försäkra sig om att de interagerar korrekt med "
26625"varandra är relativt svårt att rätta till i C-biblioteket, men det är "
26626"möjligt, så skriv en felrapport och försök skicka in en programfix till rätt "
26627"utvecklare."
1313426628
13135#. (itstool) path: section/title26629#. (itstool) path: section/title
13136#: C/index-in.docbook:1147626630#: C/index-in.docbook:11476
13137msgid "Documentation"26631msgid "Documentation"
n13138msgstr ""n26632msgstr "Dokumentation"
1313926633
13140#. (itstool) path: section/para26634#. (itstool) path: section/para
13141#: C/index-in.docbook:1147826635#: C/index-in.docbook:11478
n13142msgid "In general, gtkmm-style projects use Doxygen, which reads specially forman26636#, fuzzy
>tted <phrase role=\"nowrap\">C++</phrase> comments and generates HTML documentat 
>ion. You may write these doxygen comments directly in the header files." 
26637#| msgid ""
26638#| "In general, gtkmm-style projects use Doxygen, which reads specially "
26639#| "formatted C++ comments and generates HTML documentation. You may write "
26640#| "these doxygen comments directly in the header files."
26641msgid ""
26642"In general, gtkmm-style projects use Doxygen, which reads specially "
26643"formatted <phrase role=\"nowrap\">C++</phrase> comments and generates HTML "
26644"documentation. You may write these doxygen comments directly in the header "
26645"files."
13143msgstr ""26646msgstr ""
nn26647"Allmänt använder projekt av gtkmm-stil sig av Doxygen, som läser speciellt "
26648"formaterade C++-kommentarer och genererar HTML-dokumentation. Du kan skriva "
26649"dessa doxygen-kommentarer direkt i header-filerna."
1314426650
13145#. (itstool) path: section/title26651#. (itstool) path: section/title
13146#: C/index-in.docbook:1148126652#: C/index-in.docbook:11481
13147msgid "Reusing C documentation"26653msgid "Reusing C documentation"
n13148msgstr ""n26654msgstr "Återanvända C-dokumentation"
1314926655
13150#. (itstool) path: section/para26656#. (itstool) path: section/para
13151#: C/index-in.docbook:1148326657#: C/index-in.docbook:11483
n13152msgid "You might wish to reuse documentation that exists for the C library that n26658#, fuzzy
>you are wrapping. GTK-style C libraries typically use gtk-doc or gi-docgen and t 
>herefore have source code comments formatted for gtk-doc or gi-docgen and some e 
>xtra documentation in .sgml and .xml files. The docextract_to_xml.py script, fro 
>m glibmm's <filename>tools/defs_gen</filename> directory, can read these files a 
>nd generate an .xml file that <command>gmmproc</command> can use to generate dox 
>ygen comments. <command>gmmproc</command> will even try to transform the documen 
>tation to make it more appropriate for a <phrase role=\"nowrap\">C++</phrase> AP 
>I." 
26659msgid ""
26660"You might wish to reuse documentation that exists for the C library that you "
26661"are wrapping. GTK-style C libraries typically use gtk-doc or gi-docgen and "
26662"therefore have source code comments formatted for gtk-doc or gi-docgen and "
26663"some extra documentation in .sgml and .xml files. The docextract_to_xml.py "
26664"script, from glibmm's <filename>tools/defs_gen</filename> directory, can "
26665"read these files and generate an .xml file that <command>gmmproc</command> "
26666"can use to generate doxygen comments. <command>gmmproc</command> will even "
26667"try to transform the documentation to make it more appropriate for a <phrase "
26668"role=\"nowrap\">C++</phrase> API."
13153msgstr ""26669msgstr ""
nn26670"Du kan vilja återanvända befintlig dokumentation för C-biblioteket som du "
26671"omsluter. C-bibliotek av GTK-stil använder vanligen gtk-doc eller gi-docgen "
26672"och har därför källkodskommentarer formaterade för gtk-doc eller gi-docgen "
26673"och viss extra dokumentation i .sgml- och .xml-filer. Skriptet "
26674"docextract_to_xml.py från glibmm:s <filename>tools/defs_gen</filename>-"
26675"katalog kan läsa dessa filer och generera en .xml-fil som <command>gmmproc</"
26676"command> kan använda för att generera doxygen-kommentarer. <command>gmmproc</"
26677"command> kommer till och med försöka transformera dokumentationen för att "
26678"göra den mer lämplig för ett C++-API."
1315426679
13155#. (itstool) path: section/programlisting26680#. (itstool) path: section/programlisting
13156#: C/index-in.docbook:1149326681#: C/index-in.docbook:11493
n13157#, no-wrapn26682#, fuzzy, no-wrap
26683#| msgid "./docextract_to_xml.py -s ~/checkout/gnome/gtk/gtk/ &gt; gtk_docs.xml\
 >n"
13158msgid ""26684msgid ""
13159"<code>./docextract_to_xml.py -s ~/checkout/gnome/gtk/gtk/ &gt; gtk_docs.xml\n"26685"<code>./docextract_to_xml.py -s ~/checkout/gnome/gtk/gtk/ &gt; gtk_docs.xml\n"
13160"</code>"26686"</code>"
n13161msgstr ""n26687msgstr "./docextract_to_xml.py -s ~/checkout/gnome/gtk/gtk/ &gt; gtk_docs.xml\n"
1316226688
13163#. (itstool) path: section/para26689#. (itstool) path: section/para
13164#: C/index-in.docbook:1149526690#: C/index-in.docbook:11495
n13165msgid "Because this automatic transformation is not always appropriate, you mighn26691#, fuzzy
>t want to provide hand-written text for a particular method. You can do this by  
>copying the XML node for the function from your <filename>something_docs.xml</fi 
>lename> file to the <filename>something_docs_override.xml</filename> file and ch 
>anging the contents. Alternatively you can write your own documentation in the < 
>filename>.hg</filename> file." 
26692msgid ""
26693"Because this automatic transformation is not always appropriate, you might "
26694"want to provide hand-written text for a particular method. You can do this "
26695"by copying the XML node for the function from your <filename>something_docs."
26696"xml</filename> file to the <filename>something_docs_override.xml</filename> "
26697"file and changing the contents. Alternatively you can write your own "
26698"documentation in the <filename>.hg</filename> file."
13166msgstr ""26699msgstr ""
nn26700"Eftersom denna automatiskt transformering inte alltid är lämplig kan du "
26701"vilja tillhandahålla handskriven text för en viss metod. Du kan göra detta "
26702"genom att kopiera XML-noden för funktionen från din fil "
26703"<filename>something_docs.xml</filename> till filen "
26704"<filename>something_docs_override.xml</filename> och ändra innehållet. "
26705"Alternativt kan du skriva din egen dokumentation i <filename>.hg</filename>-"
26706"filen."
1316726707
13168#. (itstool) path: section/title26708#. (itstool) path: section/title
13169#: C/index-in.docbook:1150526709#: C/index-in.docbook:11505
13170msgid "Documentation build structure"26710msgid "Documentation build structure"
n13171msgstr ""n26711msgstr "Byggstruktur för dokumentation"
1317226712
13173#. (itstool) path: section/para26713#. (itstool) path: section/para
13174#: C/index-in.docbook:1150726714#: C/index-in.docbook:11507
n13175msgid "If you copied the skeleton source tree in <application>mm-common</applican26715#, fuzzy
>tion> and substituted the placeholder text, then you will already have suitable  
><filename>meson.build</filename> and <filename>Doxyfile.in</filename> files in t 
>he <filename>doc/reference/</filename> directory. You probably need to modify th 
>e <varname>tag_file_modules</varname> variable in <filename>meson.build</filenam 
>e>, though. With the <application>mm-common</application> build setup, the list  
>of Doxygen input files is not defined in the Doxygen configuration file, but pas 
>sed along from <command>meson/ninja</command> to the standard input of <command> 
>doxygen</command>." 
26716msgid ""
26717"If you copied the skeleton source tree in <application>mm-common</"
26718"application> and substituted the placeholder text, then you will already "
26719"have suitable <filename>meson.build</filename> and <filename>Doxyfile.in</"
26720"filename> files in the <filename>doc/reference/</filename> directory. You "
26721"probably need to modify the <varname>tag_file_modules</varname> variable in "
26722"<filename>meson.build</filename>, though. With the <application>mm-common</"
26723"application> build setup, the list of Doxygen input files is not defined in "
26724"the Doxygen configuration file, but passed along from <command>meson/ninja</"
26725"command> to the standard input of <command>doxygen</command>."
13176msgstr ""26726msgstr ""
nn26727"Om du kopierade skelettkällkodsträdet i <application>mm-common</application> "
26728"och ersatte platshållartexten kommer du troligen redan ha lämpliga "
26729"<filename>meson.build</filename>- och <filename>Doxyfile.in</filename>-filer "
26730"i katalogen <filename>doc/reference/</filename>. Du behöver dock troligen "
26731"ändra variabeln <varname>tag_file_modules</varname> i <filename>meson.build</"
26732"filename>. Med byggkonfigurationen för <application>mm-common</application> "
26733"är listan över Doxygen-indatafiler inte definierad i Doxygen-"
26734"konfigurationsfilen, utan skickas från <command>meson/ninja</command> till "
26735"standard in för <command>doxygen</command>."
1317726736
13178#. (itstool) path: appendix/title26737#. (itstool) path: appendix/title
13179#: C/index-in.docbook:1152326738#: C/index-in.docbook:11523
nn26739#, fuzzy
26740#| msgid "Documentation"
13180msgid "GNU Free Documentation License"26741msgid "GNU Free Documentation License"
n13181msgstr ""n26742msgstr "Dokumentation"
1318226743
13183#. (itstool) path: appendix/para26744#. (itstool) path: appendix/para
13184#: C/index-in.docbook:1152426745#: C/index-in.docbook:11524
n13185msgid "Copyright (C) 2000, 2001, 2002 Free Software Foundation, <link xlink:hrefn26746msgid ""
>=\"https://fsf.org/\">https://fsf.org/</link>. Everyone is permitted to copy and 
> distribute verbatim copies of this license document, but changing it is not all 
>owed." 
26747"Copyright (C) 2000, 2001, 2002 Free Software Foundation, <link xlink:"
26748"href=\"https://fsf.org/\">https://fsf.org/</link>. Everyone is permitted to "
26749"copy and distribute verbatim copies of this license document, but changing "
26750"it is not allowed."
13186msgstr ""26751msgstr ""
1318726752
13188#. (itstool) path: appendix/bridgehead26753#. (itstool) path: appendix/bridgehead
13189#. (itstool) id: index-in.docbook#Preamble26754#. (itstool) id: index-in.docbook#Preamble
13190#: C/index-in.docbook:1153126755#: C/index-in.docbook:11531
13191msgid "0. PREAMBLE"26756msgid "0. PREAMBLE"
13192msgstr ""26757msgstr ""
1319326758
13194#. (itstool) path: appendix/para26759#. (itstool) path: appendix/para
13195#: C/index-in.docbook:1153426760#: C/index-in.docbook:11534
n13196msgid "The purpose of this License is to make a manual, textbook, or other functn26761msgid ""
>ional and useful document \"free\" in the sense of freedom: to assure everyone t 
>he effective freedom to copy and redistribute it, with or without modifying it,  
>either commercially or noncommercially. Secondarily, this License preserves for  
>the author and publisher a way to get credit for their work, while not being con 
>sidered responsible for modifications made by others." 
26762"The purpose of this License is to make a manual, textbook, or other "
26763"functional and useful document \"free\" in the sense of freedom: to assure "
26764"everyone the effective freedom to copy and redistribute it, with or without "
26765"modifying it, either commercially or noncommercially. Secondarily, this "
26766"License preserves for the author and publisher a way to get credit for their "
26767"work, while not being considered responsible for modifications made by "
26768"others."
13197msgstr ""26769msgstr ""
1319826770
13199#. (itstool) path: appendix/para26771#. (itstool) path: appendix/para
13200#: C/index-in.docbook:1154326772#: C/index-in.docbook:11543
n13201msgid "This License is a kind of \"copyleft\", which means that derivative worksn26773msgid ""
> of the document must themselves be free in the same sense. It complements the G 
>NU General Public License, which is a copyleft license designed for free softwar 
>e." 
26774"This License is a kind of \"copyleft\", which means that derivative works of "
26775"the document must themselves be free in the same sense. It complements the "
26776"GNU General Public License, which is a copyleft license designed for free "
26777"software."
13202msgstr ""26778msgstr ""
1320326779
13204#. (itstool) path: appendix/para26780#. (itstool) path: appendix/para
13205#: C/index-in.docbook:1154926781#: C/index-in.docbook:11549
n13206msgid "We have designed this License in order to use it for manuals for free sofn26782msgid ""
>tware, because free software needs free documentation: a free program should com 
>e with manuals providing the same freedoms that the software does. But this Lice 
>nse is not limited to software manuals; it can be used for any textual work, reg 
>ardless of subject matter or whether it is published as a printed book. We recom 
>mend this License principally for works whose purpose is instruction or referenc 
>e." 
26783"We have designed this License in order to use it for manuals for free "
26784"software, because free software needs free documentation: a free program "
26785"should come with manuals providing the same freedoms that the software does. "
26786"But this License is not limited to software manuals; it can be used for any "
26787"textual work, regardless of subject matter or whether it is published as a "
26788"printed book. We recommend this License principally for works whose purpose "
26789"is instruction or reference."
13207msgstr ""26790msgstr ""
1320826791
13209#. (itstool) path: appendix/bridgehead26792#. (itstool) path: appendix/bridgehead
13210#. (itstool) id: index-in.docbook#Definitions26793#. (itstool) id: index-in.docbook#Definitions
13211#: C/index-in.docbook:1155726794#: C/index-in.docbook:11557
13212msgid "1. APPLICABILITY AND DEFINITIONS"26795msgid "1. APPLICABILITY AND DEFINITIONS"
13213msgstr ""26796msgstr ""
1321426797
13215#. (itstool) path: appendix/para26798#. (itstool) path: appendix/para
13216#: C/index-in.docbook:1156026799#: C/index-in.docbook:11560
n13217msgid "This License applies to any manual or other work, in any medium, that conn26800msgid ""
>tains a notice placed by the copyright holder saying it can be distributed under 
> the terms of this License. Such a notice grants a world-wide, royalty-free lice 
>nse, unlimited in duration, to use that work under the conditions stated herein. 
> The \"Document\", below, refers to any such manual or work. Any member of the p 
>ublic is a licensee, and is addressed as \"you\". You accept the license if you  
>copy, modify or distribute the work in a way requiring permission under copyrigh 
>t law." 
26801"This License applies to any manual or other work, in any medium, that "
26802"contains a notice placed by the copyright holder saying it can be "
26803"distributed under the terms of this License. Such a notice grants a world-"
26804"wide, royalty-free license, unlimited in duration, to use that work under "
26805"the conditions stated herein. The \"Document\", below, refers to any such "
26806"manual or work. Any member of the public is a licensee, and is addressed as "
26807"\"you\". You accept the license if you copy, modify or distribute the work "
26808"in a way requiring permission under copyright law."
13218msgstr ""26809msgstr ""
1321926810
13220#. (itstool) path: appendix/para26811#. (itstool) path: appendix/para
13221#: C/index-in.docbook:1157126812#: C/index-in.docbook:11571
n13222msgid "A \"Modified Version\" of the Document means any work containing the Docun26813msgid ""
>ment or a portion of it, either copied verbatim, or with modifications and/or tr 
>anslated into another language." 
26814"A \"Modified Version\" of the Document means any work containing the "
26815"Document or a portion of it, either copied verbatim, or with modifications "
26816"and/or translated into another language."
13223msgstr ""26817msgstr ""
1322426818
13225#. (itstool) path: appendix/para26819#. (itstool) path: appendix/para
13226#: C/index-in.docbook:1157626820#: C/index-in.docbook:11576
n13227msgid "A \"Secondary Section\" is a named appendix or a front-matter section of n26821msgid ""
>the Document that deals exclusively with the relationship of the publishers or a 
>uthors of the Document to the Document's overall subject (or to related matters) 
> and contains nothing that could fall directly within that overall subject. (Thu 
>s, if the Document is in part a textbook of mathematics, a Secondary Section may 
> not explain any mathematics.) The relationship could be a matter of historical  
>connection with the subject or with related matters, or of legal, commercial, ph 
>ilosophical, ethical or political position regarding them." 
26822"A \"Secondary Section\" is a named appendix or a front-matter section of the "
26823"Document that deals exclusively with the relationship of the publishers or "
26824"authors of the Document to the Document's overall subject (or to related "
26825"matters) and contains nothing that could fall directly within that overall "
26826"subject. (Thus, if the Document is in part a textbook of mathematics, a "
26827"Secondary Section may not explain any mathematics.) The relationship could "
26828"be a matter of historical connection with the subject or with related "
26829"matters, or of legal, commercial, philosophical, ethical or political "
26830"position regarding them."
13228msgstr ""26831msgstr ""
1322926832
13230#. (itstool) path: appendix/para26833#. (itstool) path: appendix/para
13231#: C/index-in.docbook:1158726834#: C/index-in.docbook:11587
n13232msgid "The \"Invariant Sections\" are certain Secondary Sections whose titles arn26835msgid ""
>e designated, as being those of Invariant Sections, in the notice that says that 
> the Document is released under this License. If a section does not fit the abov 
>e definition of Secondary then it is not allowed to be designated as Invariant.  
>The Document may contain zero Invariant Sections. If the Document does not ident 
>ify any Invariant Sections then there are none." 
26836"The \"Invariant Sections\" are certain Secondary Sections whose titles are "
26837"designated, as being those of Invariant Sections, in the notice that says "
26838"that the Document is released under this License. If a section does not fit "
26839"the above definition of Secondary then it is not allowed to be designated as "
26840"Invariant. The Document may contain zero Invariant Sections. If the Document "
26841"does not identify any Invariant Sections then there are none."
13233msgstr ""26842msgstr ""
1323426843
13235#. (itstool) path: appendix/para26844#. (itstool) path: appendix/para
13236#: C/index-in.docbook:1159626845#: C/index-in.docbook:11596
n13237msgid "The \"Cover Texts\" are certain short passages of text that are listed, an26846msgid ""
>s Front-Cover Texts or Back-Cover Texts, in the notice that says that the Docume 
>nt is released under this License. A Front-Cover Text may be at most 5 words, an 
>d a Back-Cover Text may be at most 25 words." 
26847"The \"Cover Texts\" are certain short passages of text that are listed, as "
26848"Front-Cover Texts or Back-Cover Texts, in the notice that says that the "
26849"Document is released under this License. A Front-Cover Text may be at most 5 "
26850"words, and a Back-Cover Text may be at most 25 words."
13238msgstr ""26851msgstr ""
1323926852
13240#. (itstool) path: appendix/para26853#. (itstool) path: appendix/para
13241#: C/index-in.docbook:1160226854#: C/index-in.docbook:11602
n13242msgid "A \"Transparent\" copy of the Document means a machine-readable copy, repn26855msgid ""
>resented in a format whose specification is available to the general public, tha 
>t is suitable for revising the document straightforwardly with generic text edit 
>ors or (for images composed of pixels) generic paint programs or (for drawings)  
>some widely available drawing editor, and that is suitable for input to text for 
>matters or for automatic translation to a variety of formats suitable for input  
>to text formatters. A copy made in an otherwise Transparent file format whose ma 
>rkup, or absence of markup, has been arranged to thwart or discourage subsequent 
> modification by readers is not Transparent. An image format is not Transparent  
>if used for any substantial amount of text. A copy that is not \"Transparent\" i 
>s called \"Opaque\"." 
26856"A \"Transparent\" copy of the Document means a machine-readable copy, "
26857"represented in a format whose specification is available to the general "
26858"public, that is suitable for revising the document straightforwardly with "
26859"generic text editors or (for images composed of pixels) generic paint "
26860"programs or (for drawings) some widely available drawing editor, and that is "
26861"suitable for input to text formatters or for automatic translation to a "
26862"variety of formats suitable for input to text formatters. A copy made in an "
26863"otherwise Transparent file format whose markup, or absence of markup, has "
26864"been arranged to thwart or discourage subsequent modification by readers is "
26865"not Transparent. An image format is not Transparent if used for any "
26866"substantial amount of text. A copy that is not \"Transparent\" is called "
26867"\"Opaque\"."
13243msgstr ""26868msgstr ""
1324426869
13245#. (itstool) path: appendix/para26870#. (itstool) path: appendix/para
13246#: C/index-in.docbook:1161626871#: C/index-in.docbook:11616
n13247msgid "Examples of suitable formats for Transparent copies include plain ASCII wn26872msgid ""
>ithout markup, Texinfo input format, LaTeX input format, SGML or XML using a pub 
>licly available DTD, and standard-conforming simple HTML, PostScript or PDF desi 
>gned for human modification. Examples of transparent image formats include PNG,  
>XCF and JPG. Opaque formats include proprietary formats that can be read and edi 
>ted only by proprietary word processors, SGML or XML for which the DTD and/or pr 
>ocessing tools are not generally available, and the machine-generated HTML, Post 
>Script or PDF produced by some word processors for output purposes only." 
26873"Examples of suitable formats for Transparent copies include plain ASCII "
26874"without markup, Texinfo input format, LaTeX input format, SGML or XML using "
26875"a publicly available DTD, and standard-conforming simple HTML, PostScript or "
26876"PDF designed for human modification. Examples of transparent image formats "
26877"include PNG, XCF and JPG. Opaque formats include proprietary formats that "
26878"can be read and edited only by proprietary word processors, SGML or XML for "
26879"which the DTD and/or processing tools are not generally available, and the "
26880"machine-generated HTML, PostScript or PDF produced by some word processors "
26881"for output purposes only."
13248msgstr ""26882msgstr ""
1324926883
13250#. (itstool) path: appendix/para26884#. (itstool) path: appendix/para
13251#: C/index-in.docbook:1162826885#: C/index-in.docbook:11628
n13252msgid "The \"Title Page\" means, for a printed book, the title page itself, plusn26886msgid ""
> such following pages as are needed to hold, legibly, the material this License  
>requires to appear in the title page. For works in formats which do not have any 
> title page as such, \"Title Page\" means the text near the most prominent appea 
>rance of the work's title, preceding the beginning of the body of the text." 
26887"The \"Title Page\" means, for a printed book, the title page itself, plus "
26888"such following pages as are needed to hold, legibly, the material this "
26889"License requires to appear in the title page. For works in formats which do "
26890"not have any title page as such, \"Title Page\" means the text near the most "
26891"prominent appearance of the work's title, preceding the beginning of the "
26892"body of the text."
13253msgstr ""26893msgstr ""
1325426894
13255#. (itstool) path: appendix/para26895#. (itstool) path: appendix/para
13256#: C/index-in.docbook:1163626896#: C/index-in.docbook:11636
n13257msgid "A section \"Entitled XYZ\" means a named subunit of the Document whose tin26897msgid ""
>tle either is precisely XYZ or contains XYZ in parentheses following text that t 
>ranslates XYZ in another language. (Here XYZ stands for a specific section name  
>mentioned below, such as \"Acknowledgements\", \"Dedications\", \"Endorsements\" 
>, or \"History\".) To \"Preserve the Title\" of such a section when you modify t 
>he Document means that it remains a section \"Entitled XYZ\" according to this d 
>efinition." 
26898"A section \"Entitled XYZ\" means a named subunit of the Document whose title "
26899"either is precisely XYZ or contains XYZ in parentheses following text that "
26900"translates XYZ in another language. (Here XYZ stands for a specific section "
26901"name mentioned below, such as \"Acknowledgements\", \"Dedications\", "
26902"\"Endorsements\", or \"History\".) To \"Preserve the Title\" of such a "
26903"section when you modify the Document means that it remains a section "
26904"\"Entitled XYZ\" according to this definition."
13258msgstr ""26905msgstr ""
1325926906
13260#. (itstool) path: appendix/para26907#. (itstool) path: appendix/para
13261#: C/index-in.docbook:1164526908#: C/index-in.docbook:11645
n13262msgid "The Document may include Warranty Disclaimers next to the notice which stn26909msgid ""
>ates that this License applies to the Document. These Warranty Disclaimers are c 
>onsidered to be included by reference in this License, but only as regards discl 
>aiming warranties: any other implication that these Warranty Disclaimers may hav 
>e is void and has no effect on the meaning of this License." 
26910"The Document may include Warranty Disclaimers next to the notice which "
26911"states that this License applies to the Document. These Warranty Disclaimers "
26912"are considered to be included by reference in this License, but only as "
26913"regards disclaiming warranties: any other implication that these Warranty "
26914"Disclaimers may have is void and has no effect on the meaning of this "
26915"License."
13263msgstr ""26916msgstr ""
1326426917
13265#. (itstool) path: appendix/bridgehead26918#. (itstool) path: appendix/bridgehead
13266#. (itstool) id: index-in.docbook#VerbatimCopying26919#. (itstool) id: index-in.docbook#VerbatimCopying
13267#: C/index-in.docbook:1165326920#: C/index-in.docbook:11653
13268msgid "2. VERBATIM COPYING"26921msgid "2. VERBATIM COPYING"
13269msgstr ""26922msgstr ""
1327026923
13271#. (itstool) path: appendix/para26924#. (itstool) path: appendix/para
13272#: C/index-in.docbook:1165626925#: C/index-in.docbook:11656
n13273msgid "You may copy and distribute the Document in any medium, either commercialn26926msgid ""
>ly or noncommercially, provided that this License, the copyright notices, and th 
>e license notice saying this License applies to the Document are reproduced in a 
>ll copies, and that you add no other conditions whatsoever to those of this Lice 
>nse. You may not use technical measures to obstruct or control the reading or fu 
>rther copying of the copies you make or distribute. However, you may accept comp 
>ensation in exchange for copies. If you distribute a large enough number of copi 
>es you must also follow the conditions in section 3." 
26927"You may copy and distribute the Document in any medium, either commercially "
26928"or noncommercially, provided that this License, the copyright notices, and "
26929"the license notice saying this License applies to the Document are "
26930"reproduced in all copies, and that you add no other conditions whatsoever to "
26931"those of this License. You may not use technical measures to obstruct or "
26932"control the reading or further copying of the copies you make or distribute. "
26933"However, you may accept compensation in exchange for copies. If you "
26934"distribute a large enough number of copies you must also follow the "
26935"conditions in section 3."
13274msgstr ""26936msgstr ""
1327526937
13276#. (itstool) path: appendix/para26938#. (itstool) path: appendix/para
13277#: C/index-in.docbook:1166726939#: C/index-in.docbook:11667
nn26940msgid ""
13278msgid "You may also lend copies, under the same conditions stated above, and you26941"You may also lend copies, under the same conditions stated above, and you "
> may publicly display copies." 
26942"may publicly display copies."
13279msgstr ""26943msgstr ""
1328026944
13281#. (itstool) path: appendix/bridgehead26945#. (itstool) path: appendix/bridgehead
13282#. (itstool) id: index-in.docbook#QuantityCopying26946#. (itstool) id: index-in.docbook#QuantityCopying
13283#: C/index-in.docbook:1167126947#: C/index-in.docbook:11671
13284msgid "3. COPYING IN QUANTITY"26948msgid "3. COPYING IN QUANTITY"
13285msgstr ""26949msgstr ""
1328626950
13287#. (itstool) path: appendix/para26951#. (itstool) path: appendix/para
13288#: C/index-in.docbook:1167426952#: C/index-in.docbook:11674
n13289msgid "If you publish printed copies (or copies in media that commonly have prinn26953msgid ""
>ted covers) of the Document, numbering more than 100, and the Document's license 
> notice requires Cover Texts, you must enclose the copies in covers that carry,  
>clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover 
>, and Back-Cover Texts on the back cover. Both covers must also clearly and legi 
>bly identify you as the publisher of these copies. The front cover must present  
>the full title with all words of the title equally prominent and visible. You ma 
>y add other material on the covers in addition. Copying with changes limited to  
>the covers, as long as they preserve the title of the Document and satisfy these 
> conditions, can be treated as verbatim copying in other respects." 
26954"If you publish printed copies (or copies in media that commonly have printed "
26955"covers) of the Document, numbering more than 100, and the Document's license "
26956"notice requires Cover Texts, you must enclose the copies in covers that "
26957"carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the "
26958"front cover, and Back-Cover Texts on the back cover. Both covers must also "
26959"clearly and legibly identify you as the publisher of these copies. The front "
26960"cover must present the full title with all words of the title equally "
26961"prominent and visible. You may add other material on the covers in addition. "
26962"Copying with changes limited to the covers, as long as they preserve the "
26963"title of the Document and satisfy these conditions, can be treated as "
26964"verbatim copying in other respects."
13290msgstr ""26965msgstr ""
1329126966
13292#. (itstool) path: appendix/para26967#. (itstool) path: appendix/para
13293#: C/index-in.docbook:1168826968#: C/index-in.docbook:11688
n13294msgid "If the required texts for either cover are too voluminous to fit legibly,n26969msgid ""
> you should put the first ones listed (as many as fit reasonably) on the actual  
>cover, and continue the rest onto adjacent pages." 
26970"If the required texts for either cover are too voluminous to fit legibly, "
26971"you should put the first ones listed (as many as fit reasonably) on the "
26972"actual cover, and continue the rest onto adjacent pages."
13295msgstr ""26973msgstr ""
1329626974
13297#. (itstool) path: appendix/para26975#. (itstool) path: appendix/para
13298#: C/index-in.docbook:1169326976#: C/index-in.docbook:11693
n13299msgid "If you publish or distribute Opaque copies of the Document numbering moren26977msgid ""
> than 100, you must either include a machine-readable Transparent copy along wit 
>h each Opaque copy, or state in or with each Opaque copy a computer-network loca 
>tion from which the general network-using public has access to download using pu 
>blic-standard network protocols a complete Transparent copy of the Document, fre 
>e of added material. If you use the latter option, you must take reasonably prud 
>ent steps, when you begin distribution of Opaque copies in quantity, to ensure t 
>hat this Transparent copy will remain thus accessible at the stated location unt 
>il at least one year after the last time you distribute an Opaque copy (directly 
> or through your agents or retailers) of that edition to the public." 
26978"If you publish or distribute Opaque copies of the Document numbering more "
26979"than 100, you must either include a machine-readable Transparent copy along "
26980"with each Opaque copy, or state in or with each Opaque copy a computer-"
26981"network location from which the general network-using public has access to "
26982"download using public-standard network protocols a complete Transparent copy "
26983"of the Document, free of added material. If you use the latter option, you "
26984"must take reasonably prudent steps, when you begin distribution of Opaque "
26985"copies in quantity, to ensure that this Transparent copy will remain thus "
26986"accessible at the stated location until at least one year after the last "
26987"time you distribute an Opaque copy (directly or through your agents or "
26988"retailers) of that edition to the public."
13300msgstr ""26989msgstr ""
1330126990
13302#. (itstool) path: appendix/para26991#. (itstool) path: appendix/para
13303#: C/index-in.docbook:1170626992#: C/index-in.docbook:11706
n13304msgid "It is requested, but not required, that you contact the authors of the Don26993msgid ""
>cument well before redistributing any large number of copies, to give them a cha 
>nce to provide you with an updated version of the Document." 
26994"It is requested, but not required, that you contact the authors of the "
26995"Document well before redistributing any large number of copies, to give them "
26996"a chance to provide you with an updated version of the Document."
13305msgstr ""26997msgstr ""
1330626998
13307#. (itstool) path: appendix/bridgehead26999#. (itstool) path: appendix/bridgehead
13308#. (itstool) id: index-in.docbook#Modifications27000#. (itstool) id: index-in.docbook#Modifications
13309#: C/index-in.docbook:1171227001#: C/index-in.docbook:11712
13310msgid "4. MODIFICATIONS"27002msgid "4. MODIFICATIONS"
13311msgstr ""27003msgstr ""
1331227004
13313#. (itstool) path: appendix/para27005#. (itstool) path: appendix/para
13314#: C/index-in.docbook:1171527006#: C/index-in.docbook:11715
n13315msgid "You may copy and distribute a Modified Version of the Document under the n27007msgid ""
>conditions of sections 2 and 3 above, provided that you release the Modified Ver 
>sion under precisely this License, with the Modified Version filling the role of 
> the Document, thus licensing distribution and modification of the Modified Vers 
>ion to whoever possesses a copy of it. In addition, you must do these things in  
>the Modified Version:" 
27008"You may copy and distribute a Modified Version of the Document under the "
27009"conditions of sections 2 and 3 above, provided that you release the Modified "
27010"Version under precisely this License, with the Modified Version filling the "
27011"role of the Document, thus licensing distribution and modification of the "
27012"Modified Version to whoever possesses a copy of it. In addition, you must do "
27013"these things in the Modified Version:"
13316msgstr ""27014msgstr ""
1331727015
13318#. (itstool) path: listitem/simpara27016#. (itstool) path: listitem/simpara
13319#: C/index-in.docbook:1172527017#: C/index-in.docbook:11725
n13320msgid "Use in the Title Page (and on the covers, if any) a title distinct from tn27018msgid ""
>hat of the Document, and from those of previous versions (which should, if there 
> were any, be listed in the History section of the Document). You may use the sa 
>me title as a previous version if the original publisher of that version gives p 
>ermission." 
27019"Use in the Title Page (and on the covers, if any) a title distinct from that "
27020"of the Document, and from those of previous versions (which should, if there "
27021"were any, be listed in the History section of the Document). You may use the "
27022"same title as a previous version if the original publisher of that version "
27023"gives permission."
13321msgstr ""27024msgstr ""
1332227025
13323#. (itstool) path: listitem/simpara27026#. (itstool) path: listitem/simpara
13324#: C/index-in.docbook:1173427027#: C/index-in.docbook:11734
n13325msgid "List on the Title Page, as authors, one or more persons or entities respon27028msgid ""
>nsible for authorship of the modifications in the Modified Version, together wit 
>h at least five of the principal authors of the Document (all of its principal a 
>uthors, if it has fewer than five), unless they release you from this requiremen 
>t." 
27029"List on the Title Page, as authors, one or more persons or entities "
27030"responsible for authorship of the modifications in the Modified Version, "
27031"together with at least five of the principal authors of the Document (all of "
27032"its principal authors, if it has fewer than five), unless they release you "
27033"from this requirement."
13326msgstr ""27034msgstr ""
1332727035
13328#. (itstool) path: listitem/simpara27036#. (itstool) path: listitem/simpara
13329#: C/index-in.docbook:1174327037#: C/index-in.docbook:11743
nn27038msgid ""
13330msgid "State on the Title page the name of the publisher of the Modified Version27039"State on the Title page the name of the publisher of the Modified Version, "
>as the publisher." 
27040"as the publisher."
13331msgstr ""27041msgstr ""
1333227042
13333#. (itstool) path: listitem/simpara27043#. (itstool) path: listitem/simpara
13334#: C/index-in.docbook:1174927044#: C/index-in.docbook:11749
13335msgid "Preserve all the copyright notices of the Document."27045msgid "Preserve all the copyright notices of the Document."
13336msgstr ""27046msgstr ""
1333727047
13338#. (itstool) path: listitem/simpara27048#. (itstool) path: listitem/simpara
13339#: C/index-in.docbook:1175427049#: C/index-in.docbook:11754
nn27050msgid ""
13340msgid "Add an appropriate copyright notice for your modifications adjacent to th27051"Add an appropriate copyright notice for your modifications adjacent to the "
>other copyright notices." 
27052"other copyright notices."
13341msgstr ""27053msgstr ""
1334227054
13343#. (itstool) path: listitem/simpara27055#. (itstool) path: listitem/simpara
13344#: C/index-in.docbook:1176027056#: C/index-in.docbook:11760
n13345msgid "Include, immediately after the copyright notices, a license notice givingn27057msgid ""
> the public permission to use the Modified Version under the terms of this Licen 
>se, in the form shown in the Addendum below." 
27058"Include, immediately after the copyright notices, a license notice giving "
27059"the public permission to use the Modified Version under the terms of this "
27060"License, in the form shown in the Addendum below."
13346msgstr ""27061msgstr ""
1334727062
13348#. (itstool) path: listitem/simpara27063#. (itstool) path: listitem/simpara
13349#: C/index-in.docbook:1176727064#: C/index-in.docbook:11767
n13350msgid "Preserve in that license notice the full lists of Invariant Sections and n27065msgid ""
>required Cover Texts given in the Document's license notice." 
27066"Preserve in that license notice the full lists of Invariant Sections and "
27067"required Cover Texts given in the Document's license notice."
13351msgstr ""27068msgstr ""
1335227069
13353#. (itstool) path: listitem/simpara27070#. (itstool) path: listitem/simpara
13354#: C/index-in.docbook:1177327071#: C/index-in.docbook:11773
13355msgid "Include an unaltered copy of this License."27072msgid "Include an unaltered copy of this License."
13356msgstr ""27073msgstr ""
1335727074
13358#. (itstool) path: listitem/simpara27075#. (itstool) path: listitem/simpara
13359#: C/index-in.docbook:1177827076#: C/index-in.docbook:11778
n13360msgid "Preserve the section Entitled \"History\", Preserve its Title, and add ton27077msgid ""
> it an item stating at least the title, year, new authors, and publisher of the  
>Modified Version as given on the Title Page. If there is no section Entitled \"H 
>istory\" in the Document, create one stating the title, year, authors, and publi 
>sher of the Document as given on its Title Page, then add an item describing the 
> Modified Version as stated in the previous sentence." 
27078"Preserve the section Entitled \"History\", Preserve its Title, and add to it "
27079"an item stating at least the title, year, new authors, and publisher of the "
27080"Modified Version as given on the Title Page. If there is no section Entitled "
27081"\"History\" in the Document, create one stating the title, year, authors, "
27082"and publisher of the Document as given on its Title Page, then add an item "
27083"describing the Modified Version as stated in the previous sentence."
13361msgstr ""27084msgstr ""
1336227085
13363#. (itstool) path: listitem/simpara27086#. (itstool) path: listitem/simpara
13364#: C/index-in.docbook:1178927087#: C/index-in.docbook:11789
n13365msgid "Preserve the network location, if any, given in the Document for public an27088msgid ""
>ccess to a Transparent copy of the Document, and likewise the network locations  
>given in the Document for previous versions it was based on. These may be placed 
> in the \"History\" section. You may omit a network location for a work that was 
> published at least four years before the Document itself, or if the original pu 
>blisher of the version it refers to gives permission." 
27089"Preserve the network location, if any, given in the Document for public "
27090"access to a Transparent copy of the Document, and likewise the network "
27091"locations given in the Document for previous versions it was based on. These "
27092"may be placed in the \"History\" section. You may omit a network location "
27093"for a work that was published at least four years before the Document "
27094"itself, or if the original publisher of the version it refers to gives "
27095"permission."
13366msgstr ""27096msgstr ""
1336727097
13368#. (itstool) path: listitem/simpara27098#. (itstool) path: listitem/simpara
13369#: C/index-in.docbook:1180027099#: C/index-in.docbook:11800
n13370msgid "For any section Entitled \"Acknowledgements\" or \"Dedications\", Preservn27100msgid ""
>e the Title of the section, and preserve in the section all the substance and to 
>ne of each of the contributor acknowledgements and/or dedications given therein. 
>" 
27101"For any section Entitled \"Acknowledgements\" or \"Dedications\", Preserve "
27102"the Title of the section, and preserve in the section all the substance and "
27103"tone of each of the contributor acknowledgements and/or dedications given "
27104"therein."
13371msgstr ""27105msgstr ""
1337227106
13373#. (itstool) path: listitem/simpara27107#. (itstool) path: listitem/simpara
13374#: C/index-in.docbook:1180827108#: C/index-in.docbook:11808
n13375msgid "Preserve all the Invariant Sections of the Document, unaltered in their tn27109msgid ""
>ext and in their titles. Section numbers or the equivalent are not considered pa 
>rt of the section titles." 
27110"Preserve all the Invariant Sections of the Document, unaltered in their text "
27111"and in their titles. Section numbers or the equivalent are not considered "
27112"part of the section titles."
13376msgstr ""27113msgstr ""
1337727114
13378#. (itstool) path: listitem/simpara27115#. (itstool) path: listitem/simpara
13379#: C/index-in.docbook:1181527116#: C/index-in.docbook:11815
nn27117msgid ""
13380msgid "Delete any section Entitled \"Endorsements\". Such a section may not be i27118"Delete any section Entitled \"Endorsements\". Such a section may not be "
>ncluded in the Modified Version." 
27119"included in the Modified Version."
13381msgstr ""27120msgstr ""
1338227121
13383#. (itstool) path: listitem/simpara27122#. (itstool) path: listitem/simpara
13384#: C/index-in.docbook:1182127123#: C/index-in.docbook:11821
n13385msgid "Do not retitle any existing section to be Entitled \"Endorsements\" or ton27124msgid ""
> conflict in title with any Invariant Section." 
27125"Do not retitle any existing section to be Entitled \"Endorsements\" or to "
27126"conflict in title with any Invariant Section."
13386msgstr ""27127msgstr ""
1338727128
13388#. (itstool) path: listitem/simpara27129#. (itstool) path: listitem/simpara
13389#: C/index-in.docbook:1182727130#: C/index-in.docbook:11827
13390msgid "Preserve any Warranty Disclaimers."27131msgid "Preserve any Warranty Disclaimers."
13391msgstr ""27132msgstr ""
1339227133
13393#. (itstool) path: appendix/para27134#. (itstool) path: appendix/para
13394#: C/index-in.docbook:1183227135#: C/index-in.docbook:11832
n13395msgid "If the Modified Version includes new front-matter sections or appendices n27136msgid ""
>that qualify as Secondary Sections and contain no material copied from the Docum 
>ent, you may at your option designate some or all of these sections as invariant 
>. To do this, add their titles to the list of Invariant Sections in the Modified 
> Version's license notice. These titles must be distinct from any other section  
>titles." 
27137"If the Modified Version includes new front-matter sections or appendices "
27138"that qualify as Secondary Sections and contain no material copied from the "
27139"Document, you may at your option designate some or all of these sections as "
27140"invariant. To do this, add their titles to the list of Invariant Sections in "
27141"the Modified Version's license notice. These titles must be distinct from "
27142"any other section titles."
13396msgstr ""27143msgstr ""
1339727144
13398#. (itstool) path: appendix/para27145#. (itstool) path: appendix/para
13399#: C/index-in.docbook:1184027146#: C/index-in.docbook:11840
n13400msgid "You may add a section Entitled \"Endorsements\", provided it contains notn27147msgid ""
>hing but endorsements of your Modified Version by various parties--for example,  
>statements of peer review or that the text has been approved by an organization  
>as the authoritative definition of a standard." 
27148"You may add a section Entitled \"Endorsements\", provided it contains "
27149"nothing but endorsements of your Modified Version by various parties--for "
27150"example, statements of peer review or that the text has been approved by an "
27151"organization as the authoritative definition of a standard."
13401msgstr ""27152msgstr ""
1340227153
13403#. (itstool) path: appendix/para27154#. (itstool) path: appendix/para
13404#: C/index-in.docbook:1184627155#: C/index-in.docbook:11846
n13405msgid "You may add a passage of up to five words as a Front-Cover Text, and a pan27156msgid ""
>ssage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Te 
>xts in the Modified Version. Only one passage of Front-Cover Text and one of Bac 
>k-Cover Text may be added by (or through arrangements made by) any one entity. I 
>f the Document already includes a cover text for the same cover, previously adde 
>d by you or by arrangement made by the same entity you are acting on behalf of,  
>you may not add another; but you may replace the old one, on explicit permission 
> from the previous publisher that added the old one." 
27157"You may add a passage of up to five words as a Front-Cover Text, and a "
27158"passage of up to 25 words as a Back-Cover Text, to the end of the list of "
27159"Cover Texts in the Modified Version. Only one passage of Front-Cover Text "
27160"and one of Back-Cover Text may be added by (or through arrangements made by) "
27161"any one entity. If the Document already includes a cover text for the same "
27162"cover, previously added by you or by arrangement made by the same entity you "
27163"are acting on behalf of, you may not add another; but you may replace the "
27164"old one, on explicit permission from the previous publisher that added the "
27165"old one."
13406msgstr ""27166msgstr ""
1340727167
13408#. (itstool) path: appendix/para27168#. (itstool) path: appendix/para
13409#: C/index-in.docbook:1185727169#: C/index-in.docbook:11857
n13410msgid "The author(s) and publisher(s) of the Document do not by this License givn27170msgid ""
>e permission to use their names for publicity for or to assert or imply endorsem 
>ent of any Modified Version." 
27171"The author(s) and publisher(s) of the Document do not by this License give "
27172"permission to use their names for publicity for or to assert or imply "
27173"endorsement of any Modified Version."
13411msgstr ""27174msgstr ""
1341227175
13413#. (itstool) path: appendix/bridgehead27176#. (itstool) path: appendix/bridgehead
13414#. (itstool) id: index-in.docbook#Combining27177#. (itstool) id: index-in.docbook#Combining
13415#: C/index-in.docbook:1186227178#: C/index-in.docbook:11862
13416msgid "5. COMBINING DOCUMENTS"27179msgid "5. COMBINING DOCUMENTS"
13417msgstr ""27180msgstr ""
1341827181
13419#. (itstool) path: appendix/para27182#. (itstool) path: appendix/para
13420#: C/index-in.docbook:1186527183#: C/index-in.docbook:11865
n13421msgid "You may combine the Document with other documents released under this Licn27184msgid ""
>ense, under the terms defined in section 4 above for modified versions, provided 
> that you include in the combination all of the Invariant Sections of all of the 
> original documents, unmodified, and list them all as Invariant Sections of your 
> combined work in its license notice, and that you preserve all their Warranty D 
>isclaimers." 
27185"You may combine the Document with other documents released under this "
27186"License, under the terms defined in section 4 above for modified versions, "
27187"provided that you include in the combination all of the Invariant Sections "
27188"of all of the original documents, unmodified, and list them all as Invariant "
27189"Sections of your combined work in its license notice, and that you preserve "
27190"all their Warranty Disclaimers."
13422msgstr ""27191msgstr ""
1342327192
13424#. (itstool) path: appendix/para27193#. (itstool) path: appendix/para
13425#: C/index-in.docbook:1187327194#: C/index-in.docbook:11873
n13426msgid "The combined work need only contain one copy of this License, and multipln27195msgid ""
>e identical Invariant Sections may be replaced with a single copy. If there are  
>multiple Invariant Sections with the same name but different contents, make the  
>title of each such section unique by adding at the end of it, in parentheses, th 
>e name of the original author or publisher of that section if known, or else a u 
>nique number. Make the same adjustment to the section titles in the list of Inva 
>riant Sections in the license notice of the combined work." 
27196"The combined work need only contain one copy of this License, and multiple "
27197"identical Invariant Sections may be replaced with a single copy. If there "
27198"are multiple Invariant Sections with the same name but different contents, "
27199"make the title of each such section unique by adding at the end of it, in "
27200"parentheses, the name of the original author or publisher of that section if "
27201"known, or else a unique number. Make the same adjustment to the section "
27202"titles in the list of Invariant Sections in the license notice of the "
27203"combined work."
13427msgstr ""27204msgstr ""
1342827205
13429#. (itstool) path: appendix/para27206#. (itstool) path: appendix/para
13430#: C/index-in.docbook:1188327207#: C/index-in.docbook:11883
n13431msgid "In the combination, you must combine any sections Entitled \"History\" inn27208msgid ""
> the various original documents, forming one section Entitled \"History\"; likew 
>ise combine any sections Entitled \"Acknowledgements\", and any sections Entitle 
>d \"Dedications\". You must delete all sections Entitled \"Endorsements\"." 
27209"In the combination, you must combine any sections Entitled \"History\" in "
27210"the various original documents, forming one section Entitled \"History\"; "
27211"likewise combine any sections Entitled \"Acknowledgements\", and any "
27212"sections Entitled \"Dedications\". You must delete all sections Entitled "
27213"\"Endorsements\"."
13432msgstr ""27214msgstr ""
1343327215
13434#. (itstool) path: appendix/bridgehead27216#. (itstool) path: appendix/bridgehead
13435#. (itstool) id: index-in.docbook#Collections27217#. (itstool) id: index-in.docbook#Collections
13436#: C/index-in.docbook:1189027218#: C/index-in.docbook:11890
13437msgid "6. COLLECTIONS OF DOCUMENTS"27219msgid "6. COLLECTIONS OF DOCUMENTS"
13438msgstr ""27220msgstr ""
1343927221
13440#. (itstool) path: appendix/para27222#. (itstool) path: appendix/para
13441#: C/index-in.docbook:1189327223#: C/index-in.docbook:11893
n13442msgid "You may make a collection consisting of the Document and other documents n27224msgid ""
>released under this License, and replace the individual copies of this License i 
>n the various documents with a single copy that is included in the collection, p 
>rovided that you follow the rules of this License for verbatim copying of each o 
>f the documents in all other respects." 
27225"You may make a collection consisting of the Document and other documents "
27226"released under this License, and replace the individual copies of this "
27227"License in the various documents with a single copy that is included in the "
27228"collection, provided that you follow the rules of this License for verbatim "
27229"copying of each of the documents in all other respects."
13443msgstr ""27230msgstr ""
1344427231
13445#. (itstool) path: appendix/para27232#. (itstool) path: appendix/para
13446#: C/index-in.docbook:1190027233#: C/index-in.docbook:11900
n13447msgid "You may extract a single document from such a collection, and distribute n27234msgid ""
>it individually under this License, provided you insert a copy of this License i 
>nto the extracted document, and follow this License in all other respects regard 
>ing verbatim copying of that document." 
27235"You may extract a single document from such a collection, and distribute it "
27236"individually under this License, provided you insert a copy of this License "
27237"into the extracted document, and follow this License in all other respects "
27238"regarding verbatim copying of that document."
13448msgstr ""27239msgstr ""
1344927240
13450#. (itstool) path: appendix/bridgehead27241#. (itstool) path: appendix/bridgehead
13451#. (itstool) id: index-in.docbook#Aggregation27242#. (itstool) id: index-in.docbook#Aggregation
13452#: C/index-in.docbook:1190627243#: C/index-in.docbook:11906
13453msgid "7. AGGREGATION WITH INDEPENDENT WORKS"27244msgid "7. AGGREGATION WITH INDEPENDENT WORKS"
13454msgstr ""27245msgstr ""
1345527246
13456#. (itstool) path: appendix/para27247#. (itstool) path: appendix/para
13457#: C/index-in.docbook:1190927248#: C/index-in.docbook:11909
n13458msgid "A compilation of the Document or its derivatives with other separate and n27249msgid ""
>independent documents or works, in or on a volume of a storage or distribution m 
>edium, is called an \"aggregate\" if the copyright resulting from the compilatio 
>n is not used to limit the legal rights of the compilation's users beyond what t 
>he individual works permit. When the Document is included in an aggregate, this  
>License does not apply to the other works in the aggregate which are not themsel 
>ves derivative works of the Document." 
27250"A compilation of the Document or its derivatives with other separate and "
27251"independent documents or works, in or on a volume of a storage or "
27252"distribution medium, is called an \"aggregate\" if the copyright resulting "
27253"from the compilation is not used to limit the legal rights of the "
27254"compilation's users beyond what the individual works permit. When the "
27255"Document is included in an aggregate, this License does not apply to the "
27256"other works in the aggregate which are not themselves derivative works of "
27257"the Document."
13459msgstr ""27258msgstr ""
1346027259
13461#. (itstool) path: appendix/para27260#. (itstool) path: appendix/para
13462#: C/index-in.docbook:1191927261#: C/index-in.docbook:11919
n13463msgid "If the Cover Text requirement of section 3 is applicable to these copies n27262msgid ""
>of the Document, then if the Document is less than one half of the entire aggreg 
>ate, the Document's Cover Texts may be placed on covers that bracket the Documen 
>t within the aggregate, or the electronic equivalent of covers if the Document i 
>s in electronic form. Otherwise they must appear on printed covers that bracket  
>the whole aggregate." 
27263"If the Cover Text requirement of section 3 is applicable to these copies of "
27264"the Document, then if the Document is less than one half of the entire "
27265"aggregate, the Document's Cover Texts may be placed on covers that bracket "
27266"the Document within the aggregate, or the electronic equivalent of covers if "
27267"the Document is in electronic form. Otherwise they must appear on printed "
27268"covers that bracket the whole aggregate."
13464msgstr ""27269msgstr ""
1346527270
13466#. (itstool) path: appendix/bridgehead27271#. (itstool) path: appendix/bridgehead
13467#. (itstool) id: index-in.docbook#Translation27272#. (itstool) id: index-in.docbook#Translation
13468#: C/index-in.docbook:1192727273#: C/index-in.docbook:11927
13469msgid "8. TRANSLATION"27274msgid "8. TRANSLATION"
13470msgstr ""27275msgstr ""
1347127276
13472#. (itstool) path: appendix/para27277#. (itstool) path: appendix/para
13473#: C/index-in.docbook:1193027278#: C/index-in.docbook:11930
n13474msgid "Translation is considered a kind of modification, so you may distribute tn27279msgid ""
>ranslations of the Document under the terms of section 4. Replacing Invariant Se 
>ctions with translations requires special permission from their copyright holder 
>s, but you may include translations of some or all Invariant Sections in additio 
>n to the original versions of these Invariant Sections. You may include a transl 
>ation of this License, and all the license notices in the Document, and any Warr 
>anty Disclaimers, provided that you also include the original English version of 
> this License and the original versions of those notices and disclaimers. In cas 
>e of a disagreement between the translation and the original version of this Lic 
>ense or a notice or disclaimer, the original version will prevail." 
27280"Translation is considered a kind of modification, so you may distribute "
27281"translations of the Document under the terms of section 4. Replacing "
27282"Invariant Sections with translations requires special permission from their "
27283"copyright holders, but you may include translations of some or all Invariant "
27284"Sections in addition to the original versions of these Invariant Sections. "
27285"You may include a translation of this License, and all the license notices "
27286"in the Document, and any Warranty Disclaimers, provided that you also "
27287"include the original English version of this License and the original "
27288"versions of those notices and disclaimers. In case of a disagreement between "
27289"the translation and the original version of this License or a notice or "
27290"disclaimer, the original version will prevail."
13475msgstr ""27291msgstr ""
1347627292
13477#. (itstool) path: appendix/para27293#. (itstool) path: appendix/para
13478#: C/index-in.docbook:1194327294#: C/index-in.docbook:11943
n13479msgid "If a section in the Document is Entitled \"Acknowledgements\", \"Dedicatin27295msgid ""
>ons\", or \"History\", the requirement (section 4) to Preserve its Title (sectio 
>n 1) will typically require changing the actual title." 
27296"If a section in the Document is Entitled \"Acknowledgements\", "
27297"\"Dedications\", or \"History\", the requirement (section 4) to Preserve its "
27298"Title (section 1) will typically require changing the actual title."
13480msgstr ""27299msgstr ""
1348127300
13482#. (itstool) path: appendix/bridgehead27301#. (itstool) path: appendix/bridgehead
13483#. (itstool) id: index-in.docbook#Termination27302#. (itstool) id: index-in.docbook#Termination
13484#: C/index-in.docbook:1194827303#: C/index-in.docbook:11948
13485msgid "9. TERMINATION"27304msgid "9. TERMINATION"
13486msgstr ""27305msgstr ""
1348727306
13488#. (itstool) path: appendix/para27307#. (itstool) path: appendix/para
13489#: C/index-in.docbook:1195127308#: C/index-in.docbook:11951
n13490msgid "You may not copy, modify, sublicense, or distribute the Document except an27309msgid ""
>s expressly provided for under this License. Any other attempt to copy, modify,  
>sublicense or distribute the Document is void, and will automatically terminate  
>your rights under this License. However, parties who have received copies, or ri 
>ghts, from you under this License will not have their licenses terminated so lon 
>g as such parties remain in full compliance." 
27310"You may not copy, modify, sublicense, or distribute the Document except as "
27311"expressly provided for under this License. Any other attempt to copy, "
27312"modify, sublicense or distribute the Document is void, and will "
27313"automatically terminate your rights under this License. However, parties who "
27314"have received copies, or rights, from you under this License will not have "
27315"their licenses terminated so long as such parties remain in full compliance."
13491msgstr ""27316msgstr ""
1349227317
13493#. (itstool) path: appendix/bridgehead27318#. (itstool) path: appendix/bridgehead
13494#. (itstool) id: index-in.docbook#FutureRevisions27319#. (itstool) id: index-in.docbook#FutureRevisions
13495#: C/index-in.docbook:1196027320#: C/index-in.docbook:11960
13496msgid "10. FUTURE REVISIONS OF THIS LICENSE"27321msgid "10. FUTURE REVISIONS OF THIS LICENSE"
13497msgstr ""27322msgstr ""
1349827323
13499#. (itstool) path: appendix/para27324#. (itstool) path: appendix/para
13500#: C/index-in.docbook:1196327325#: C/index-in.docbook:11963
n13501msgid "The Free Software Foundation may publish new, revised versions of the GNUn27326msgid ""
> Free Documentation License from time to time. Such new versions will be similar 
> in spirit to the present version, but may differ in detail to address new probl 
>ems or concerns. See <link xlink:href=\"https://www.gnu.org/licenses/\">https:// 
>www.gnu.org/licenses/</link>." 
27327"The Free Software Foundation may publish new, revised versions of the GNU "
27328"Free Documentation License from time to time. Such new versions will be "
27329"similar in spirit to the present version, but may differ in detail to "
27330"address new problems or concerns. See <link xlink:href=\"https://www.gnu.org/"
27331"licenses/\">https://www.gnu.org/licenses/</link>."
13502msgstr ""27332msgstr ""
1350327333
13504#. (itstool) path: appendix/para27334#. (itstool) path: appendix/para
13505#: C/index-in.docbook:1197027335#: C/index-in.docbook:11970
n13506msgid "Each version of the License is given a distinguishing version number. If n27336msgid ""
>the Document specifies that a particular numbered version of this License \"or a 
>ny later version\" applies to it, you have the option of following the terms and 
> conditions either of that specified version or of any later version that has be 
>en published (not as a draft) by the Free Software Foundation. If the Document d 
>oes not specify a version number of this License, you may choose any version eve 
>r published (not as a draft) by the Free Software Foundation." 
27337"Each version of the License is given a distinguishing version number. If the "
27338"Document specifies that a particular numbered version of this License \"or "
27339"any later version\" applies to it, you have the option of following the "
27340"terms and conditions either of that specified version or of any later "
27341"version that has been published (not as a draft) by the Free Software "
27342"Foundation. If the Document does not specify a version number of this "
27343"License, you may choose any version ever published (not as a draft) by the "
27344"Free Software Foundation."
13507msgstr ""27345msgstr ""
1350827346
13509#. (itstool) path: appendix/bridgehead27347#. (itstool) path: appendix/bridgehead
13510#. (itstool) id: index-in.docbook#HowToUse27348#. (itstool) id: index-in.docbook#HowToUse
13511#: C/index-in.docbook:1198027349#: C/index-in.docbook:11980
13512msgid "ADDENDUM: How to use this License for your documents"27350msgid "ADDENDUM: How to use this License for your documents"
13513msgstr ""27351msgstr ""
1351427352
13515#. (itstool) path: appendix/para27353#. (itstool) path: appendix/para
13516#: C/index-in.docbook:1198327354#: C/index-in.docbook:11983
n13517msgid "To use this License in a document you have written, include a copy of then27355msgid ""
> License in the document and put the following copyright and license notices jus 
>t after the title page:" 
27356"To use this License in a document you have written, include a copy of the "
27357"License in the document and put the following copyright and license notices "
27358"just after the title page:"
13518msgstr ""27359msgstr ""
1351927360
13520#. (itstool) path: blockquote/para27361#. (itstool) path: blockquote/para
13521#: C/index-in.docbook:1198927362#: C/index-in.docbook:11989
13522msgid "Copyright (C) YEAR YOUR NAME."27363msgid "Copyright (C) YEAR YOUR NAME."
13523msgstr ""27364msgstr ""
1352427365
13525#. (itstool) path: blockquote/para27366#. (itstool) path: blockquote/para
13526#: C/index-in.docbook:1199227367#: C/index-in.docbook:11992
n13527msgid "Permission is granted to copy, distribute and/or modify this document undn27368#, fuzzy
>er the terms of the GNU Free Documentation License, Version 1.2 or any later ver 
>sion published by the Free Software Foundation; with no Invariant Sections, no F 
>ront-Cover Texts, and no Back-Cover Texts. A copy of the license is included in  
>the section entitled \"GNU Free Documentation License\"." 
27369#| msgid ""
27370#| "Permission is granted to copy, distribute and/or modify this document "
27371#| "under the terms of the GNU Free Documentation License, Version 1.2 or any "
27372#| "later version published by the Free Software Foundation; with no "
27373#| "Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You "
27374#| "may obtain a copy of the GNU Free Documentation License from the Free "
27375#| "Software Foundation by visiting their Web site or by writing to: Free "
27376#| "Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA "
27377#| "02111-1307, USA."
27378msgid ""
27379"Permission is granted to copy, distribute and/or modify this document under "
27380"the terms of the GNU Free Documentation License, Version 1.2 or any later "
27381"version published by the Free Software Foundation; with no Invariant "
27382"Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the "
27383"license is included in the section entitled \"GNU Free Documentation "
27384"License\"."
13528msgstr ""27385msgstr ""
nn27386"Tillstånd att kopiera, distribuera och/eller modifiera detta dokument ges "
27387"under villkoren i GNU Free Documentation License, version 1.2 eller senare, "
27388"utgivet av Free Software Foundation, utan standardavsnitt och omslagstexter. "
27389"Du kan erhålla en kopia av GNU Free Documentation License från Free Software "
27390"Foundation genom att besöka deras webbplats eller genom att skriva till: "
27391"Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA "
27392"02111-1307, USA."
1352927393
13530#. (itstool) path: appendix/para27394#. (itstool) path: appendix/para
13531#: C/index-in.docbook:1200127395#: C/index-in.docbook:12001
n13532msgid "If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, rn27396msgid ""
>eplace the \"with...Texts.\" line with this:" 
27397"If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, "
27398"replace the \"with...Texts.\" line with this:"
13533msgstr ""27399msgstr ""
1353427400
13535#. (itstool) path: blockquote/para27401#. (itstool) path: blockquote/para
13536#: C/index-in.docbook:1200627402#: C/index-in.docbook:12006
n13537msgid "with the Invariant Sections being LIST THEIR TITLES, with the Front-Covern27403msgid ""
> Texts being LIST, and with the Back-Cover Texts being LIST." 
27404"with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover "
27405"Texts being LIST, and with the Back-Cover Texts being LIST."
13538msgstr ""27406msgstr ""
1353927407
13540#. (itstool) path: appendix/para27408#. (itstool) path: appendix/para
13541#: C/index-in.docbook:1201127409#: C/index-in.docbook:12011
n13542msgid "If you have Invariant Sections without Cover Texts, or some other combinan27410msgid ""
>tion of the three, merge those two alternatives to suit the situation." 
27411"If you have Invariant Sections without Cover Texts, or some other "
27412"combination of the three, merge those two alternatives to suit the situation."
13543msgstr ""27413msgstr ""
1354427414
13545#. (itstool) path: appendix/para27415#. (itstool) path: appendix/para
13546#: C/index-in.docbook:1201627416#: C/index-in.docbook:12016
n13547msgid "If your document contains nontrivial examples of program code, we recommen27417msgid ""
>nd releasing these examples in parallel under your choice of free software licen 
>se, such as the GNU General Public License, to permit their use in free software 
>." 
27418"If your document contains nontrivial examples of program code, we recommend "
27419"releasing these examples in parallel under your choice of free software "
27420"license, such as the GNU General Public License, to permit their use in free "
27421"software."
27422msgstr ""
27423 
27424#~ msgid ""
27425#~ "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
27426#~ "namespaceGlib.html\">Reference</link>"
13548msgstr ""27427#~ msgstr ""
27428#~ "<link xlink:href=\"https://gnome.pages.gitlab.gnome.org/glibmm/"
27429#~ "namespaceGlib.html\">Referens</link>"
1354927430
tt27431#, no-wrap
27432#~ msgid "intltool-update --pot"
27433#~ msgstr "intltool-update --pot"
27434 
27435#~ msgid ""
27436#~ "<link xlink:href=\"http://ftp.gnome.org/pub/GNOME/sources/gtkmm_hello/"
27437#~ "\"><literal>gtkmm_hello</literal> example package</link>"
27438#~ msgstr ""
27439#~ "<link xlink:href=\"http://ftp.gnome.org/pub/GNOME/sources/gtkmm_hello/"
27440#~ "\">Exempelpaketet <literal>gtkmm_hello</literal></link>"
27441 
27442#~ msgid ""
27443#~ "<link xlink:href=\"http://ftp.gnome.org/pub/GNOME/sources/gnomemm_hello/"
27444#~ "\"><literal>gnomemm_hello</literal> example package</link>"
27445#~ msgstr ""
27446#~ "<link xlink:href=\"http://ftp.gnome.org/pub/GNOME/sources/gnomemm_hello/"
27447#~ "\">Exempelpaketet <literal>gnomemm_hello</literal></link>"
27448 
27449#~ msgid "For instance, from <filename>adjustment.hg</filename>:"
27450#~ msgstr "Till exempel, från <filename>adjustment.hg</filename>:"
27451 
27452#~ msgid "For example, from <filename>iochannel.hg</filename> in glibmm:"
27453#~ msgstr "Till exempel, från <filename>iochannel.hg</filename> i glibmm:"
27454 
27455#, fuzzy, no-wrap
27456#~ msgid ""
27457#~ "\n"
27458#~ "_WRAP_ENUM(SeekType, GSeekType, NO_GTYPE, s#^SEEK_#SEEK_TYPE_#)\n"
27459#~ "      "
27460#~ msgstr ""
27461#~ "\n"
27462#~ "_WRAP_ENUM(SeekType, GSeekType, NO_GTYPE, s#^SEEK_#SEEK_TYPE_#)\n"
27463#~ "      "
27464 
27465#, fuzzy
27466#~ msgid ""
27467#~ "For all the macros that process method signatures, it is possible to "
27468#~ "specify a different order for the C++ parameters than the existing order "
27469#~ "in the C function, virtual function or signal. For example, say that the "
27470#~ "following C function were being wrapped as a C++ method for the "
27471#~ "<classname>Gtk::Widget</classname> class: <_:programlisting-1/> However, "
27472#~ "changing the order of the C++ method's two parameters is necessary. "
27473#~ "Something like the following would wrap the function as a C++ method with "
27474#~ "a different order for the two parameters: <_:programlisting-2/> The "
27475#~ "<literal>{c_param_name}</literal> following the method parameter names "
27476#~ "tells <command>gmmproc</command> to map the C++ parameter to the "
27477#~ "specified C parameter within the <literal>{}</literal>. Since the C++ "
27478#~ "parameter names correspond to the C ones, the above could be re-written "
27479#~ "as: <_:programlisting-3/>"
27480#~ msgstr ""
27481#~ "För alla makron som bearbetar metodsignaturer är det möjligt att ange en "
27482#~ "annan ordning för C++-parametrarna än den befintliga ordningen i C-"
27483#~ "funktionen, virtuella funktionen eller signalen. Säg exempelvis att "
27484#~ "följande C-funktion omslöts som en C++-metod för <classname>Gtk::Widget</"
27485#~ "classname>-klassen: <_:programlisting-1/> Att ändra ordningen på C++-"
27486#~ "metodens parametrar är dock nödvändigt. Något liknande det följande "
27487#~ "skulle omsluta funktionen som en C++-metod med en annan ordning för de "
27488#~ "två parametrarna: <_:programlisting-2/> <literal>{c_param_name}</literal> "
27489#~ "som följer metodparameternamnen säger till <command>gmmproc</command> att "
27490#~ "mappa C++-parametern till den angivna C-parametern i <literal>{}</"
27491#~ "literal>. Eftersom C++-parameternamn motsvarar de i C kommer det ovan "
27492#~ "skrivas om som: <_:programlisting-3/>"
27493 
27494#, fuzzy
27495#~ msgid ""
27496#~ "For all macros processing method signatures except "
27497#~ "<function>_WRAP_SIGNAL()</function> and <function>_WRAP_VFUNC()</"
27498#~ "function> it is also possible to make the parameters optional so that "
27499#~ "extra C++ methods are generated without the specified optional parameter. "
27500#~ "For example, say that the following <function>*_new()</function> function "
27501#~ "were being wrapped as a constructor in the <classname>Gtk::ToolButton</"
27502#~ "classname> class: <_:programlisting-1/> Also, say that the C API allowed "
27503#~ "NULL for the function's <parameter>label</parameter> parameter so that "
27504#~ "that parameter is optional. It would be possible to have "
27505#~ "<command>gmmproc</command> generate the original constructor (with all "
27506#~ "the parameters) along with an additional constructor without that "
27507#~ "optional parameter by appending a <literal>{?}</literal> to the parameter "
27508#~ "name like so: <_:programlisting-2/> In this case, two constructors would "
27509#~ "be generated: One with the optional parameter and one without it."
27510#~ msgstr ""
27511#~ "För alla makron som bearbetar metodsignaturer förutom "
27512#~ "<function>_WRAP_SIGNAL()</function> och <function>_WRAP_VFUNC()</"
27513#~ "function> är det också möjligt att göra parametrarna valfria så att extra "
27514#~ "C++-metoder genereras utan den angivna valfria parametern. Om vi "
27515#~ "exempelvis säger att följande <function>*_new()</function>-funktion "
27516#~ "omslöts som en konstruktor i klassen <classname>Gtk::ToolButton</"
27517#~ "classname>: <_:programlisting-1/> Säg också att C-API:t tillät NULL för "
27518#~ "funktionens parameter <parameter>label</parameter> så att den parametern "
27519#~ "är valfri. Det skulle vara möjligt att få <command>gmmproc</command> att "
27520#~ "generera den ursprungliga konstruktorn (med alla parametrar) tillsammans "
27521#~ "med ytterligare en konstruktor utan den valfria parametern genom att "
27522#~ "lägga till ett <literal>{?}</literal> till parameternamnet så här: <_:"
27523#~ "programlisting-2/> I detta fall skulle två konstruktorer genereras: En "
27524#~ "med den valfria parametern och en utan den."
27525 
27526#, fuzzy
27527#~ msgid ""
27528#~ "With <function>_WRAP_METHOD()</function> it is also possible for the "
27529#~ "return of the wrapped C function (if it has one) to be placed in an "
27530#~ "output parameter of the C++ method instead of having the C++ method also "
27531#~ "return a value like the C function does. To do that, simply include the "
27532#~ "output parameter in the C++ method parameter list appending a "
27533#~ "<literal>{OUT}</literal> to the output parameter name. For example, if "
27534#~ "<function>gtk_widget_get_request_mode()</function> is declared as the "
27535#~ "following: <_:programlisting-1/> And having the C++ method set an output "
27536#~ "parameter is desired instead of returning a <type>SizeRequestMode</type>, "
27537#~ "something like the following could be used: <_:programlisting-2/> The "
27538#~ "<literal>{OUT}</literal> appended to the name of the <parameter>mode</"
27539#~ "parameter> output parameter tells <command>gmmproc</command> to place the "
27540#~ "return of the C function in that output parameter. In this case, however, "
27541#~ "a necessary initialization macro like the following would also have to be "
27542#~ "specified: <_:programlisting-3/> Which could also be written as: <_:"
27543#~ "programlisting-4/>"
27544#~ msgstr ""
27545#~ "Med <function>_WRAP_METHOD()</function> är det också möjligt för "
27546#~ "returvärdet av den omslutna C-funktionen (om den har något) att placeras "
27547#~ "i en utdataparameter för C++-metoden i stället för att även C++-metoden "
27548#~ "också ska returnera ett värde som C-funktionen gör. För att göra det "
27549#~ "inkluderar du helt enkelt utdataparametern i C++-metodens parameterlista "
27550#~ "och lägger till ett <literal>{OUT}</literal> till utdataparameterns namn. "
27551#~ "Om exempelvis <function>gtk_widget_get_request_mode()</function> "
27552#~ "deklareras enligt följande: <_:programlisting-1/> och det är önskvärt att "
27553#~ "låta C++-metoden ställa in en utdataparameter i stället för att returnera "
27554#~ "ett <type>SizeRequestMode</type>, så kan något i stil med följande "
27555#~ "användas: <_:programlisting-2/> <literal>{OUT}</literal> som läggs till "
27556#~ "namnet på utdataparametern <parameter>mode</parameter> säger till "
27557#~ "<command>gmmproc</command> att placera C-funktionens returvärde i den "
27558#~ "utdataparametern. I detta fall kommer dock ett nödvändigt "
27559#~ "initieringsmakro som det följande också behöva anges: <_:programlisting-3/"
27560#~ "> Vilket också skulle kunna skrivas som: <_:programlisting-4/>"
27561 
27562#~ msgid ""
27563#~ "This compiler error might look like this: <_:programlisting-1/> or this: "
27564#~ "<_:programlisting-2/>"
27565#~ msgstr ""
27566#~ "Detta kompileringsfel kan se ut så här: <_:programlisting-1/> eller så "
27567#~ "här: <_:programlisting-2/>"
27568 
27569#~ msgid "Widget Name and CSS Node Name"
27570#~ msgstr "Komponentnamn och CSS-nodnamn"
27571 
27572#, fuzzy
27573#~ msgid ""
27574#~ "<classname>MessageDialog</classname> is a convenience class, used to "
27575#~ "create simple, standard message dialogs, with a message and buttons for "
27576#~ "user response. You can specify the type of message and the text in the "
27577#~ "constructor, as well as specifying standard buttons via the <type>Gtk::"
27578#~ "ButtonsType</type> enum."
27579#~ msgstr ""
27580#~ "<classname>MessageDialog</classname> är en bekvämlighetsklass, som "
27581#~ "används för att skapa enkla standardmeddelandedialoger med ett meddelande "
27582#~ "och knappar för svar från användaren. Du kan ange meddelandetypen och "
27583#~ "texten i konstruktorn, såväl som att ange standardknappar via <type>Gtk::"
27584#~ "ButtonsType</type>-uppräkningen."
27585 
27586#~ msgid ""
27587#~ "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
27588#~ "tree/master/examples/book/dialogs/messagedialog\">Source Code</link>"
27589#~ msgstr ""
27590#~ "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
27591#~ "tree/master/examples/book/dialogs/messagedialog\">Källkod</link>"
27592 
27593#~ msgid ""
27594#~ "The <classname>FileChooserDialog</classname> is suitable for use with "
27595#~ "\"Open\" or \"Save\" menu items."
27596#~ msgstr ""
27597#~ "<classname>FileChooserDialog</classname> är lämplig för användning med "
27598#~ "menyobjekten ”Öppna” eller ”Spara”."
27599 
27600#~ msgid "FileChooser"
27601#~ msgstr "FileChooser"
27602 
27603#, fuzzy
27604#~ msgid ""
27605#~ "The <classname>ColorChooserDialog</classname> allows the user to choose a "
27606#~ "color. The <classname>ColorButton</classname> opens a color selection "
27607#~ "dialog when it is clicked."
27608#~ msgstr ""
27609#~ "<classname>ColorChooserDialog</classname> låter användaren välja en färg. "
27610#~ "<classname>ColorButton</classname> öppnar en färgvalsdialog när den "
27611#~ "klickas på."
27612 
27613#, fuzzy
27614#~ msgid ""
27615#~ "The <classname>FontChooserDialog</classname> allows the user to choose a "
27616#~ "font. The <classname>FontButton</classname> opens a font chooser dialog "
27617#~ "when it is clicked."
27618#~ msgstr ""
27619#~ "<classname>FontChooserDialog</classname> låter användaren välja ett "
27620#~ "typsnitt. <classname>FontButton</classname>-knappen öppnar en "
27621#~ "typsnittsväljardialog när den klickas på."
27622 
27623#~ msgid ""
27624#~ "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
27625#~ "tree/master/examples/book/dialogs/fontchooserdialog\">Source Code</link>"
27626#~ msgstr ""
27627#~ "<link xlink:href=\"https://gitlab.gnome.org/GNOME/gtkmm-documentation/"
27628#~ "tree/master/examples/book/dialogs/fontchooserdialog\">Källkod</link>"
27629 
27630#, fuzzy
27631#~ msgid ""
27632#~ "Your widget class, whether it's derived directly from <classname>Gtk::"
27633#~ "Widget</classname> or from another widget class, can read some style "
27634#~ "information from a CSS (Cascading Style Sheets) file. The users of your "
27635#~ "widget, or the users of an application program with your widget, can then "
27636#~ "modify the style of your widget without modifying the source code. Useful "
27637#~ "classes are <classname>Gtk::StyleContext</classname> and <classname>Gtk::"
27638#~ "CssProvider</classname>. With the methods of <classname>Gtk::"
27639#~ "StyleContext</classname> you can read the values of your widget's style "
27640#~ "information. CSS files are described in the documentation of "
27641#~ "<application>GTK</application>. The following example shows a simple use "
27642#~ "of <methodname>Gtk::StyleContext::get_padding()</methodname>."
27643#~ msgstr ""
27644#~ "Din komponentklass kan läsa viss stilinformation från en CSS-fil "
27645#~ "(Cascading Style Sheets), oavsett om den härleds direkt från "
27646#~ "<classname>Gtk::Widget</classname> eller från en annan komponentklass. "
27647#~ "Användarna av din komponent, eller användarna av ett program med din "
27648#~ "komponent, kan sedan ändra stilen för din komponent utan att ändra "
27649#~ "källkoden. Användbara klasser är <classname>Gtk::StyleContext</classname> "
27650#~ "och <classname>Gtk::CssProvider</classname>. Med metoderna i "
27651#~ "<classname>Gtk::StyleContext</classname> kan du läsa värden för din "
27652#~ "komponents stilinformation. CSS-filer beskrivs i dokumentationen för "
27653#~ "<application>GTK</application>. Följande exempel visar enkel användning "
27654#~ "av <methodname>Gtk::StyleContext::get_padding()</methodname>."
27655 
27656#, no-wrap
27657#~ msgid ""
27658#~ "\n"
27659#~ "gboolean gtk_icon_view_get_cell_rect(GtkIconView* icon_view,\n"
27660#~ "  GtkTreePath* path, GtkCellRenderer* cell, GdkRectangle* rect);\n"
27661#~ msgstr ""
27662#~ "\n"
27663#~ "gboolean gtk_icon_view_get_cell_rect(GtkIconView* icon_view,\n"
27664#~ "  GtkTreePath* path, GtkCellRenderer* cell, GdkRectangle* rect);\n"
27665 
27666#, no-wrap
27667#~ msgid ""
27668#~ "\n"
27669#~ "_WRAP_METHOD(bool get_cell_rect(const TreeModel::Path&amp; path,\n"
27670#~ "  const CellRenderer&amp; cell, Gdk::Rectangle&amp; rect{&gt;&gt;}) const,\n
 >"
27671#~ "  gtk_icon_view_get_cell_rect)\n"
27672#~ msgstr ""
27673#~ "\n"
27674#~ "_WRAP_METHOD(bool get_cell_rect(const TreeModel::Path&amp; path,\n"
27675#~ "  const CellRenderer&amp; cell, Gdk::Rectangle&amp; rect{&gt;&gt;}) const,\n
 >"
27676#~ "  gtk_icon_view_get_cell_rect)\n"
27677 
27678#, no-wrap
27679#~ msgid ""
27680#~ "\n"
27681#~ "_INITIALIZATION(`Gdk::Rectangle&amp;',`GdkRectangle',`$3 = Glib::wrap(&amp;(
 >$4))')\n"
27682#~ msgstr ""
27683#~ "\n"
27684#~ "_INITIALIZATION(`Gdk::Rectangle&amp;',`GdkRectangle',`$3 = Glib::wrap(&amp;(
 >$4))')\n"
27685 
27686# TODO: Fixed sep 2022?
27687#~ msgid ""
27688#~ "At the time of writing (July 2022) drag-and-drop in <classname>Gtk::"
27689#~ "TreeView</classname>s does not work. See the <link xlink:href=\"https://"
27690#~ "gitlab.gnome.org/GNOME/gtk/-/issues/3649\">gtk#3649 issue</link> for the "
27691#~ "latest info."
27692#~ msgstr ""
27693#~ "I skrivande stund (juli 2022) fungerar inte dra-och-släpp i "
27694#~ "<classname>Gtk::TreeView</classname>. Se <link xlink:href=\"https://"
27695#~ "gitlab.gnome.org/GNOME/gtk/-/issues/3649\">ärendet gtk#3649</link> för "
27696#~ "den senaste informationen."
27697 
27698#~ msgid "An preference dialog"
27699#~ msgstr "En inställningsdialog"

Note: both files are merged with latest POT file.