Skip to content

Commit

Permalink
Cargo doc auto deployment 2024-05-05 13:48:38.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigocfd committed May 5, 2024
1 parent 6e8599d commit 246ec09
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
2 changes: 1 addition & 1 deletion search-index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion search.desc/winsafe/winsafe-desc-2-.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion search.desc/winsafe/winsafe-desc-3-.js

Large diffs are not rendered by default.

44 changes: 43 additions & 1 deletion src/winsafe/gui/native_controls/header_item.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,30 @@
<a href="#213" id="213">213</a>
<a href="#214" id="214">214</a>
<a href="#215" id="215">215</a>
<a href="#216" id="216">216</a>
<a href="#217" id="217">217</a>
<a href="#218" id="218">218</a>
<a href="#219" id="219">219</a>
<a href="#220" id="220">220</a>
<a href="#221" id="221">221</a>
<a href="#222" id="222">222</a>
<a href="#223" id="223">223</a>
<a href="#224" id="224">224</a>
<a href="#225" id="225">225</a>
<a href="#226" id="226">226</a>
<a href="#227" id="227">227</a>
<a href="#228" id="228">228</a>
<a href="#229" id="229">229</a>
<a href="#230" id="230">230</a>
<a href="#231" id="231">231</a>
<a href="#232" id="232">232</a>
<a href="#233" id="233">233</a>
<a href="#234" id="234">234</a>
<a href="#235" id="235">235</a>
<a href="#236" id="236">236</a>
</pre></div><pre class="rust"><code><span class="kw">use </span><span class="kw">crate</span>::co;
<span class="kw">use </span><span class="kw">crate</span>::decl::<span class="kw-2">*</span>;
<span class="kw">use </span><span class="kw">crate</span>::gui::<span class="kw-2">*</span>;
<span class="kw">use </span><span class="kw">crate</span>::gui::{<span class="kw-2">*</span>, privs::<span class="kw-2">*</span>};
<span class="kw">use </span><span class="kw">crate</span>::kernel::privs::<span class="kw-2">*</span>;
<span class="kw">use </span><span class="kw">crate</span>::msg::<span class="kw-2">*</span>;
<span class="kw">use </span><span class="kw">crate</span>::prelude::<span class="kw-2">*</span>;
Expand Down Expand Up @@ -406,6 +427,27 @@
}
}

<span class="doccomment">/// Sets the width of the item by sending a
/// [`hdm::SetItem`](crate::msg::hdm::SetItem) message.
///
/// Width will be adjusted to match current system DPI.
</span><span class="kw">pub fn </span>set_width(<span class="kw-2">&amp;</span><span class="self">self</span>, width: u32) {
<span class="kw">let </span><span class="kw-2">mut </span>col_cx = SIZE::new(width <span class="kw">as _</span>, <span class="number">0</span>);
multiply_dpi(<span class="prelude-val">None</span>, <span class="prelude-val">Some</span>(<span class="kw-2">&amp;mut </span>col_cx)).unwrap();

<span class="kw">let </span><span class="kw-2">mut </span>hdi = HDITEM::default();
hdi.mask = co::HDI::WIDTH;
hdi.cxy = col_cx.cx;

<span class="kw">unsafe </span>{
<span class="self">self</span>.owner.hwnd()
.SendMessage(hdm::SetItem {
index: <span class="self">self</span>.index,
hditem: <span class="kw-2">&amp;</span>hdi,
});
}
}

<span class="doccomment">/// Retrieves the text of the item by sending a
/// [`hdm::GetItem`](crate::msg::hdm::GetItem) message.
</span><span class="attr">#[must_use]
Expand Down
Loading

0 comments on commit 246ec09

Please sign in to comment.