#include "Buffer.h"
#include "BufferParams.h"
#include "BranchList.h"
+#include "Color.h"
#include "Counters.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
-#include "gettext.h"
+#include "support/gettext.h"
#include "Lexer.h"
#include "OutputParams.h"
+#include "TextClass.h"
#include <sstream>
+using namespace std;
namespace lyx {
-using std::string;
-using std::istringstream;
-using std::ostream;
-using std::ostringstream;
-
-
-void InsetBranch::init()
-{
- setButtonLabel();
-}
-
InsetBranch::InsetBranch(BufferParams const & bp,
InsetBranchParams const & params)
: InsetCollapsable(bp), params_(params)
-{
- init();
-}
+{}
InsetBranch::InsetBranch(InsetBranch const & in)
: InsetCollapsable(in), params_(in.params_)
-{
- init();
-}
+{}
InsetBranch::~InsetBranch()
}
+docstring InsetBranch::toolTip(BufferView const & bv, int x, int y) const
+{
+ return _("Branch: ") + params_.branch;
+}
+
+
void InsetBranch::setButtonLabel()
{
docstring s = _("Branch: ") + params_.branch;
s = _("Undef: ") + s;
}
}
- if (decoration() == Classic)
+ if (decoration() == Deco_Classic)
setLabel(isOpen() ? s : getNewLabel(s) );
else
setLabel(params_.branch + ": " + getNewLabel(s));
BranchList const & branchlist = realbuffer.params().branchlist();
BranchList::const_iterator const end = branchlist.end();
BranchList::const_iterator it =
- std::find_if(branchlist.begin(), end,
+ find_if(branchlist.begin(), end,
BranchNamesEqual(params_.branch));
if (it == end)
return false;
}
+bool InsetBranch::isMacroScope(Buffer const & buf) const
+{
+ // Its own scope if not selected by buffer
+ return !isBranchSelected(buf);
+}
+
string const InsetBranchMailer::name_("branch");