mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Add tabular context menu. Feel free to enhance/modify Edwin.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24018 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ad4171e679
commit
53daaabef4
@ -217,4 +217,37 @@ Menuset
|
||||
Item "Edit externally...|x" "graphics-edit"
|
||||
End
|
||||
|
||||
#
|
||||
# InsetTabular context menu
|
||||
#
|
||||
|
||||
Menu "context-tabular"
|
||||
Item "Multicolumn|M" "tabular-feature multicolumn"
|
||||
Separator
|
||||
Item "Top Line|T" "tabular-feature toggle-line-top"
|
||||
Item "Bottom Line|B" "tabular-feature toggle-line-bottom"
|
||||
Item "Left Line|L" "tabular-feature toggle-line-left"
|
||||
Item "Right Line|R" "tabular-feature toggle-line-right"
|
||||
Separator
|
||||
Item "Left|L" "tabular-feature align-left"
|
||||
Item "Center|C" "tabular-feature align-center"
|
||||
Item "Right|R" "tabular-feature align-right"
|
||||
Separator
|
||||
Item "Top|T" "tabular-feature valign-top"
|
||||
Item "Middle|M" "tabular-feature valign-middle"
|
||||
Item "Bottom|B" "tabular-feature valign-bottom"
|
||||
Separator
|
||||
Item "Add Row|A" "tabular-feature append-row"
|
||||
Item "Delete Row|D" "tabular-feature delete-row"
|
||||
Item "Copy Row|o" "tabular-feature copy-row"
|
||||
# Item "Swap Rows|S" "tabular-feature swap-row" # currently broken
|
||||
Separator
|
||||
Item "Add Column|u" "tabular-feature append-column"
|
||||
Item "Delete Column|e" "tabular-feature delete-column"
|
||||
Item "Copy Column|p" "tabular-feature copy-column"
|
||||
# Item "Swap Columns|w" "tabular-feature swap-column" # currently broken
|
||||
Separator
|
||||
Item "Settings...|S" "inset-settings listings"
|
||||
End
|
||||
|
||||
End
|
||||
|
@ -2806,6 +2806,13 @@ void InsetTabular::write(ostream & os) const
|
||||
}
|
||||
|
||||
|
||||
docstring InsetTabular::contextMenu(BufferView const &, int, int) const
|
||||
{
|
||||
// FIXME: depending on the selection state, we could offer a different menu.
|
||||
return from_ascii("context-tabular");
|
||||
}
|
||||
|
||||
|
||||
void InsetTabular::read(Lexer & lex)
|
||||
{
|
||||
bool const old_format = (lex.getString() == "\\LyXTable");
|
||||
|
@ -737,6 +737,8 @@ public:
|
||||
void validate(LaTeXFeatures & features) const;
|
||||
///
|
||||
InsetCode lyxCode() const { return TABULAR_CODE; }
|
||||
///
|
||||
docstring contextMenu(BufferView const & bv, int x, int y) const;
|
||||
/// get offset of this cursor slice relative to our upper left corner
|
||||
void cursorPos(BufferView const & bv, CursorSlice const & sl,
|
||||
bool boundary, int & x, int & y) const;
|
||||
|
Loading…
Reference in New Issue
Block a user