Minor Direction Padding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Minor Direction Padding

Dan Norton
Greetings,

Four LayoutSpec class methods use "minorDirectionPadding:" as a keyword. The parameter
can be a number or one of: #top, #left, #center, #right, or #bottom. AFAICT when the
parameter is a number, it refers to the padding which will be applied in the minor direction.
When it is a symbol, it effectively specifies that morphs will be located as the symbol name
implies.

Attached are four convenience methods whose keyword emphasizes the visible (morph)
instead of the invisible (padding). The "morphPlacement:" parameter can be  #top, #left,
#center, #right, or #bottom. The methods are:

LayoutSpec class>>fixedWidth:fixedHeight:morphPlacement:
LayoutSpec class>>fixedWidth:proportionalHeight:morphPlacement:
LayoutSpec class>>proportionalWidth:fixedHeight:morphPlacement:
LayoutSpec class>>proportionalWidth:proportionalHeight:morphPlacement:

Are these worth having in the base system?

 - Dan


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org

LayoutSpec class-convenience.zip (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Minor Direction Padding

Juan Vuletich-4
Hi Dan,

On 7/5/2015 8:35 PM, Dan Norton wrote:

> Greetings,
>
> Four LayoutSpec class methods use "minorDirectionPadding:" as a keyword. The parameter
> can be a number or one of: #top, #left, #center, #right, or #bottom. AFAICT when the
> parameter is a number, it refers to the padding which will be applied in the minor direction.
> When it is a symbol, it effectively specifies that morphs will be located as the symbol name
> implies.
>
> Attached are four convenience methods whose keyword emphasizes the visible (morph)
> instead of the invisible (padding). The "morphPlacement:" parameter can be  #top, #left,
> #center, #right, or #bottom. The methods are:
>
> LayoutSpec class>>fixedWidth:fixedHeight:morphPlacement:
> LayoutSpec class>>fixedWidth:proportionalHeight:morphPlacement:
> LayoutSpec class>>proportionalWidth:fixedHeight:morphPlacement:
> LayoutSpec class>>proportionalWidth:proportionalHeight:morphPlacement:
>
> Are these worth having in the base system?
>
>   - Dan
>

I'd rather replace the keyword 'minorDirectionPadding:' by
'minorDirectionPlacement:' to:
- Avoid ambiguity
- Avoid duplication

What do you all think?

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Minor Direction Padding

Dan Norton
On 6 Jul 2015 at 10:33, Juan Vuletich wrote:

> Hi Dan,
>
> On 7/5/2015 8:35 PM, Dan Norton wrote:
> > Greetings,
> >
> > Four LayoutSpec class methods use "minorDirectionPadding:" as a
> keyword. The parameter
> > can be a number or one of: #top, #left, #center, #right, or
> #bottom. AFAICT when the
> > parameter is a number, it refers to the padding which will be
> applied in the minor direction.
> > When it is a symbol, it effectively specifies that morphs will be
> located as the symbol name
> > implies.
> >
> > Attached are four convenience methods whose keyword emphasizes the
> visible (morph)
> > instead of the invisible (padding). The "morphPlacement:"
> parameter can be  #top, #left,
> > #center, #right, or #bottom. The methods are:
> >
> > LayoutSpec class>>fixedWidth:fixedHeight:morphPlacement:
> > LayoutSpec class>>fixedWidth:proportionalHeight:morphPlacement:
> > LayoutSpec class>>proportionalWidth:fixedHeight:morphPlacement:
> > LayoutSpec
> class>>proportionalWidth:proportionalHeight:morphPlacement:
> >
> > Are these worth having in the base system?
> >
> >   - Dan
> >
>
> I'd rather replace the keyword 'minorDirectionPadding:' by
> 'minorDirectionPlacement:' to:
> - Avoid ambiguity
> - Avoid duplication
>
OK, as far as the duplication, but I don't see "morphPlacement:" in use. Where does the
ambiguity occur?

 - Dan

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Minor Direction Padding

Juan Vuletich-4
On 7/6/2015 12:37 PM, Dan Norton wrote:

> On 6 Jul 2015 at 10:33, Juan Vuletich wrote:
>
>> Hi Dan,
>>
>> On 7/5/2015 8:35 PM, Dan Norton wrote:
>>> Greetings,
>>>
>>> Four LayoutSpec class methods use "minorDirectionPadding:" as a
>> keyword. The parameter
>>> can be a number or one of: #top, #left, #center, #right, or
>> #bottom. AFAICT when the
>>> parameter is a number, it refers to the padding which will be
>> applied in the minor direction.
>>> When it is a symbol, it effectively specifies that morphs will be
>> located as the symbol name
>>> implies.
>>>
>>> Attached are four convenience methods whose keyword emphasizes the
>> visible (morph)
>>> instead of the invisible (padding). The "morphPlacement:"
>> parameter can be  #top, #left,
>>> #center, #right, or #bottom. The methods are:
>>>
>>> LayoutSpec class>>fixedWidth:fixedHeight:morphPlacement:
>>> LayoutSpec class>>fixedWidth:proportionalHeight:morphPlacement:
>>> LayoutSpec class>>proportionalWidth:fixedHeight:morphPlacement:
>>> LayoutSpec
>> class>>proportionalWidth:proportionalHeight:morphPlacement:
>>> Are these worth having in the base system?
>>>
>>>    - Dan
>>>
>> I'd rather replace the keyword 'minorDirectionPadding:' by
>> 'minorDirectionPlacement:' to:
>> - Avoid ambiguity
>> - Avoid duplication
>>
> OK, as far as the duplication, but I don't see "morphPlacement:" in use. Where does the
> ambiguity occur?
>
>   - Dan

The ambiguity in 'morphPlacement' is that it suggest it is about x and y
placement. It is only for the 'minor' direction: x if a column, y if a
row. Major direction placement is dictated by the other arguments, and
siblings, etc.

Does this make sense?

Cheers,
Juan Vuletich

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: Minor Direction Padding

Dan Norton
On 20 Jul 2015 at 22:28, Juan Vuletich wrote:

> On 7/6/2015 12:37 PM, Dan Norton wrote:
> > On 6 Jul 2015 at 10:33, Juan Vuletich wrote:
> >
> >> Hi Dan,
> >>
> >> On 7/5/2015 8:35 PM, Dan Norton wrote:
> >>> Greetings,
> >>>
> >>> Four LayoutSpec class methods use "minorDirectionPadding:" as
> a
> >> keyword. The parameter
> >>> can be a number or one of: #top, #left, #center, #right, or
> >> #bottom. AFAICT when the
> >>> parameter is a number, it refers to the padding which will be
> >> applied in the minor direction.
> >>> When it is a symbol, it effectively specifies that morphs will
> be
> >> located as the symbol name
> >>> implies.
> >>>
> >>> Attached are four convenience methods whose keyword emphasizes
> the
> >> visible (morph)
> >>> instead of the invisible (padding). The "morphPlacement:"
> >> parameter can be  #top, #left,
> >>> #center, #right, or #bottom. The methods are:
> >>>
> >>> LayoutSpec class>>fixedWidth:fixedHeight:morphPlacement:
> >>> LayoutSpec
> class>>fixedWidth:proportionalHeight:morphPlacement:
> >>> LayoutSpec
> class>>proportionalWidth:fixedHeight:morphPlacement:
> >>> LayoutSpec
> >> class>>proportionalWidth:proportionalHeight:morphPlacement:
> >>> Are these worth having in the base system?
> >>>
> >>>    - Dan
> >>>
> >> I'd rather replace the keyword 'minorDirectionPadding:' by
> >> 'minorDirectionPlacement:' to:
> >> - Avoid ambiguity
> >> - Avoid duplication
> >>
> > OK, as far as the duplication, but I don't see "morphPlacement:"
> in use. Where does the
> > ambiguity occur?
> >
> >   - Dan
>
> The ambiguity in 'morphPlacement' is that it suggest it is about x
> and y
> placement. It is only for the 'minor' direction: x if a column, y if
> a
> row. Major direction placement is dictated by the other arguments,
> and
> siblings, etc.
>
> Does this make sense?
>

+1

 - Dan

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org