# Path: pytripgui/canvas_vc/plotter/bars/bar_base.py
# class BarBase(ABC, Axes):
#     """
#     Abstract base class that holds information how bars should be made
#     """
#     # projection registration in matplotlib requires class to have parameter called "name"
#     name: str = BarProjection.DEFAULT.value
# 
#     def __init__(self, fig, rect, **kwargs):
#         super().__init__(fig, rect, **kwargs)
#         self.text_color = "#33DD33"  # text decorator colour
#         self.fg_color = 'white'  # colour for colourbar ticks and labels
#         self.bg_color = 'black'  # background colour, i.e. between colourbar and CTX/DOS/LET plot
#         self.cb_fontsize = 8  # fontsize of colourbar labels
#         self.label = 'DEFAULT_LABEL'
#         self.bar = None
#         self.set_aspect(30)
# 
#     def plot_bar(self, data, **kwargs):
#         """
#         Plots bar based on passed data
#         """
#         cb = colorbar(data, cax=self)
#         cb.set_label(self.label, color=self.fg_color, fontsize=self.cb_fontsize)
#         cb.outline.set_edgecolor(self.bg_color)
#         cb.ax.yaxis.set_tick_params(color=self.fg_color)
#         cb.ax.yaxis.set_label_position('left')
#         plt.setp(plt.getp(cb.ax.axes, 'yticklabels'), color=self.fg_color)
#         cb.ax.yaxis.set_tick_params(color=self.fg_color, labelsize=self.cb_fontsize)
#         self.bar = cb
# 
#     def clear_bar(self):
#         """
#         Clears whole axes, removes bar.
#         """
#         self.cla()
#         self.remove()
# 
# Path: pytripgui/canvas_vc/plotter/bars/projection_enum.py
# class BarProjection(Enum):
#     """
#     Enum class that holds all the strings that are used to register all bar classes in matplotlib
#     """
#     DEFAULT = 'BAR_PROJECTION_DEFAULT_NAME'
#     CTX = 'ctx_bar'
#     DOS = 'dos_bar'
#     LET = 'let_bar'


from matplotlib.projections import register_projection
from pytripgui.canvas_vc.plotter.bars.bar_base import BarBase
from pytripgui.canvas_vc.plotter.bars.projection_enum import BarProjection




class CtxBar(BarBase):
    name: str = BarProjection.CTX.value

    def __init__(self, fig, rect, **kwargs):
        super().__init__(fig, rect, **kwargs)
        self.label = "HU"



# Path: pytripgui/canvas_vc/plotter/bars/bar_base.py
# class BarBase(ABC, Axes):
#     """
#     Abstract base class that holds information how bars should be made
#     """
#     # projection registration in matplotlib requires class to have parameter called "name"
#     name: str = BarProjection.DEFAULT.value
# 
#     def __init__(self, fig, rect, **kwargs):
#         super().__init__(fig, rect, **kwargs)
#         self.text_color = "#33DD33"  # text decorator colour
#         self.fg_color = 'white'  # colour for colourbar ticks and labels
#         self.bg_color = 'black'  # background colour, i.e. between colourbar and CTX/DOS/LET plot
#         self.cb_fontsize = 8  # fontsize of colourbar labels
#         self.label = 'DEFAULT_LABEL'
#         self.bar = None
#         self.set_aspect(30)
# 
#     def plot_bar(self, data, **kwargs):
#         """
#         Plots bar based on passed data
#         """
#         cb = colorbar(data, cax=self)
#         cb.set_label(self.label, color=self.fg_color, fontsize=self.cb_fontsize)
#         cb.outline.set_edgecolor(self.bg_color)
#         cb.ax.yaxis.set_tick_params(color=self.fg_color)
#         cb.ax.yaxis.set_label_position('left')
#         plt.setp(plt.getp(cb.ax.axes, 'yticklabels'), color=self.fg_color)
#         cb.ax.yaxis.set_tick_params(color=self.fg_color, labelsize=self.cb_fontsize)
#         self.bar = cb
# 
#     def clear_bar(self):
#         """
#         Clears whole axes, removes bar.
#         """
#         self.cla()
#         self.remove()
# 
# Path: pytripgui/canvas_vc/plotter/bars/projection_enum.py
# class BarProjection(Enum):
#     """
#     Enum class that holds all the strings that are used to register all bar classes in matplotlib
#     """
#     DEFAULT = 'BAR_PROJECTION_DEFAULT_NAME'
#     CTX = 'ctx_bar'
#     DOS = 'dos_bar'
#     LET = 'let_bar'


# Path: pytripgui/canvas_vc/plotter/bars/ctx_bar.py
from matplotlib.projections import register_projection
from pytripgui.canvas_vc.plotter.bars.bar_base import BarBase
from pytripgui.canvas_vc.plotter.bars.projection_enum import BarProjection




class CtxBar(BarBase):
    name: str = BarProjection.CTX.value

    def __init__(self, fig, rect, **kwargs):
        super().__init__(fig, rect, **kwargs)
        self.label = "HU"



register_projection(CtxBar)
