Hello Jean, Jean-Marc Lasgouttes <lasgouttes <at> lyx.org> writes:
> If you think about it, a table that is too wide is to wide. There is not > much LyX can do about it. What LyX could do, though is to tell you about > it using some visual markers obtained by parsing the LaTeX log file and > looking for 'overfull \hbox' warnings. Yes, I hope that will solve the problem up a certain extend. I will keep this as a secondary goal as Cyrille mentioned. When I kept on thinking about this another problem came in to my mind. Does this problem also related with the page layout? That is, we have to decide on giving warning by considering page layout and also factors like landscape/ portrait, font type. So, thought of touching the horizontal bar issue initially and getting back to this after that. > A few ideas to get you started on the project. These ideas are just a > braindump, they may not make sense. Feel free to disagree with any of > them. I think it is important to know first what UI effect we want to > obtain in order to make LyX as easy to use as possible. I also like if we can clear the objective much more with details. Thank you for helping with that. > * we do not want to scroll the whole screen, this leads to having an > empty screen with just one equation/table in the middle, which looks stupid. Even this option would be easy to implement compared to other options, I also think by doing so the quality of the application will decrease, because of the reason you have mentioned. > * therefore we could just scroll the row where the cursor is. > > * Inserting a real scrollbar (that is, a Qt widget) in our workarea may > prove difficult. Moreover the scrollbar would take room in the > documents. Alternatives include: Is not it possible to implement to have a horizontal scrollbar (real scrollbar) like the vertical scrollbar at the bottom of the working area. But it only gets appear when the cursor enters a too wide area (too wide table, too wide equation). And by scrolling this horizontal scrollbar, only the above mentioned too wide area will get scrolled horizontally. > * build our own scrollbar-like widget (lots of work) I could not understand why we can not use the same QT scrollbar used for vertical scrolling in the way I above mentioned? Could you please point out me the difficulties that you have said? I mean, implementing would be a difficult work. But as I understood, you have talked about additional difficulties. > * have buttons with arrows in the left and right margin or (since > these margins are currently thin) maybe buttons that appear as needed > when the mouse if over the problematic inset. I think this option will not much user-friendly. > * have the inset slide as needed to the left when the cursor enters a > part that would be off screen. To my understanding, this works with tables. I created a table with 3/4 columns and I added some large text to the final column. When I click on the first/ second column the table slides to right and when I click on the final column the table slides left. When I click an outer area (not in the area belongs to the table) table slides to right, if it is not. But again, if we have several columns with long texts, accessing each column would not be easy in this way, as I think. There we may need to use arrow keys in the keyboard that is not a user-friendly action. > * An implementation idea: For display purposes the visible screen is > split in rows, which are lines of text (see Row.cpp and > TextMetrics.cpp). A formula or a table is just one row of the outer > TextMetrics object. Therefore, it could be possible, when painting the > screen, to move the row to the left or right so that the cursor is > visible. The advantage of this approach is that it would not be > necessary to implement it for the insets themselves, but at a more > general level. Any line that is too large would become editable. Thank you for the information. I will go through the source and get back to you later. As I think having a scrollbar would be easy to handle for any user rather than inset slides. But as you said, scrolling the document as a whole is also inefficient. Please guide me on my idea, which I have mentioned above. If it is difficult to implement or not suitable for the context please advise me on a better approach. I am mentioning it here again, "Is not it possible to implement to have a horizontal scrollbar (real scrollbar) like the vertical scrollbar at the bottom of the working area. But it only gets appear when the cursor enters a too wide area (too wide table, too wide equation). And by scrolling this horizontal scrollbar, only the above mentioned too wide area will get scrolled horizontally." Thank you Hashini Senaratne