[brailleblaster] Re: Hanxiao's display example

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Wed, 18 Jul 2012 07:44:53 -0500

Hi Hanxiao, 

My answers to your questions are below. 

On Wed, Jul 18, 2012 at 05:32:11PM +0800, Hanxiao Fu wrote:
> Hi John,
> 
> 1. I remember that you said that users should be able to choose 
different
> styles from a drop-down list, where exactly do you want to put the list?
I don't have the menu in front of me at the moment, but I remember that 
there is an item called something like "select style". It should bring 
up a list of all the style properties files.

> 
> 2. Since you were talking about modifying a style's parameters, how do 
you
> want this be implemented? I'm thinking about a popup dialog that contains a
> form, where the labels will be "line-before" or "line-after" etc., and the
> corresponding input filed will be the values assigned to this style. There
> will be two buttons down the dialoge that allows users to save or discard
> this style. If the user want to save it, the style will be saved in a
> properties file with "style_" prefix followed by a customized style name or
> a default name, say 's' followed by a number. After that the new created
> style will be available to be chosen from the drop-down style list
> mentioned in my first comment.
This is a good approach. Of course, there will be some properties files 
for built-in styles in the dist/p;rogramData/setings diretory. If the 
user creates new styles they will go in his own settings directory. When 
a style is selected a new instance of the Style class will be created 
with the values in the corresponding properties file. Can we use a 
factory to do tghis?

> 
> 3. Note that the storing-different-styles-in-different-properties-files
> approach I suggest in my 2nd comment is what I am doing with the displaying
> and editing. Let me know if there are any suggestions about this.
This looks good. One caution is that the code should be easily 
extensible, because we will want to implement more features as 
develolppment proceeds, such as semantic actions.

> 
> Thanks,
> Hanxiao
> 
> 
> On Wed, Jul 18, 2012 at 2:48 PM, John J. Boyer <john.boyer@xxxxxxxxxxxxxxxxx
> > wrote:
> 
> > Hi Hanxiao,
> >
> > liblouisutdml has a semantic action called notranslate. This is assigned
> > to an xml tag enclosing a block of text which should not be translated.
> > When text iks locked in BrailleBlaster it should be enclosed in
> > something like <span class=locked)....</span>
> >
> > The Style class is just a skelton now. When it is instantiate, the user
> > is expected to assign appropriate values to the fields. LinesBefore and
> > linesAfter can have any reasonable values, including 0. The leftMargin,
> > firstLineIndent, etc. are percentages because the fonts may be
> > proportionally-spaced, so assigning values such as 2 spaces would be
> > inappropriate. don'tSplit means not to split a paragraph between pages.
> > I'm not sure of the difference between widoControl and orphanControl,
> > but they were introduced by a progvrammer who is using liblouisutdml
> > with OpenOffice.
> >
> > John
> >
> > On Wed, Jul 18, 2012 at 10:18:59AM +0800, Hanxiao Fu wrote:
> > > Hi all,
> > >
> > > It seems to me that, to implement the locking feature, we can construct
> > an
> > > array of ranges, where each range is represented by the index of start
> > and
> > > end of the content we want to "lock". Is there a case that we want to
> > > translate a document twice? If yes, why?
> > >
> > > Hi John,
> > >
> > > Here's the sample Style class you sent to me earlier:
> > >
> > > > class Style {
> > > >   int lines_before;
> > > >   int lines_after;
> > > >
> > >  For the above two cases, lines before and after, say they are both 2, so
> > > can users change it by deleting one of the lines? or they will be always
> > 2
> > > lines before and after, but users just won't be able to modify or even
> > > navigate to the lines?
> > >
> > > >   /* The following are percentages.*/
> > >
> > >   int left_margin;
> > > >   int first_line_indent;
> > > >   int right_margin;
> > > >   /* Various controls */
> > > >   boolean keep_with_next;
> > >
> > >   boolean dont_split;
> > > >
> > > What do "keep with next" and "dont split" mean?
> > >
> > > >   int orphan_control;
> > >
> > > I think this is always used with widow control, do we need to do that
> > too?
> > > and I suppose that it is type of int because users would be able to
> > select
> > > how many lines of a paragraph can be left on the next page?
> > >
> > > >
> > >
> > >   boolean newpage_before;
> > > >   boolean newpage_after;
> > > >   StyleFormat format; /*StyleFormat is an enumeration class*/
> > > >   /* used for output */
> > > >   String elementName;
> > > >   String attr1Name;
> > > >   String attr1Value;
> > > >   String attr2Name;
> > > >   String attr2Value;
> > > >   String attr3Name;
> > > >   String attr3Value;
> > > > }
> > >
> > >
> > > Thanks,
> > > Hanxiao
> > >
> > > On Tue, Jul 17, 2012 at 10:04 PM, François Ouellette <braille@xxxxxxx
> > >wrote:
> > >
> > > > Hanxiao: Locking means that we need to mark the original text as "not
> > > > translatable" using surrounding elements in the  UTDML part. We may
> > > > want to have this lock feature available also in the daisy window in
> > > > order to control how the translation works for special cases. For
> > > > example, if we have a sentence like:
> > > > "We use the letter k to express the work knowledge"
> > > > we do not want to translate the word "knowledge" into k when we do the
> > > > translation, so we will likely want to lock it in the daisy view right
> > > > from the start. Other products like DBT have that feature.
> > > >
> > > > I will soon check-in the code that I wrote that handles the windows so
> > > > you may want to add functionality on top of the new import and create
> > > > content functions.
> > > >
> > > > F.
> > > >
> > > > On Tue, Jul 17, 2012 at 7:39 AM, John J. Boyer <john@xxxxxxxxxxxxxx>
> > > > wrote:
> > > > > Hi Hanxiao,
> > > > >
> > > > > I'm glad to see you are still with us. I thought your job might be
> > > > > taking up all your time.
> > > > >
> > > > > Francois will have some comments on this thread also.
> > > > >
> > > > > On styles, BrailleBlaster styles are broader than StyledText styles.
> > As
> > > > > shown in the sample Style class I sent to the list a while ago they
> > > > > also include layout information and an element name and attributes
> > for
> > > > > creating new blocks in an xml file.
> > > > > I think Francois has done a lot of work on the two views that are
> > > > > created when UTDML is used. The left-hand pane contains the original
> > > > > print text corresponding to the translated Braille on the right. The
> > > > > left-hand pane is read-only. The Braille on the right can be edited,
> > but
> > > > > if it is, the edited portion is locked so that it will  not be
> > > > > re-translated. The locking feature is something we can implement when
> > > > > editing is working, but we should keep it in mind, so the code does
> > not
> > > > > make it harder to implement.
> > > > >
> > > > > We must also provide the user with a way of switching from the
> > Dual-pane
> > > > > view of UTDML to a view of the xml file as it was before UTDML was
> > added
> > > > > in the left-hand pane. This is then editable. If the user then
> > > > > translates it using non-UTDML it remains editable, but the braille on
> > > > > the right is read-only.
> > > > >
> > > > > John
> > > > >
> > > > > On Tue, Jul 17, 2012 at 04:45:45PM +0800, Hanxiao Fu wrote:
> > > > >> Hi all,
> > > > >>
> > > > >> My pace is slow, but I'm still working on displaying and editing.
> > Here
> > > > are
> > > > >> some questions:
> > > > >>
> > > > >> 1.What specific styles are we going to support? I can set and
> > maintain
> > > > >> layout settings and font infomation like font size and color now.
> > But I
> > > > >> wonder what other styles I should work on next.
> > > > >>
> > > > >> 2. I remember you might have said that we need to sychronize the two
> > > > views
> > > > >> when users edit the content of any one of the two. Can you please
> > > > further
> > > > >> explain it?
> > > > >>
> > > > >> Thanks,
> > > > >> Hanxiao
> > > > >>
> > > > >>
> > > > >> On Mon, Jul 16, 2012 at 12:09 AM, John J. Boyer <
> > > > >> john.boyer@xxxxxxxxxxxxxxxxx> wrote:
> > > > >>
> > > > >> > Hi Francois,
> > > > >> >
> > > > >> > This is great. The general approach is the one I would take, that
> > is,
> > > > >> > start fairly simple, but build in provissions for later
> > extensions.
> > > > >> >
> > > > >> > John
> > > > >> >
> > > > >> > On Sun, Jul 15, 2012 at 11:26:37AM -0400, Fran�ois Ouellette
> > wrote:
> > > > >> > > John: Thanks. We can probably use Hanxio's approach to build a
> > > > >> > > prototype, but we should make provision for the more complex
> > > > functions
> > > > >> > > as we build a foundation. Locking is feasible, as are other
> > features
> > > > >> > > if we have a flexible structure for the text editing functions.
> > > > Which
> > > > >> > > means that if we save the information in the text part of UTDML
> > we
> > > > can
> > > > >> > > easily reproduce the styles and other text features each time we
> > > > open
> > > > >> > > the file to do embossing or further editing. I looked at how
> > > > products
> > > > >> > > like DBT work and I think we can offer similar functions. DBT
> > uses
> > > > its
> > > > >> > > own proprietary file format, while BB will use an XML-based
> > file for
> > > > >> > > openness.
> > > > >> > >
> > > > >> > > Let me know if it makes sense, my brains is bubbling with ideas.
> > > > >> > >
> > > > >> > > François.
> > > > >> > >
> > > > >> > > On Sun, Jul 15, 2012 at 12:30 AM, John J. Boyer
> > > > >> > > <john.boyer@xxxxxxxxxxxxxxxxx> wrote:
> > > > >> > > > Hi Francois,
> > > > >> > > >
> > > > >> > > > We should save everything in the UTDML file. Locking is
> > > > reallyhard. It
> > > > >> > > > can be done after editing is taken care of.
> > > > >> > > >
> > > > >> > > > John
> > > > >> > > >
> > > > >> > > > On Sat, Jul 14, 2012 at 05:15:55PM -0400, Francois wrote:
> > > > >> > > >> John: I got all the emails. Displaying is the easy part.
> > > > Interactive
> > > > >> > > >> editing is the challenge, especially when comes the time to
> > lock
> > > > >> > words in
> > > > >> > > >> the Braille window, etc. Do we want to keep those markings
> > when
> > > > >> > saving the
> > > > >> > > >> the utdml file?
> > > > >> > > >>
> > > > >> > > >> François.
> > > > >> > > >>
> > > > >> > > >> -- sent from my ANDROID phone --
> > > > >> > > >> On 2012-07-14 4:40 PM, "John J. Boyer" <
> > > > john.boyer@xxxxxxxxxxxxxxxxx>
> > > > >> > wrote:
> > > > >> > > >>
> > > > >> > > >> > Here's the example that Hanxiao sent me about ten days ago
> > for
> > > > >> > > >> > d9isplaying a file. It may be good as a source of ideas,
> > > > though it
> > > > >> > needs
> > > > >> > > >> > further elaboration.
> > > > >> > > >> >
> > > > >> > > >> > John
> > > > >> > > >> >
> > > > >> > > >> > --
> > > > >> > > >> > John J. Boyer; President, Chief Software Developer
> > > > >> > > >> > Abilitiessoft, Inc.
> > > > >> > > >> > http://www.abilitiessoft.com
> > > > >> > > >> > Madison, Wisconsin USA
> > > > >> > > >> > Developing software for people with disabilities
> > > > >> > > >> >
> > > > >> > > >> >
> > > > >> > > >
> > > > >> > > > --
> > > > >> > > > John J. Boyer; President, Chief Software Developer
> > > > >> > > > Abilitiessoft, Inc.
> > > > >> > > > http://www.abilitiessoft.com
> > > > >> > > > Madison, Wisconsin USA
> > > > >> > > > Developing software for people with disabilities
> > > > >> > > >
> > > > >> > > >
> > > > >> >
> > > > >> > --
> > > > >> > John J. Boyer; President, Chief Software Developer
> > > > >> > Abilitiessoft, Inc.
> > > > >> > http://www.abilitiessoft.com
> > > > >> > Madison, Wisconsin USA
> > > > >> > Developing software for people with disabilities
> > > > >> >
> > > > >> >
> > > > >> >
> > > > >
> > > > > --
> > > > > John J. Boyer, Executive Director
> > > > > GodTouches Digital Ministry, Inc.
> > > > > http://www.godtouches.org
> > > > > Madison, Wisconsin, USA
> > > > > Peace, Love, Service
> > > > >
> > > > >
> > > >
> > > >
> >
> > --
> > John J. Boyer; President, Chief Software Developer
> > Abilitiessoft, Inc.
> > http://www.abilitiessoft.com
> > Madison, Wisconsin USA
> > Developing software for people with disabilities
> >
> >
> >

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: