msc@ramoth.esd.sgi.com (Mark Callow) (05/01/90)
In article <1990Apr27.143504.3705@eagle.lerc.nasa.gov>, pstowne@zargon.lerc.nasa.gov (Charles E. Towne) writes: |> Is it possible to define a default position and size for the window |> created when using psview? I know about using prefposition in my |> user.ps file. According to T fine M, the name to be used with |> prefposition for NeWS programs is the one assigned by IconLabel. |> However, IconLabel isn't used in any of the sources I have for |> psview (in /usr/NeWS/clientsrc). You are right. Psview defines its own PaintIcon functions which just paints the FrameLabel. There isn't any way to define a default position. Since you have the source you can go ahead and change psview yourself. Just define IconLabel as (psview) or as FrameLabel, which is the name of the file being previewed, depending on your preference. The window for changes to the forthcoming software release just closed so you won't be seeing a fix from us in the near future. Note you can use the -F option to give Frame a fixed size window suitable for an 8.5 * 11 inch page. I find this a lot more convenient than having to stretch out the window. -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "There is much virtue in a window. It is to a human being as a frame is to a painting, as a proscenium to a play. It strongly defines its content."
pstowne@zargon.lerc.nasa.gov (Charles E. Towne) (05/04/90)
In an earlier article I asked about defining a default position and size for the psview window. Prefposition doesn't work with psview. Mark Callow at SGI (msc@ramoth.sgi.com) responded: >You are right. Psview defines its own PaintIcon functions which just >paints the FrameLabel. There isn't any way to define a default position. > >Note you can use the -F option to give Frame a fixed size window suitable ^^^^^ he really means psview >for an 8.5 * 11 inch page. I find this a lot more convenient than having >to stretch out the window. This works nicely, and does most of what I wanted. Thanks, Mark. By looking at the source code for psview, I discovered there are, apparently, several options like this that aren't documented in the printed or on-line man page. I'm not a C or NeWS programmer (not yet, anyway :-)), so I'm not sure what they all do. Could someone knowledgeable describe these options? (Or, even better, post or point the way to an up-to-date man page for psview?) Thanks. -- Charles E. Towne Email: pstowne@zargon.lerc.nasa.gov MS 5-11 Phone: (216) 433-5851 NASA Lewis Research Center Cleveland, OH 44135
msc@ramoth.esd.sgi.com (Mark Callow) (05/05/90)
In article <1990May3.170422.29164@eagle.lerc.nasa.gov>, pstowne@zargon.lerc.nasa.gov (Charles E. Towne) writes: |> Mark Callow at SGI (msc@ramoth.sgi.com) responded: |> |> >Note you can use the -F option to give Frame a fixed size window suitable |> ^^^^^ |> he really means psview |> >for an 8.5 * 11 inch page. I find this a lot more convenient than having |> >to stretch out the window. Oops! I must have had Frame on the brain that day. |> By looking at the source code for psview, I discovered there are, |> apparently, several options like this that aren't documented in the |> printed or on-line man page. I'm not a C or NeWS programmer (not yet, |> anyway :-)), so I'm not sure what they all do. Could someone |> knowledgeable describe these options? (Or, even better, post or point |> the way to an up-to-date man page for psview?) Thanks. Here is the man page from the next release (3.3). I left all the ^H overstrike stuff in. It should be OK if you run it through ul or use less to view it. ============================= psview.1 cut here ============================= PPPPSSSSVVVVIIIIEEEEWWWW((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss PPPPSSSSVVVVIIIIEEEEWWWW((((1111)))) NNNNAAAAMMMMEEEE psview - PostScript previewer for NeWS SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ppppssssvvvviiiieeeewwww [[[[ ooooppppttttiiiioooonnnn((((ssss)))) ]]]] [[[[ ---- ]]]] [[[[ PPPPoooossssttttSSSSccccrrrriiiipppptttt- ---ffffiiiilllleeee ]]]] DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN _p_s_v_i_e_w puts up a window and runs the user's PostScript code in it. _p_s_v_i_e_w uses a portion of the window that has the proper aspect ratio for a standard letter-size page in portrait orientation. If _P_o_s_t_S_c_r_i_p_t-_f_i_l_e is specified, the PostScript code is taken from that file. If no argument is given, or if a `-' is given as the argument, _p_s_v_i_e_w reads the PostScript program from standard input. _p_s_v_i_e_w works best with files obeying the Adobe _D_o_c_u_m_e_n_t _S_t_r_u_c_t_u_r_i_n_g _C_o_n_v_e_n_t_i_o_n_s. (Such files contain special comments such as %%_P_a_g_e:.) When previewing such a file _p_s_v_i_e_w lets you flip through the pages with page boundaries being determined by locating the %%Page: comments. _p_s_v_i_e_w provides a slider to move to any page, and a menu to go to the first, previous, next or last page. Clicking the left mouse button goes to the next page. If the document has only a single page, neither the slider nor the page movement menu entries appear. All commands may be given from the keyboard. Space or '+' goes to the next page. Backspace or '-' goes to the previous page. '0', '<', or ',' go to the first page. '$', '>', or '.' go to the last page. '^C' or 'q' cause _p_s_v_i_e_w to exit. If the file doesn't follow the document structuring conventions, it is treated as having a single page. If the PostScript program in that file calls sssshhhhoooowwwwppppaaaaggggeeee,,,, _p_s_v_i_e_w will pause. Clicking the left mouse or selecting the _N_e_x_t _P_a_g_e menu entry will resume output. When the window is redrawn in response to damage or to selecting _R_e_d_i_s_p_l_a_y from the menu, any pending output is flushed and the program is executed from the beginning of the file. The options, which may appear in any order so long as they appear before the file, are: ----xxxx1111,,,,yyyy1111----xxxx2222,,,,y yyy2222 Sets the bounding box of the active part of the psview window. The coordinates are given as floating point values in inches. ----BBBB Normally psview draws a box to show the edges of the paper. This stops the box being drawn. ----bbbb<<<<ccccoooolllloooorrrr ssssppppeeeecccc>>>> Sets the background color. The default is white. <color spec> has the syntax [hr]x,y,z where x, y, and z are either floating point numbers between 0 and 1 or integers between 0 and 255. _h selects the hsb color model which is the default. _r selects the Page 1 Release 3.3 April 1990 PPPPSSSSVVVVIIIIEEEEWWWW((((1111)))) SSSSiiiilllliiiiccccoooonnnn GGGGrrrraaaapppphhhhiiiiccccssss PPPPSSSSVVVVIIIIEEEEWWWW((((1111)))) rgb color model. An individual color part may be set by, for example ----bbbb_g_0._5. Changing the background color may have strange effects especially if the PostScript file uses color. ----cccc Sets the background to blue and the foreground to white. ----FFFF<<<<ssssccccaaaalllleeee>>>> Gives the window a fixed initial size that defaults to the full height of the screen. _S_c_a_l_e, which defaults to 1.0, applies a uniform scaling to the default initial size. ----ffff<<<<ccccoooolllloooorrrr ssssppppeeeecccc>>>> Sets the foreground color. <color spec> is the same as for the background color. Changing the foreground color may have strange effects especially if the PostScript file uses color. ----llll Makes psview use a portion of the window that gives the aspect ratio of a landscape oriented 11 x 7 slide. ----SSSS Makes psview use a portion of the window that gives the aspect ratio of a portrait oriented 6.8 x 11 slide. ----ssss Makes psview use a portion of the window that gives the aspect ratio of a portrait oriented 5.7 x 11 slide. ----vvvv Makes psview verbose. SSSSEEEEEEEE AAAALLLLSSSSOOOO psh(1), say(1). _4_S_i_g_h_t _U_s_e_r'_s _G_u_i_d_e, Section 2, "Programming in NeWS." _P_o_s_t_S_c_r_i_p_t _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l. TTTTRRRRAAAADDDDEEEEMMMMAAAARRRRKKKK PostScript is a registered trademark of Adobe Systems Inc. NNNNOOOOTTTTEEEESSSS Assumes a syntactically valid PostScript file. Page 2 Release 3.3 April 1990 ================================ cut here ================================ -- From the TARDIS of Mark Callow msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc "There is much virtue in a window. It is to a human being as a frame is to a painting, as a proscenium to a play. It strongly defines its content."