Yet another Bevel Tool

I posted a new version of my old bevel tool.

The newer IDE has a bevel editing feature, but this one might be more fun to play with. Or not. :slight_smile:

Here’s a screen shot:

1 Like

A suggestion would be a way to save and restore settings. To keep it simple use an INI format with a file extension Bevel.

Often I use a PANEL to create a lines to separate parts of the window.

1 Like

That’s pretty neat-o, Carl. And thanks for the suggestion.

The screen shot in this post added to your ReadMe.MD would help to understand.

The Markup for having it in an “Images” subfolder:

![Screen Shot](images/ScreenCapBT.png)

That was my original intent. Thanks.
I could have sworn that I have added images my .md files through the github web interface before via D&D or copy/paste. Maybe that was MS Team Services.

I have a similar more compact Hex function that does the BShift / BAnd once.

L       BYTE,DIM(4),OVER(LngAdj)
Hex     STRING('0123456789ABCDEF'),STATIC
  LngAdj = BAND(BSHIFT(Lng, -4),0F0F0F0Fh) + 01010101h
  HX[1]=HEX[L[4]] ; HX[3]=HEX[L[3]] ; HX[5]=HEX[L[2]] ; HX[7]=HEX[L[1]]
  LngAdj=BAND(Lng,0F0F0F0Fh)  + 01010101h
  HX[2]=HEX[L[4]] ; HX[4]=HEX[L[3]] ; HX[6]=HEX[L[2]] ; HX[8]=HEX[L[1]]

Thanks Carl. I’ve been using ultoa() quite a bit as well. I used to use ltoa(), but was having issues with the signed bit sometimes.

My Window Preview class Resize Control WYSIWYG window has Bevel settings to allow designing on a live window. It is very compact so the resizer window can be small. The edges are set using pop ups.

On the bottom right is a button that pops up some of my favorites:

I think you gave me many of these. You can add this popup to BT.

Ib &LONG        !Inner Bevel
Ob &LONG        !Outer Bevel
Sb &LONG        !Bevel Style 
Wb LONG         !Width for lines
Hb LONG         !Height for Lines
  Ib &= Poz:BevelIn 
  Ob &= Poz:BevelOut 
  Sb &= Poz:BevelSty
  EXECUTE POPUP('Rectange{{Sunk|Raised|Ridge|Valley|Entry|Button}|Line{{Vert Grab|Vert Spacer|Vert Sunk|-|Horz Grab|Hort Spacer|Horz Sunk}')
  BEGIN ; Ib=0  ; Ob=-3 ; Sb=0            ; .  !Rect Sunk
  BEGIN ; Ib=0  ; Ob=3  ; Sb=0            ; .  !Rect Raised
  BEGIN ; Ib=-2 ; Ob=2  ; Sb=0            ; .  !Rect Ridge
  BEGIN ; Ib=2  ; Ob=-2 ; Sb=0            ; .  !Rect Valley
  BEGIN ; Ib=-1 ; Ob=-1 ; Sb=0            ; .  !Rect Entry
  BEGIN ; Ib=1  ; Ob=1  ; Sb=0            ; .  !Rect Button
  BEGIN ; Ib=0  ; Ob=0  ; Sb=4488h ; Wb=2 ; .  !Vert Line Grab
  BEGIN ; Ib=0  ; Ob=0  ; Sb=6000h ; Wb=1 ; .  !Vert Line Spacer
  BEGIN ; Ib=0  ; Ob=2  ; Sb=6000h ; Wb=1 ; .  !Vert Line Sunk
  BEGIN ; Ib=0  ; Ob=0  ; Sb=4488h ; Hb=2 ; .  !Horz Line Grab
  BEGIN ; Ib=0  ; Ob=0  ; Sb=0600h ; Hb=2 ; .  !Horz Line Spacer
  BEGIN ; Ib=0  ; Ob=2  ; Sb=0600h ; Hb=2 ; .  !Horz Line Sunk
1 Like

nice, smart etc. but…what is a bevel tool ? Purpose ?

Some controls have a BEVEL attribute. In the old days, there was no visual utility for determining which of the 16 bits of the STYLE should be on or off. So it seemed like “magic” and guesswork to set the bevel STYLE attribute.
So, after reading an article about bevels by Lisa Vaughn of ToolCraft, I wrote an example program called the Bevel Tool. That program “worked”, but the code was a bit klunky.

I re-wrote the logic to make use of the VALUE() setting of RADIO controls to manage the bits, thus decreasing the amount of translation code needed, and hopefully make bevels a little more self explanatory.

Whoa! That is a real step back in time.

Have not checked recently, but is it still true that using any bevel setting on a group prevents the text from being displayed? I have long thought a control that would just be the top horizontal line of a group could be very useful.

Correct a GROUP(‘Never See This’) with BEVEL(…) will NOT show ‘Never See This’

I agree I would like a Group(‘Text’) with just the top line showing. You can create that as a PROMPT and PANEL or GROUP. If you wanted to do it a lot you could make a CONTROL Template.

@jslarve I could not find my Tech Bulletin but I did find the Lisa Vaughn article on Bevels

Bevel_LisaVaughn_ClaWinJurn.PDF (763.9 KB)

Neat-o. Thank you Carl.