<commit_before>

#Layout parameters
DEF menu_pad = 8
DEF menu_topbar_pad = 37
DEF menu_topbar_min_width = 200
DEF menu_bottom_pad = 20

DEF menu_sidebar_pad = 34
DEF menu_sidebar_min_height = 20

DEF resize_corner_size = 25


cdef class Base_Menu(UI_element):
    """
    Base class that other menu inherit from. Dont use this.
    This contains all methods/attributed shared by all derived menus.
    """

    cdef public list elements
    cdef FitBox element_space
    cdef int header_pos_id
    cdef Draggable handlebar, resize_corner
    cdef public RGBA color

    cpdef sync(self):
        if self.element_space.has_area():
            for e in self.elements:
                e.sync()


    def append(self, obj):
        self.elements.append(obj)

    def extend(self, objs):
        self.elements.extend(objs)

    def remove(self, obj):
        del self.elements[self.elements.index(obj)]

    def __len__ (self):
        return len(self.elements)

    def __getitem__ (self,x):
        return self.elements[x]

    def __setitem__ (self,x,obj):
        self.elements[x] = obj

    def __delitem__ (self,x):
        del self.elements[x]

    def __contains__ (self,obj):
        return obj in self.elements



    cdef draw_menu(self,bint nested):
        #draw translucent background
        if nested:
            pass
        else:
            gl.glColor4f(self.color.r,self.color.g,self.color.b,self.color.a)

            if self.header_pos_id == 2: #left
                self.outline.org.x += menu_sidebar_pad*ui_scale
                self.outline.size.x -= menu_sidebar_pad*ui_scale
                self.outline.sketch()
                self.outline.org.x -= menu_sidebar_pad*ui_scale<commit_msg>make menu eval as true.<commit_after>

#Layout parameters
DEF menu_pad = 8
DEF menu_topbar_pad = 37
DEF menu_topbar_min_width = 200
DEF menu_bottom_pad = 20

DEF menu_sidebar_pad = 34
DEF menu_sidebar_min_height = 20

DEF resize_corner_size = 25


cdef class Base_Menu(UI_element):
    """
    Base class that other menu inherit from. Dont use this.
    This contains all methods/attributed shared by all derived menus.
    """

    cdef public list elements
    cdef FitBox element_space
    cdef int header_pos_id
    cdef Draggable handlebar, resize_corner
    cdef public RGBA color

    cpdef sync(self):
        if self.element_space.has_area():
            for e in self.elements:
                e.sync()


    def append(self, obj):
        self.elements.append(obj)

    def extend(self, objs):
        self.elements.extend(objs)

    def remove(self, obj):
        del self.elements[self.elements.index(obj)]

    def __len__ (self):
        return len(self.elements)

    def __getitem__ (self,x):
        return self.elements[x]

    def __setitem__ (self,x,obj):
        self.elements[x] = obj

    def __delitem__ (self,x):
        del self.elements[x]

    def __contains__ (self,obj):
        return obj in self.elements

    def __bool__(self):
        return True



    cdef draw_menu(self,bint nested):
        #draw translucent background
        if nested:
            pass
        else:
            gl.glColor4f(self.color.r,self.color.g,self.color.b,self.color.a)

            if self.header_pos_id == 2: #left
                self.outline.org.x += menu_sidebar_pad*ui_scale
                self.outline.size.x -= menu_sidebar_pad*ui_scale
                self.outline.sketch()
                self.outline.org.x -= menu_sidebar_pad*ui_scale
{'fraction_non_alphanumeric': 0.08570606844981306, 'fraction_numerical': 0.009203336209375898, 'mean_word_length': 2.3282296650717704, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '867752', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1080, 'n_words': 277}