Skip to content

Commit

Permalink
cre: adds getHeaderHeight() to get full status bar height (#743)
Browse files Browse the repository at this point in the history
  • Loading branch information
poire-z committed Oct 12, 2018
1 parent 01a39e9 commit 3488223
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cre.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,13 @@ static int getPageMargins(lua_State *L) {
return 1;
}

static int getHeaderHeight(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");

lua_pushinteger(L, doc->text_view->getPageHeaderHeight());
return 1;
}

static int setEmbeddedStyleSheet(lua_State *L) {
CreDocument *doc = (CreDocument*) luaL_checkudata(L, 1, "credocument");

Expand Down Expand Up @@ -2523,6 +2530,7 @@ static const struct luaL_Reg credocument_meth[] = {
{"getFontSize", getFontSize},
{"getFontFace", getFontFace},
{"getPageMargins", getPageMargins},
{"getHeaderHeight", getHeaderHeight},
{"getToc", getTableOfContent},
{"getVisiblePageCount", getVisiblePageCount},
/*--- set methods ---*/
Expand Down

0 comments on commit 3488223

Please sign in to comment.