![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/thread-self/root/usr/share/doc/renaissance-doc/html/manual/ |
Upload File : |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>1.10 How AutoLayout flags are determined</TITLE> <META NAME="description" CONTENT="1.10 How AutoLayout flags are determined"> <META NAME="keywords" CONTENT="manual"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="manual.css"> <LINK REL="next" HREF="node13.html"> <LINK REL="previous" HREF="node11.html"> <LINK REL="up" HREF="node2.html"> <LINK REL="next" HREF="node13.html"> </HEAD> <BODY BGCOLOR="#FFFFFF" text="#000000" link="#0000FF" vlink="#4444FF" alink="#3388FF"> <B> Next: <A NAME="tex2html431" HREF="node13.html">1.11 Borders</A> </B> <B>Up: <A NAME="tex2html427" HREF="node2.html">1. Renaissance AutoLayout</A> </B> <B> Previous: <A NAME="tex2html421" HREF="node11.html">1.9 AutoLayout flags</A> </B> <BR> <P> <!--End of Navigation Panel--> <H1><A NAME="SECTION002100000000000000000"> 1.10 How AutoLayout flags are determined</A> </H1> When a container manages a view, it has to determine the align flags of the view. When the view is first added, the container calls the method <TT>-autolayoutDefaultHorizontalAlignment</TT> of the view, to get its horizontal align flag, and the method <TT>-autolayoutDefaultVerticalAlignment</TT> to get its vertical align flag. If the values returned by those methods are not appropriate, it is possible to change the flags by calling methods of the container manually for each view (for example, for boxes, by calling the method <TT>-setHorizontalAlignment:forView:</TT>). Any flag manually set will override the default flags. <P> Renaissance AutoLayout adds a category to NSView, implementing the following methods: <P> <UL> <LI><TT>- (GSAutoLayoutAlignment) autolayoutDefaultHorizontalAlignment</TT>, which should return the default alignment in the horizontal direction for that view (given the view's class and attributes). </LI> <LI><TT>- (GSAutoLayoutAlignment) autolayoutDefaultVerticalAlignment</TT>, which should return the default alignment in the vertical direction for that view (given the view's class and attributes). </LI> </UL> <P> The default implementation of those methods in <TT>NSView</TT> returns <TT>GSAutoLayoutAlignCenter</TT> for both of them; Renaissance AutoLayout also provides implementations of those methods (as categories) for most standard AppKit classes; generally returning <TT>GSAutoLayoutExpand</TT> if the control benefits from being expanded in a direction, and <TT>GSAutoLayoutAlignCenter</TT> otherwise. <P> You should implement those methods in your subclasses to make sure they interact properly with Renaissance AutoLayout. <P> <HR><B> Next: <A NAME="tex2html431" HREF="node13.html">1.11 Borders</A> </B> <B>Up: <A NAME="tex2html427" HREF="node2.html">1. Renaissance AutoLayout</A> </B> <B> Previous: <A NAME="tex2html421" HREF="node11.html">1.9 AutoLayout flags</A> </B> <!--End of Navigation Panel--> <ADDRESS> 2008-03-19 </ADDRESS> </BODY> </HTML>